2008-01-31 Alp Toker <alp@atoker.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2008-01-31  Alp Toker  <alp@atoker.com>
2
3         Reviewed by Adam Roben.
4
5         http://bugs.webkit.org/show_bug.cgi?id=17006
6         [GTK] Header path should be webkit/webkit.h
7
8         Move the GTK+ API sources as needed and update the build systems.
9
10         * GNUmakefile.am:
11         * WebCore.pro:
12
13 2008-01-31  Sam Weinig  <sam@webkit.org>
14
15         Reviewed by Geoff Garen.
16
17         No need to get the prototype just to compare compare property names.
18
19         * bindings/js/JSHistoryCustom.cpp:
20         (WebCore::JSHistory::customGetOwnPropertySlot):
21
22 2008-01-31  Sam Weinig  <sam@webkit.org>
23
24         Fix non-mac builds.
25
26         * GNUmakefile.am:
27         * WebCore.pro:
28         * WebCore.vcproj/WebCore.vcproj:
29         * WebCoreSources.bkl:
30
31 2008-01-31  David Hyatt  <hyatt@apple.com>
32
33         Fix for bug 17101.
34
35         List items need to ignore the line box shrinking quirk, since IE and Firefox both do.
36
37         Reviewed by Eric
38
39         fast/lists/list-item-line-height.html
40
41         * rendering/InlineFlowBox.h:
42         (WebCore::InlineFlowBox::InlineFlowBox):
43
44 2008-01-31  Samuel Weinig  <sam@webkit.org>
45
46         Reviewed by Darin Adler.
47
48         Fix for <rdar://problem/5708993> Mutability of the History object
49
50         - Don't allow cross-domain get access to any of the history objects properties
51           except the back(), forward() and go() methods.
52         - Don't allow cross-domain put access to any of the history objects properties.
53         - Don't allow cross-domain enumeration of the History or Location objects.
54
55         Tests: http/tests/security/cross-frame-access-history-get-override.html
56                http/tests/security/cross-frame-access-history-get.html
57                http/tests/security/cross-frame-access-history-put.html
58
59         * WebCore.xcodeproj/project.pbxproj:
60         * bindings/js/JSDOMWindowCustom.cpp: Remove unnessary KJS::'s
61         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
62         (WebCore::JSDOMWindow::customPut):
63         (WebCore::JSDOMWindow::getPropertyNames): Moved implementation from KJS::Window now that the declaration is autogenerated
64         using the new CustomGetPropertyNames.
65         (WebCore::JSDOMWindow::postMessage):
66
67         * bindings/js/JSHistoryCustom.cpp: Added.
68         (WebCore::allowsAccessFromFrame):
69         (WebCore::JSHistory::customGetOwnPropertySlot): Only allow getting the declared functions back(), forward() and go() from cross-domain.
70         Deny all other gets.
71         (WebCore::JSHistory::customPut): Don't allow putting cross-domain.
72         (WebCore::JSHistory::getPropertyNames): Don't allow enumeration cross-domain.
73
74         * bindings/js/JSLocation.cpp:
75         (WebCore::allowsAccessFromFrame):
76         (WebCore::JSLocation::getPropertyNames): Don't allow enumeration cross-domain.
77         * bindings/js/JSLocation.h:
78
79         * bindings/js/kjs_window.cpp:
80         * bindings/js/kjs_window.h:
81
82         * bindings/scripts/CodeGeneratorJS.pm:
83         Add support for new CustomGetPropertNames extended attribute and changed the logic of CustomPutFunction
84         to create an overrided put() function even if no read-write properties exist.
85
86         * page/DOMWindow.idl: Added CustomGetPropertNames
87         * page/History.idl: Added CustomGetPropertNames
88
89 2008-01-30  Justin Garcia  <justin.garcia@apple.com>
90
91         Reviewed by Darin Adler.
92         
93         <rdar://problem/5708115> REGRESSION: Words selected with a double click and copied won't paste into Mail
94
95         * page/mac/WebCoreFrameBridge.h: Re-exposed smartInsertForString:, it's used by a WebKit method used by Mail.
96
97 2008-01-31  Adam Roben  <aroben@apple.com>
98
99         Add line box drawing code to InspectorController::drawNodeHighlight
100
101         This makes drawNodeHighlight a complete replacement for the painting
102         code in WebKit/mac/WebNodeHighlightView.mm, and also brings line box
103         rects to Windows for the first time.
104
105         Reviewed by Darin.
106
107         * dom/Node.h: Changed isSVGElement to always exist, but to only be
108         virtual when ENABLE(SVG) is true. This way you can always call
109         node->isSVGElement() without checking ENABLE(SVG).
110         * page/InspectorController.cpp:
111         (WebCore::InspectorController::drawNodeHighlight): Ported line box
112         rect code from the Mac implementation in WebNodeHighlightView.mm.
113
114 2008-01-31  Adam Roben  <aroben@apple.com>
115
116         Put more knowledge about the node highlight in WebCore
117
118         InspectorController now calculates the overlay rect and node rect when
119         drawing the node highlight instead of having them be passed in.
120         InspectorController now holds onto the highlighted node so that it can
121         determine these rects.
122
123         Once all platforms are calling down to drawNodeHighlight instead of
124         drawing the highlight themselves, we can change
125         InspectorClient::highlight(Node*) to something like
126         InspectorClient::updateAndShowHighlight().
127
128         This also fixes Bug 14264: Node highlight makes it impossible to
129         scroll the page
130         <http://bugs.webkit.org/show_bug.cgi?id=14264>
131         <rdar://5712788>
132
133         Reviewed by Darin.
134
135         * page/InspectorController.cpp:
136         (WebCore::InspectorController::highlight): Store the node for use in
137         drawNodeHighlight.
138         (WebCore::InspectorController::drawNodeHighlight): Changed to be a
139         const instance method. Now calculates the overlay rect and node rect
140         instead of having them passed in.
141         * page/InspectorController.h:
142
143 2008-01-31  Adam Roben  <aroben@apple.com>
144
145         Add node highlight drawing code to InspectorController
146
147         The code came from WebKit/win/WebNodeHighlight.cpp. It's not quite as
148         complete as the Mac implementation (in particular, it doesn't handle
149         line-box rects), but it's a start.
150
151         Reviewed by Darin.
152
153         * page/InspectorController.cpp:
154         (WebCore::InspectorController::drawNodeHighlight): Added.
155         * page/InspectorController.h:
156
157 2008-01-31  Dan Bernstein  <mitz@apple.com>
158
159         Reviewed by Dave Hyatt.
160
161         - fix http://bugs.webkit.org/show_bug.cgi?id=17107
162           <rdar://problem/5716722> REGRESSION (r29834): Article text on redhat.com magazine site appears to be painting twice
163
164         Test: fast/block/float/intruding-painted-twice.html
165
166         * rendering/RenderBlock.cpp:
167         (WebCore::RenderBlock::layoutBlock): Pass 'false' for the new
168         makeChildPaintOtherFloats parameter to addOverhangingFloats() because at
169         this point we are only taking away floats from the child.
170         (WebCore::RenderBlock::layoutBlockChildren): Pass 'true' for the new
171         makeChildPaintOtherFloats parameter to addOverhangingFloats() iff the
172         child was not laid out again. Only in that case, it may have overhanging
173         floats that it does not paint because they used to be overhanging from
174         the parent, but now they are not.
175         (WebCore::RenderBlock::addOverhangingFloats): Refined the conditions for
176         making the child paint the float: require that the float be a descendant
177         of the child (the other case is when it intrudes into the child from
178         another sibling) and that it does not have a layer (in which case it
179         paints itself). In addition, do the check only if the caller passed
180         'true' for the makeChildPaintOtherFloats parameter.
181         * rendering/RenderBlock.h:
182
183 2008-01-30  Dan Bernstein  <mitz@apple.com>
184
185         Reviewed by Sam Weinig.
186
187         - change the interpretation of unicode-range values in "from-to" form
188           to include the "to" character.
189
190         Test: fast/css/font-face-unicode-range.html
191
192         * css/CSSParser.cpp:
193         (WebCore::CSSParser::parseFontFaceUnicodeRange):
194         * css/CSSSegmentedFontFace.cpp:
195         (WebCore::CSSSegmentedFontFace::overlayRange):
196         * platform/graphics/GlyphPageTreeNode.cpp:
197         (WebCore::GlyphPageTreeNode::initializePage):
198         * platform/graphics/SegmentedFontData.cpp:
199         (WebCore::SegmentedFontData::fontDataForCharacter):
200         (WebCore::SegmentedFontData::containsCharacters):
201
202 2008-01-30  Dan Bernstein  <mitz@apple.com>
203
204         Reviewed by Darin Adler.
205
206         - prune references to custom fonts' SimpleFontData from the glyph page
207           tree when they are destroyed
208
209         * css/CSSFontFaceSource.cpp:
210         (WebCore::CSSFontFaceSource::pruneTable):
211
212 2008-01-30  Darin Adler  <darin@apple.com>
213
214         Reviewed by Tim Hatcher.
215
216         New fix for <rdar://problem/5688428> Reproducible assertion failure
217         in SQLTransaction::performNextStep() (16876)
218
219         Fixes a deadlock that was happening for all Database use. All
220         storage layout tests pass.
221
222         * storage/Database.cpp:
223         (WebCore::CurrentThreadSetter::CurrentThreadSetter): New helper class
224         to set the current thread and zero it on destruction.
225         (WebCore::CurrentThreadSetter::~CurrentThreadSetter): Set threadIdentifierStorage to 0.
226         (WebCore::Database::Database): Set m_transactionStepThread to 0.
227         (WebCore::Database::performTransactionStep): Set m_transactionStepThread to currentThread().
228         (WebCore::Database::scheduleTransactionCallback): Assert m_transactionStepThread
229         is currentThread().
230         * storage/Database.h: Add m_transactionStepThread for debug builds
231         to track which thread performTransactionStep() was called on. 
232
233 2008-01-30  Timothy Hatcher  <timothy@apple.com>
234
235         Reviewed by Darin Adler.
236
237         ASSERTION FAILED: JSLock::lockCount() > 0 when opening the
238         Web Inspector on a page with a Database.
239
240         Fix the ASSERT by taking a JSLock before calling toJS().
241
242         * page/InspectorController.cpp:
243         (WebCore::InspectorController::addDatabaseScriptResource):
244
245 2008-01-30  Beth Dakin  <bdakin@apple.com>
246
247         Reviewed by Darin.
248
249         Fix for <rdar://problem/5598609> CrashTracer: [USER] 626 crashes in 
250         Safari at com.apple.WebCore: WebCore::FrameView::needsFullRepaint 
251         const + 6
252
253         The real problem here is tracked by rdar://5598072, which is that 
254         frames can lose sync between their view and their document when a 
255         non-HTML view is loaded (such as bookmarks view or a PDF). That can 
256         cause this crash if the layout timer fires before things have fixed 
257         themselves. This fix turns an ASSERT in FrameView::layout() into an 
258         early return to cause graceful failure until the root of the 
259         problem is addressed. 
260
261         * page/FrameView.cpp:
262         (WebCore::FrameView::layout):
263
264 2008-01-30  Justin Garcia  <justin.garcia@apple.com>
265
266         Reviewed by Darin Adler.
267
268         <rdar://problem/5700414> REGRESSION (Adama-ToT): Selecting "Header 1" style in Leopard Server wiki inserts newline
269
270         * editing/FormatBlockCommand.cpp:
271         (WebCore::FormatBlockCommand::doApply): If the selected paragraph was empty,
272         we may still need to call moveParagrah to remove the line break that holds that
273         paragraph open because the new block of the requested type needs to to replace it.
274
275 2008-01-30  Timothy Hatcher  <timothy@apple.com>
276
277         Reviewed by Darin Adler.
278
279         <rdar://problem/5688428> Reproducible assertion failure in SQLTransaction::performNextStep() (16876)
280
281         Revised fix to use the globalCallbackMutex() mutex and hold the mutex
282         for the entire function scope.
283
284         * storage/Database.cpp:
285         (WebCore::Database::performTransactionStep):
286
287 2008-01-30  Timothy Hatcher  <timothy@apple.com>
288
289         Reviewed by Adam Roben.
290
291         Make ResourceTreeElement inherit the prototype of TreeElement.
292
293         * page/inspector/Resource.js:
294
295 2008-01-30  Sam Weinig  <sam@webkit.org>
296
297         Reviewed by Adam Roben.
298
299         Don't include SecurityOrigin.h in Document.h so that we can avoid massive
300         recompilation when changing the SecurityOrigin.
301
302         * dom/Document.cpp:
303         (WebCore::Document::setSecurityOrigin):
304         * dom/Document.h:
305
306 2008-01-30  Tim Omernick  <timo@apple.com>
307
308         Reviewed by Tim Hatcher and Brady.
309
310         <rdar://problem/5688428> Reproducible assertion failure in SQLTransaction::performNextStep() (16876)
311
312         * storage/Database.cpp:
313         (WebCore::Database::performTransactionStep): Do not perform the next transaction if
314         a global callback is already scheduled.
315
316 2008-01-30  Jon Honeycutt  <jhoneycutt@apple.com>
317
318         Reviewed by Darin.
319
320         <rdar://problem/5669317> Crash closing pop up window with Real Player
321         content
322
323         Some RealPlayer versions hang on unload. To prevent this hang, don't
324         unload versions since the last known unloadable version.
325         <rdar://problem/5713147> tracks revisiting this when the bug in
326         RealPlayer is fixed and we can again unload the plug-in.
327
328         * plugins/win/PluginPackageWin.cpp:
329         (WebCore::PluginPackageWin::compareFileVersion): Compare the plug-in's
330         file version to the passed file version, returning -1, 0, or 1 if the
331         plug-in's version is less than, equal to, or greater than the version
332         passed.
333         (WebCore::PluginPackageWin::isPluginBlacklisted): Use
334         compareFileVersion()
335         * plugins/win/PluginPackageWin.h:
336         * plugins/win/PluginViewWin.cpp:
337         (WebCore::PluginViewWin::determineQuirks): If the plug-in version is
338         newer than the last-known unloadable version, add the DontUnloadPlugin
339         quirk
340
341 2008-01-29  Mark Rowe  <mrowe@apple.com>
342
343         Reviewed by Tim Hatcher.
344
345         Look for headers relative to NEXT_ROOT so that build-root picks up the WebCoreSQLite
346         version of sqlite3.h rather than the older system version.
347
348         * Configurations/Base.xcconfig:
349
350 2008-01-29  Dan Bernstein  <mitz@apple.com>
351
352         - build fix
353
354         * loader/CachedFont.cpp:
355         (WebCore::CachedFont::CachedFont):
356
357 2008-01-29  Mark Rowe  <mrowe@apple.com>
358
359         Reviewed by Brady Eidson.
360
361         Add the correct directory to the header search paths in Production builds.
362
363         * Configurations/Base.xcconfig:
364
365 2008-01-29  Dan Bernstein  <mitz@apple.com>
366
367         Reviewed by Dave Hyatt.
368
369         - fix http://bugs.webkit.org/show_bug.cgi?id=17085
370           <rdar://problem/5714136> REGRESSION (r29839): All remote fonts are treated as SVG fonts
371
372         Test: fast/css/font-face-remote.html
373
374         Added an isSVGFont method to CachedFont and use it to decide how to
375         process the font data. Currently whether the data is SVG is determined
376         based on the format property in the @font-face rule, but in the future
377         the MIME type or other metadata may be used when the format is
378         unspecified.
379
380         * css/CSSFontFaceSource.cpp:
381         (WebCore::CSSFontFaceSource::getFontData): Changed to parse the data as
382         SVG only if the CachedFont is an SVG font.
383         * css/CSSFontSelector.cpp:
384         (WebCore::CSSFontSelector::addFontFaceRule): Mark the CachedFont as an
385         SVG font based on format.
386         * loader/CachedFont.cpp:
387         (WebCore::CachedFont::CachedFont): Initialize m_isSVGFont to false.
388         (WebCore::CachedFont::ensureCustomFontData):
389         (WebCore::CachedFont::ensureSVGFontData):
390         (WebCore::CachedFont::getSVGFontById):
391         * loader/CachedFont.h:
392         (WebCore::CachedFont::isSVGFont): Added.
393         (WebCore::CachedFont::setSVGFont): Added.
394
395 2008-01-29  Antti Koivisto  <antti@apple.com>
396
397         Some comment cleanup.
398
399         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
400         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
401         * platform/graphics/win/QTMovieWin.cpp:
402         (QTMovieWin::load):
403         (QTMovieWin::disableUnsupportedTracks):
404
405 2008-01-29  Adele Peterson  <adele@apple.com>
406
407         Reviewed by Antti.
408
409         Fix for <rdar://5683527> media/{audio,video|-controls-rendering.html failing
410         
411         * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::isControlStyled):
412         Don't treat all media controls as styled.  This causes builds with an old version of SafariTheme to have different metrics for these controls.
413
414 2008-01-29  Dan Bernstein  <mitz@apple.com>
415
416         Reviewed by Dave Hyatt.
417
418         - make Font instances cache their primary font
419
420         * WebCore.base.exp:
421         * platform/graphics/Font.cpp:
422         (WebCore::Font::Font):
423         (WebCore::Font::operator=):
424         (WebCore::Font::cachePrimaryFont):
425         (WebCore::Font::update):
426         * platform/graphics/Font.h:
427         (WebCore::Font::primaryFont):
428
429 2008-01-29  Dan Bernstein  <mitz@apple.com>
430
431         - Leopard build fix
432
433         * platform/graphics/SimpleFontData.cpp:
434         (WebCore::SimpleFontData::SimpleFontData):
435
436 2008-01-29  Mark Rowe  <mrowe@apple.com>
437
438         Reviewed by Tim Hatcher.
439
440         <rdar://problem/5600926> WebCore on Tiger must link to its own copy of SQLite 3.4 or newer (so HTML database behavior will be correct).
441
442         * Configurations/Base.xcconfig: Update the header search path on Tiger.
443         * Configurations/DebugRelease.xcconfig: Update the header search path on Tiger.
444         * Configurations/WebCore.xcconfig: Link against libWebCoreSQLite3.a when building on Tiger.
445         * WebCore.xcodeproj/project.pbxproj: Update the header search path in Production builds on Tiger.
446
447 2008-01-29  Dan Bernstein  <mitz@apple.com>
448
449         Reviewed by Adam Roben and Oliver Hunt.
450
451         - fix <rdar://problem/5713131> REGRESSION (r29246): Many SVG font tests are failing
452
453         * platform/graphics/SimpleFontData.cpp:
454         (WebCore::SimpleFontData::SimpleFontData): Use double instead of float
455         for consistent rounding behavior between Mac OS X and Windows.
456
457 2008-01-29  Adam Roben  <aroben@apple.com>
458
459         Fix <rdar://5713302> Web Inspector on Windows is not using the
460         localized strings
461
462         Reviewed by Steve.
463
464         * WebCore.vcproj/WebCore.vcproj: Copy InspectorLocalizedStrings.js to
465         $WebKitOutputDir.
466         * page/InspectorController.cpp: Touch this to force the project to
467         build.
468
469 2008-01-29  Eric Seidel  <eric@webkit.org>
470
471         Reviewed by Nikolas.
472
473         Acid3 after double-attach
474         http://bugs.webkit.org/show_bug.cgi?id=17058
475         
476         I believe SVGTextPathElement::buildPendingResource() was entirely
477         bogus, removing it did not cause any tests to fail.
478
479         Test: svg/custom/textPath-assert.svg
480
481         * svg/SVGTextPathElement.cpp:
482         (WebCore::SVGTextPathElement::insertedIntoDocument): remove buildPendingResource()
483         * svg/SVGTextPathElement.h:
484
485 2008-01-29  Adam Roben  <aroben@apple.com>
486
487         Fix Bug 16234: Inspector should support searching for elements by CSS selectors
488
489         <http://bugs.webkit.org/show_bugs.cgi?id=16234>
490         <rdar://5712862>
491
492         Reviewed by Tim.
493
494         * page/inspector/inspector.js: Use Document.querySelectorAll to search
495         for elements by CSS selector. Also store a custom property on nodes
496         being added to the search results to avoid showing the same node more
497         than once.
498
499 2008-01-29  Adam Roben  <aroben@apple.com>
500
501         Fix <rdar://5711136> Full-screen Flash on 1up.com is unresponsive
502
503         Reviewed by Anders and Darin.
504
505         No test possible.
506
507         * plugins/win/PluginViewWin.cpp:
508         (WebCore::PluginViewWin::wndProc): Set/release capture on mouse
509         down/up, like Firefox does.
510
511 2008-01-28  Dan Bernstein  <mitz@apple.com>
512
513         Reviewed by Sam Weinig.
514
515         - make isSVGFont non-virtual
516
517         * platform/graphics/FontData.h:
518         * platform/graphics/SegmentedFontData.cpp:
519         * platform/graphics/SegmentedFontData.h:
520         * platform/graphics/SimpleFontData.h:
521         (WebCore::SimpleFontData::isSVGFont):
522
523 2008-01-28  Dan Bernstein  <mitz@apple.com>
524
525         Reviewed by Adam Roben.
526
527         - fix <rdar://problem/5700824> Chunky scrolling + scrolling artifacts @ netflix.com/Notebook
528
529         * platform/win/ScrollViewWin.cpp:
530         (WebCore::ScrollView::ScrollViewPrivate::valueChanged): Send the scroll
531         event before updating the window, thus giving event handlers a chance
532         to update layout for the new scroll position, eliminating the jitter.
533
534 2008-01-28  Adam Roben  <aroben@apple.com>
535
536         Fix <rdar://5555260> Gmail doesn't load when a user stylesheet is specified
537
538         Reviewed by Darin.
539
540         A null value exception was being thrown in Gmail's JS code because a
541         call to document.write failed. document.write failed because
542         Document::close had not yet been called. Document::close was not
543         called because the Document was considered to not be "complete" in
544         FrameLoader::checkComplete because the user stylesheet was in the
545         process of loading. The user stylesheet was loading because it had
546         previously been evicted from the cache and was loading fresh from
547         disk. It had been evicted from the cache because the calculation of
548         the expiration date was incorrectly casting/overflowing in
549         ResourceResponseCFNet.cpp.
550
551         We now calculate the expiration date in a way that does not cause us
552         to overflow a time_t, and we correctly clamp the value to the range of
553         a time_t. I also made the fix for the last modified date, though that
554         was not causing any bug I am aware of.
555
556         In the long-term it seems like whether or not Document::close is
557         called should not be dependent upon whether the user stylesheet has
558         finished loading or not.
559
560         * platform/network/cf/ResourceResponseCFNet.cpp:
561         (WebCore::toTimeT): Added. Converts from CFAbsoluteTime to time_t and
562         clamps to the range of time_t.
563         (WebCore::ResourceResponse::doUpdateResourceResponse): Call toTimeT.
564
565 2008-01-28  Dan Bernstein  <mitz@apple.com>
566
567         Reviewed by Nikolas Zimmermann.
568
569         - fix leaks introduced in r29838
570
571         * svg/SVGFont.cpp:
572         (WebCore::floatWidthMissingGlyphCallback):
573         (WebCore::drawTextMissingGlyphCallback):
574
575 2008-01-28  Nikolas Zimmermann  <zimmermann@kde.org>
576
577         Reviewed by Eric, Dan & Oliver.
578
579         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16980
580
581         Support external SVG Fonts, by reusing the custom font handling logic.
582         This enables us - as first engine - to render HTML pages using SVG Fonts.
583
584         Fixes fonts-elem-03-b.svg / fonts-elem-04-b.svg / fonts-elem-07-b.svg
585         Add new testcase svg-fonts-in-html.html.
586
587         * css/CSSFontFaceSource.cpp:
588         (WebCore::CSSFontFaceSource::getFontData):
589         * css/CSSFontFaceSource.h:
590         * css/CSSFontFaceSrcValue.cpp:
591         (WebCore::CSSFontFaceSrcValue::isSVGFontFaceSrc):
592         (WebCore::CSSFontFaceSrcValue::isSupportedFormat):
593         * css/CSSFontFaceSrcValue.h:
594         * css/CSSFontSelector.cpp:
595         (WebCore::CSSFontSelector::addFontFaceRule):
596         * loader/CachedFont.cpp:
597         (WebCore::CachedFont::~CachedFont):
598         (WebCore::CachedFont::ensureSVGFontData):
599         (WebCore::CachedFont::extractFontFromSVGData):
600         (WebCore::CachedFont::platformDataFromSVGData):
601         * loader/CachedFont.h:
602         * platform/graphics/Font.cpp:
603         (WebCore::Font::offsetForPosition):
604         * platform/graphics/Font.h:
605         * svg/SVGFont.cpp:
606         (WebCore::floatWidthOfSubStringUsingSVGFont):
607         (WebCore::Font::drawTextUsingSVGFont):
608         (WebCore::Font::offsetForPositionForTextUsingSVGFont):
609         * svg/SVGFontFaceElement.cpp:
610         (WebCore::SVGFontFaceElement::rebuildFontFace):
611         * svg/SVGFontFaceElement.h:
612         * svg/SVGFontFaceUriElement.cpp:
613         (WebCore::SVGFontFaceUriElement::srcValue):
614
615 2008-01-28  Dan Bernstein  <mitz@apple.com>
616
617         Reviewed by Adam Roben.
618
619         - fix svg/W3C-SVG-1.1/fonts-glyph-04-t.svg failure on Windows
620
621         The results differed between Mac OS X and Windows because the code was
622         using a 0-size font, which Mac OS X changes to 12pt.
623
624         * svg/SVGFont.cpp:
625         (WebCore::floatWidthMissingGlyphCallback): Use the font description of
626         the primary font to initialize the fallback font.
627         (WebCore::drawTextMissingGlyphCallback): Ditto.
628
629 2008-01-28  Eric Seidel  <eric@webkit.org>
630
631         Reviewed by Nikolas Zimmermann.
632
633         Use class instead of struct to appease MSVC.
634
635         * history/HistoryItem.h:
636         * loader/FrameLoaderClient.h:
637         * page/InspectorController.h:
638         * platform/network/ResourceRequestBase.h:
639         * platform/network/mac/ResourceRequest.h:
640
641 2008-01-28  Dan Bernstein  <mitz@apple.com>
642
643         Reviewed by Darin Adler.
644
645         - fix http://bugs.webkit.org/show_bug.cgi?id=16774
646           REGRESSION (r27464-r27504) javascript popup menu does not display 'close' button
647
648         Test: fast/dynamic/float-no-longer-overhanging.html
649
650         * rendering/RenderBlock.cpp:
651         (WebCore::RenderBlock::addOverhangingFloats): If a child's float turns
652         out not to be overhanging at this time, ensure that the child paints it.
653
654 2008-01-28  Oliver Hunt  <oliver@apple.com>
655
656         More wx fixes
657
658         * platform/graphics/wx/AffineTransformWx.cpp:
659
660 2008-01-28  Oliver Hunt  <oliver@apple.com>
661
662         And another Wx build fix
663
664         * platform/graphics/wx/AffineTransformWx.cpp:
665         (WebCore::AffineTransform::mapRect):
666
667 2008-01-28  Oliver Hunt  <oliver@apple.com>
668
669         Yet another Wx build fix
670
671         * platform/graphics/wx/GraphicsContextWx.cpp:
672
673 2008-01-28  Oliver Hunt  <oliver@apple.com>
674
675         Wx build fix
676
677         * platform/graphics/wx/GraphicsContextWx.cpp:
678         (WebCore::GraphicsContext::getCTM):
679
680 2008-01-28  Oliver Hunt  <oliver@apple.com>
681
682         Gtk build fix
683
684         * platform/graphics/cairo/GraphicsContextCairo.cpp:
685
686 2008-01-27  Oliver Hunt  <oliver@apple.com>
687
688         Reviewed by Sam Weinig.
689
690         Bug 16629: <canvas> does not support isPointInPath()
691
692         Relatively trivial change to implement pointInPath and add
693         it to the bindings.  Most of this patch is the addition of
694         GraphicsContext::getCTM() by pulling the various platform
695         implementations from CanvasRenderingContext2D::willDraw
696
697         Test: fast/canvas/pointInPath.html
698
699         * html/CanvasRenderingContext2D.cpp:
700         (WebCore::CanvasRenderingContext2D::isPointInPath):
701         (WebCore::CanvasRenderingContext2D::willDraw):
702         * html/CanvasRenderingContext2D.h:
703         * html/CanvasRenderingContext2D.idl:
704         * platform/graphics/AffineTransform.cpp:
705         (WebCore::AffineTransform::mapPoint):
706           Support mapping of FloatRects
707         * platform/graphics/AffineTransform.h:
708         * platform/graphics/GraphicsContext.h:
709         * platform/graphics/cairo/GraphicsContextCairo.cpp:
710         (WebCore::GraphicsContext::getCTM):
711         * platform/graphics/cg/GraphicsContextCG.cpp:
712         (WebCore::GraphicsContext::getCTM):
713         * platform/graphics/qt/GraphicsContextQt.cpp:
714         (WebCore::GraphicsContext::getCTM):
715
716 2008-01-27  Alexey Proskuryakov  <ap@webkit.org>
717
718         Reviewed by Darin.
719
720         http://bugs.webkit.org/show_bug.cgi?id=17014
721         REGRESSION: EUC-CN code A3A0 is mapped to U+E5E5 instead of U+3000
722
723         Test: fast/encoding/char-decoding.html
724
725         * platform/text/TextCodecICU.cpp:
726         (WebCore::TextCodecICU::decode): Added a workaround that we used to have in Mac code.
727
728         * platform/text/mac/TextCodecMac.cpp:
729         (WebCore::TextCodecMac::decode): Corrected a comment.
730
731 2008-01-27  Alp Toker  <alp@atoker.com>
732
733         Reviewed by Mark Rowe.
734
735         http://bugs.webkit.org/show_bug.cgi?id=17029
736         Use of deprecated class function but declares GTK_DISABLE_DEPRECATED
737
738         Sync gtkdrawing.h (1.51) and gtk2drawing.c (1.71) from Mozilla
739         upstream.
740
741         Adapt RenderThemeGtk.cpp to track minor changes.
742
743         * platform/gtk/RenderThemeGtk.cpp:
744         (WebCore::gtkTextDirection):
745         (WebCore::adjustMozStyle):
746         (WebCore::setMozState):
747         (WebCore::paintMozWidget):
748         * platform/gtk/gtk2drawing.c:
749         (setup_widget_prototype):
750         (ensure_hpaned_widget):
751         (ensure_vpaned_widget):
752         (ensure_toggle_button_widget):
753         (ensure_combo_box_entry_widget):
754         (ensure_dropdown_entry_widget):
755         (moz_gtk_get_dropdown_button):
756         (ensure_arrow_widget):
757         (ensure_toolbar_separator_widget):
758         (ensure_statusbar_widget):
759         (ensure_frame_widget):
760         (ensure_menu_separator_widget):
761         (ensure_tree_view_widget):
762         (ensure_tree_header_cell_widget):
763         (ensure_expander_widget):
764         (ConvertGtkState):
765         (moz_gtk_button_paint):
766         (moz_gtk_widget_get_focus):
767         (moz_gtk_splitter_get_metrics):
768         (moz_gtk_toggle_paint):
769         (moz_gtk_scrollbar_button_paint):
770         (moz_gtk_scrollbar_trough_paint):
771         (moz_gtk_scrollbar_thumb_paint):
772         (moz_gtk_spin_paint):
773         (moz_gtk_spin_updown_paint):
774         (moz_gtk_scale_paint):
775         (moz_gtk_scale_thumb_paint):
776         (moz_gtk_gripper_paint):
777         (moz_gtk_hpaned_paint):
778         (moz_gtk_vpaned_paint):
779         (moz_gtk_entry_paint):
780         (moz_gtk_treeview_paint):
781         (moz_gtk_tree_header_cell_paint):
782         (moz_gtk_tree_header_sort_arrow_paint):
783         (moz_gtk_treeview_expander_paint):
784         (moz_gtk_expander_paint):
785         (moz_gtk_option_menu_paint):
786         (moz_gtk_downarrow_paint):
787         (moz_gtk_dropdown_arrow_paint):
788         (moz_gtk_container_paint):
789         (moz_gtk_toggle_label_paint):
790         (moz_gtk_toolbar_paint):
791         (moz_gtk_toolbar_separator_paint):
792         (moz_gtk_tooltip_paint):
793         (moz_gtk_resizer_paint):
794         (moz_gtk_frame_paint):
795         (moz_gtk_progressbar_paint):
796         (moz_gtk_progress_chunk_paint):
797         (moz_gtk_get_tab_thickness):
798         (moz_gtk_tab_paint):
799         (moz_gtk_tabpanels_paint):
800         (moz_gtk_menu_bar_paint):
801         (moz_gtk_menu_popup_paint):
802         (moz_gtk_menu_separator_paint):
803         (moz_gtk_menu_item_paint):
804         (moz_gtk_menu_arrow_paint):
805         (moz_gtk_check_menu_item_paint):
806         (moz_gtk_window_paint):
807         (moz_gtk_get_widget_border):
808         (moz_gtk_get_dropdown_arrow_size):
809         (moz_gtk_get_toolbar_separator_width):
810         (moz_gtk_get_expander_size):
811         (moz_gtk_get_treeview_expander_size):
812         (moz_gtk_get_menu_separator_height):
813         (moz_gtk_widget_paint):
814         (moz_gtk_shutdown):
815         * platform/gtk/gtkdrawing.h:
816
817 2008-01-27  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
818
819         Reviewed by Alp Toker.
820
821         http://bugs.webkit.org/show_bug.cgi?id=14811
822         [gtk] [request] add a webkit_gtk_page_go_to_history_item function
823
824         Added webkit/gtk webkitwebbackforwardlist and webkitwebhistoryitem
825
826         * WebCore.pro:
827
828 2008-01-27  Matt Perry  <mpComplete@gmail.com>
829
830         Reviewed and tweaked quite a bit by Darin.
831
832         Fix for http://bugs.webkit.org/show_bug.cgi?id=14959
833         No back forward entry added for pages created in javascript
834
835         A new HistoryItem is created for calls to Document::open. Calls to
836         Document::write save the written data to a SharedBuffer that is also
837         stored on the HistoryItem. When the user navigates back to a
838         HistoryItem that has a valid buffer, that data is used for the page
839         content.
840
841         Tests: http/tests/navigation/document-open-adds-history-item.html
842                http/tests/navigation/document-open-delayed-adds-history-item.html
843                http/tests/navigation/document-open-new-window-adds-history-item.html
844                http/tests/navigation/document-open-replace-no-history-item.html
845
846         * bindings/js/JSHTMLDocumentCustom.cpp:
847         (WebCore::JSHTMLDocument::open): Pass a MIME type of either "text/html" or
848         "text/plain" and a boolean for "replace" in rather than always setting replace
849         to true and the MIME type to "text/html".
850
851         * dom/DOMImplementation.cpp:
852         (WebCore::DOMImplementation::createHTMLDocument): Pass in MIME type and
853         replace boolean explicitly, since we don't want to rely on Document::open()'s
854         default.
855
856         * dom/Document.cpp:
857         (WebCore::Document::open): Correctly determine the "replace" boolean.
858         Pass along the MIME type, replace boolean, and shared buffer to the
859         frame loader's didExplicitOpen function.
860         (WebCore::Document::write): Pass MIME type and replace boolean explicitly
861         to the open function so we don't do treat it as replace if you write without
862         an open. Store text written by the script so it can be used later for history.
863         (WebCore::Document::clear): Drop the text written byt he script.
864
865         * dom/Document.h: Added MIME type and replace boolean parameters for open.
866         Had to keep the old version for the sake of DOM bindings. Added the shared
867         buffer used for text written by script.
868
869         * history/HistoryItem.cpp:
870         (WebCore::HistoryItem::HistoryItem): Copy m_substituteData.
871         (WebCore::HistoryItem::substituteData): Added.
872         (WebCore::HistoryItem::setSubstituteData): Added.
873         * history/HistoryItem.h: Added m_substituteData, getter, and setter.
874
875         * loader/FrameLoader.cpp:
876         (WebCore::FrameLoader::didExplicitOpen): Added code to create or update the
877         history item, including attaching the shared buffer that will contain all
878         the data written by script.
879         (WebCore::FrameLoader::load): Added a SubstituteData parameter, passed through
880         when creating the document loader.
881         (WebCore::FrameLoader::reloadAllowingStaleData): Create the document loader
882         with the substitute data from the current history item.
883         (WebCore::FrameLoader::reload): Ditto.
884         (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent): If the current history
885         item has substitute data, then consider the URL from the substitute data
886         rather than the one in the history item itself.
887         (WebCore::FrameLoader::loadItem): Pass in the history item's substitute data.
888         * loader/FrameLoader.h: Added parameters to load and didExplicitOpen.
889
890         * platform/text/CharacterNames.h: Added byteOrderMark, and also added it under
891         its other official name, zeroWidthNoBreakSpace.
892
893         * xml/DOMParser.cpp:
894         (WebCore::DOMParser::parseFromString): Pass in MIME type and replace boolean
895         explicitly, since we don't want to rely on Document::open()'s default.
896         * xml/XMLHttpRequest.cpp:
897         (WebCore::XMLHttpRequest::getResponseXML): Ditto.
898         * xml/XSLTProcessor.cpp:
899         (WebCore::XSLTProcessor::createDocumentFromSource): Ditto.
900
901 2008-01-25  Eric Seidel  <eric@webkit.org>
902
903         Reviewed by Sam and Darin.
904
905         Fire a warning shot in DeprecatedChar's direction.
906
907         Remove DeprecatedChar::isSpace() usage, in preparation for removing DeprecatedChar
908         Remove a needless String -> DeprecatedString -> String conversion for <script> tags
909
910         * css/MediaQueryEvaluator.cpp:
911         (WebCore::parseAspectRatio):
912         * css/SVGCSSParser.cpp:
913         * dom/Position.cpp:
914         (WebCore::Position::leadingWhitespacePosition):
915         (WebCore::Position::trailingWhitespacePosition):
916         * editing/TextIterator.cpp:
917         (WebCore::WordAwareIterator::advance):
918         * html/HTMLFontElement.cpp:
919         (WebCore::parseFontSizeNumber):
920         * html/HTMLTokenizer.cpp:
921         (WebCore::HTMLTokenizer::scriptHandler):
922         (WebCore::HTMLTokenizer::scriptExecution):
923         (WebCore::HTMLTokenizer::notifyFinished):
924         * html/HTMLTokenizer.h:
925         * loader/CachedCSSStyleSheet.cpp:
926         * loader/TextResourceDecoder.cpp:
927         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
928         * platform/mac/ClipboardMac.mm:
929         (WebCore::ClipboardMac::getData):
930         * platform/network/HTTPParsers.cpp:
931         (WebCore::extractMIMETypeFromMediaType):
932         * platform/text/PlatformString.h:
933         * platform/text/StringImpl.cpp:
934         (WebCore::parseLength):
935         (WebCore::StringImpl::stripWhiteSpace):
936         (WebCore::StringImpl::simplifyWhiteSpace):
937         (WebCore::StringImpl::toInt):
938         (WebCore::StringImpl::toInt64):
939         (WebCore::StringImpl::toUInt64):
940         * platform/text/StringImpl.h:
941         (WebCore::isSpaceOrNewline):
942         * rendering/InlineFlowBox.cpp:
943         (WebCore::InlineFlowBox::placeBoxesHorizontally):
944         * rendering/RenderBlock.cpp:
945         (WebCore::RenderBlock::updateFirstLetter):
946         * rendering/bidi.cpp:
947         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
948         * svg/SVGFontFaceElement.cpp:
949         (WebCore::mapAttributeToCSSProperty):
950         * svg/SVGLength.cpp:
951         * svg/SVGStyledElement.cpp:
952         (WebCore::mapAttributeToCSSProperty):
953         * xml/XPathParser.cpp:
954
955 2008-01-25  Stephanie Lewis  <slewis@apple.com>
956
957         Reviewed by Tim.
958
959         expand workaround for <rdar://5695848> to include js files so that the
960         web inspector can work
961
962         * platform/network/cf/ResourceResponseCFNet.cpp:
963         (WebCore::ResourceResponse::doUpdateResourceResponse):
964
965 2008-01-25  Antti Koivisto  <antti@apple.com>
966
967         Reviewed by Adele.
968         
969         (this is for r29798, my commit failed to include the log)
970         
971         Windows fix to match r29773
972         If the media is playing and the load stalls the playback wont restart by seeking backwards.      
973
974         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
975         (WebCore::MediaPlayerPrivate::updateStates):
976
977 2008-01-25  Darin Adler  <darin@apple.com>
978
979         Reviewed by Anders.
980
981         - fix <rdar://problem/5691072> ASSERTION FAILED: isPrepared() when executing an empty statement
982
983         For empty statements, SQLite returns 0 for the statement. We have to cope with that.
984
985         Test: storage/empty-statement.html
986
987         * platform/sql/SQLiteStatement.cpp:
988         (WebCore::sqlite3_prepare16_v2): Added overload so we don't need an #if inside the prepare
989         function.
990         (WebCore::SQLiteStatement::SQLiteStatement): Initialize the m_isPrepared boolean. Removed
991         the code to add a null character to the end of the string; instead we will use
992         charactersWithNullTermination.
993         (WebCore::SQLiteStatement::prepare): Set m_isPrepared based on the error value returned.
994         Use the error value from sqlite3_prepare16_v2, not from lastError().
995         (WebCore::SQLiteStatement::step): Assert that the statement is prepared rather than checking
996         it at runtime. However, in the case where this is called with m_statement of 0, return
997         success rather than an error. That's needed for empty statements.
998         (WebCore::SQLiteStatement::finalize): Use early return idiom for clarity. When there is no
999         statement, return SQLITE_OK instead of calling lastError().
1000         (WebCore::SQLiteStatement::reset): Use early return idiom for clarity. When there is no
1001         statement, return SQLITE_OK rather than SQLITE_ERROR, but assert the statement is prepared.
1002         (WebCore::SQLiteStatement::executeCommand): Adjust the code that does a prepare so that it
1003         will work for empty statements. Do we really need to allow calling this without prepare?
1004         It would be simpler to just be able to assert that it's prepared.
1005         (WebCore::SQLiteStatement::returnsAtLeastOneResult): Ditto.
1006         (WebCore::SQLiteStatement::bindBlob): Added some assertions. Return SQLITE_ERROR if this
1007         is called with m_statement of 0 (should not be possible without assertions firing first).
1008         Return the actual error code rather than lastError().
1009         (WebCore::SQLiteStatement::bindText): Ditto. Also simplified the special case for empty
1010         strings, since it requires any non-null pointer, not a pointer to a global zero character.
1011         (WebCore::SQLiteStatement::bindInt64): Ditto.
1012         (WebCore::SQLiteStatement::bindDouble): Ditto.
1013         (WebCore::SQLiteStatement::bindNull): Ditto.
1014         (WebCore::SQLiteStatement::bindValue): Moved default case out of the switch to take
1015         advantage of the gcc compiler warning for unhandled enum values in a switch.
1016         (WebCore::SQLiteStatement::bindParameterCount): Added assertion and code to handle the
1017         empty statement case.
1018         (WebCore::SQLiteStatement::columnCount): Added assertion and changed the code to use
1019         the early-return idiom.
1020         (WebCore::SQLiteStatement::getColumnName): Removed getColumnName16 -- we always use 16-bit
1021         characters and have no reason to ever use the 8-bit function. Added assertions about the
1022         passed-in column number. It's a little strange that this function checks the column number
1023         for too-large column numbers, but not for negative ones. I didn't change that for now.
1024         (WebCore::SQLiteStatement::getColumnText): Ditto.
1025         (WebCore::SQLiteStatement::getColumnDouble): Ditto.
1026         (WebCore::SQLiteStatement::getColumnInt): Ditto.
1027         (WebCore::SQLiteStatement::getColumnInt64): Ditto.
1028         (WebCore::SQLiteStatement::getColumnBlobAsVector): Ditto.
1029         (WebCore::SQLiteStatement::getColumnBlob): Tightened up function a bit, including use of
1030         the early-return idiom and replacing the multiple "size = 0" with a single one at the
1031         start of the function.
1032         (WebCore::SQLiteStatement::returnTextResults): Added a failure case when the prepare
1033         call doesn't work. Cleared the vector earlier to make the failure code simpler. Moved
1034         the declaration of the result boolean down lower to make it clearer what it's for.
1035         Changed use of lastError() to call on the database, to make it clearer that there's
1036         no per-statement last error kept around. It'd be even better to not use lastError() here.
1037         (WebCore::SQLiteStatement::returnIntResults): Ditto.
1038         (WebCore::SQLiteStatement::returnInt64Results): Ditto.
1039         (WebCore::SQLiteStatement::returnDoubleResults): Ditto.
1040         (WebCore::SQLiteStatement::isExpired): Changed to use || rather than ?: because I think
1041         it's slightly easier to read that way.
1042
1043         * platform/sql/SQLiteStatement.h: Removed unneeded includes and forward declarations.
1044         Also removed unnneeded functions isPrepared, getColumnName16, getColumnText16,
1045         returnTextResults16, lastError, and lastErrorMsg. Changed prepareAndStep so that it
1046         checks the result of prepare before callling step. Added a debug-only m_isPrepared boolean.
1047
1048         * loader/icon/IconDatabase.cpp:
1049         (WebCore::IconDatabase::checkIntegrity): Remove 16 suffix from text-related function names.
1050         (WebCore::IconDatabase::performURLImport): Ditto.
1051         (WebCore::IconDatabase::pruneUnretainedIcons): Ditto.
1052         * platform/sql/SQLiteDatabase.cpp:
1053         (WebCore::SQLiteDatabase::clearAllTables): Ditto.
1054         * storage/Database.cpp:
1055         (WebCore::retrieveTextResultFromDatabase): Ditto.
1056         (WebCore::Database::performGetTableNames): Ditto.
1057         * storage/DatabaseTracker.cpp:
1058         (WebCore::DatabaseTracker::fullPathForDatabase): Ditto.
1059         (WebCore::DatabaseTracker::populateOrigins): Ditto.
1060         (WebCore::DatabaseTracker::databaseNamesForOrigin): Ditto.
1061         (WebCore::DatabaseTracker::addDatabase): Ditto.
1062         * storage/SQLStatement.cpp:
1063         (WebCore::SQLStatement::execute): Ditto.
1064
1065         * platform/sql/SQLiteDatabase.h: Removed unneeded includes.
1066         * storage/SQLResultSet.h: Ditto.
1067         * storage/SQLResultSetRowList.h: Ditto.
1068
1069 2008-01-25  Adele Peterson  <adele@apple.com>
1070
1071         Reviewed by Sam.
1072
1073         Fix for <rdar://problem/5679452> Finish tweaking layout/alignment of media controls slider to match QuickTime plug-in
1074
1075         * css/html4.css: Add horizontal padding to the media slider.
1076         * rendering/RenderSlider.cpp:
1077         (WebCore::HTMLSliderThumbElement::defaultEventHandler): Replace use of absoluteBoundingBox() with width() and height()
1078         (WebCore::RenderSlider::positionForOffset): ditto. Also, use the trackSize() for the maximum offset.
1079         (WebCore::RenderSlider::layout):  Use contentWidth() and contentHeight() to take padding into account.
1080         (WebCore::RenderSlider::trackSize): ditto.
1081
1082 2008-01-24  Adam Roben  <aroben@apple.com>
1083
1084         Better fix for Bug 16996
1085
1086         Rubberstamped by Mitz.
1087
1088         * loader/CachedFont.cpp:
1089         (WebCore::CachedFont::ensureCustomFontData): Don't call
1090         createFontCustomPlatformData if m_data is null.
1091         * platform/graphics/gtk/FontCustomPlatformData.cpp:
1092         (WebCore::createFontCustomPlatformData): Added an assertion.
1093         * platform/graphics/mac/FontCustomPlatformData.cpp:
1094         (WebCore::createFontCustomPlatformData): Ditto.
1095         * platform/graphics/qt/FontCustomPlatformData.cpp:
1096         (WebCore::createFontCustomPlatformData): Ditto.
1097         * platform/graphics/win/FontCustomPlatformData.cpp:
1098         (WebCore::createFontCustomPlatformData): Ditto.
1099
1100 2008-01-24  Adam Roben  <aroben@apple.com>
1101
1102         Fix Bug 16996: Crash in createFontCustomPlatformData when loading
1103         0-byte font via @font-face
1104
1105         <http://bugs.webkit.org/show_bug.cgi?id=16996>
1106
1107         Reviewed by Hyatt.
1108
1109         Test: fast/loader/font-face-empty.html
1110
1111         * platform/graphics/win/FontCustomPlatformData.cpp:
1112         (WebCore::createFontCustomPlatformData): Null-check the buffer
1113         parameter.
1114
1115 2008-01-24  Jon Honeycutt  <jhoneycutt@apple.com>
1116
1117         Reviewed by Anders.
1118
1119         <rdar://problem/5588807> Crash in Flash when destroying plug-in (found
1120         using yahoo beta mail)
1121
1122         Flash can dereference NULL in the call to NPP_URLNotify if a request
1123         made with NPN_PostURLNotify fails before NPP_NewStream is called.
1124
1125         Work around this by creating a quirk, PluginQuirkFlashURLNotifyBug, and
1126         checking for this quirk before calling NPP_URLNotify for any request
1127         made with NPN_PostURLNotify. If the quirk is present, call NPP_NewStream
1128         and NPP_DestroyStream before calling NPP_URLNotify.
1129
1130         * WebCore.vcproj/WebCore.vcproj:
1131         * plugins/PluginQuirkSet.h: Added. Moved quirks out of PluginViewWin so
1132         PluginViewWin and PluginStream could share it. Created a class,
1133         PluginQuirkSet, to store plug-in quirks
1134         (WebCore::):
1135         (WebCore::PluginQuirkSet::PluginQuirkSet):
1136         (WebCore::PluginQuirkSet::add):
1137         (WebCore::PluginQuirkSet::contains):
1138         * plugins/PluginStream.cpp:
1139         (WebCore::PluginStream::PluginStream): Copy the PluginQuirkSet for this
1140         plug-in
1141         (WebCore::PluginStream::destroyStream): Check for the FlashURLNotifyBug
1142         quirk
1143         * plugins/PluginStream.h:
1144         * plugins/win/PluginViewWin.cpp:
1145         (WebCore::PluginViewWin::performRequest): Pass the quirks when creating
1146         the PluginStream
1147         (WebCore::PluginViewWin::didReceiveResponse): Same
1148         (WebCore::PluginViewWin::wndProc): Use add / contains instead of
1149         bit ops
1150         (WebCore::PluginViewWin::userAgent): Same
1151         (WebCore::PluginViewWin::invalidateRect): Same
1152         (WebCore::PluginViewWin::~PluginViewWin): Same
1153         (WebCore::PluginViewWin::determineQuirks): Same
1154         (WebCore::PluginViewWin::setParameters): Same
1155         (WebCore::PluginViewWin::PluginViewWin): Same
1156         (WebCore::PluginViewWin::init): Same
1157         (WebCore::PluginViewWin::setCallingPlugin): Same
1158         * plugins/win/PluginViewWin.h:
1159
1160 2008-01-24  David Hyatt  <hyatt@apple.com>
1161
1162         http://bugs.webkit.org/show_bug.cgi?id=16982
1163
1164         Make sure to make <head> the current block if it is created before a <body> already exists.
1165
1166         Reviewed by Dan
1167
1168         * html/HTMLParser.cpp:
1169         (WebCore::HTMLParser::createHead):
1170
1171 2008-01-24  Alexey Proskuryakov  <ap@webkit.org>
1172
1173         http://bugs.webkit.org/show_bug.cgi?id=16993
1174         <rdar://problem/5704331> REGRESSION: Loading page leads to many unexpected redirections
1175
1176         Rolled out r29590, which was not a correct fix for <rdar://problem/5692566>.
1177
1178         * loader/FrameLoader.cpp:
1179         (WebCore::FrameLoader::clear):
1180
1181 2008-01-24  Antti Koivisto  <antti@apple.com>
1182
1183         Reviewed by Adam.
1184         
1185         If the media is playing and the load stalls the playback wont restart by seeking backwards.
1186         
1187         We should be in CAN_PLAY state if the current time is less than the maximum loaded time. Rate 
1188         tricks were for streaming case and are not necessary now since that is now disabled.
1189         
1190         Windows patch coming separately.
1191
1192         Test: http/tests/media/video-play-stall-seek.html
1193
1194         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1195         (WebCore::MediaPlayerPrivate::updateStates):
1196
1197 2008-01-24  Antti Koivisto  <antti@apple.com>
1198
1199         Reviewed by Adam.
1200
1201         Fix <rdar://problem/5684815>
1202         After navigating back to the page that contains a <audio> that has been muted, the audio is still heard
1203         
1204         - get rid of the separate muted state in MediaPlayer, maintain the state in the cross platform code only
1205         - remove volumeChanged() callbacks from HTMLMediaElement and OS X MediaPlayer, they were not used for anything
1206         - rename updateMediaPlayer -> updatePlayState which tells more about what it actually does
1207
1208         * html/HTMLMediaElement.cpp:
1209         (WebCore::HTMLMediaElement::load):
1210         (WebCore::HTMLMediaElement::setReadyState):
1211         (WebCore::HTMLMediaElement::play):
1212         (WebCore::HTMLMediaElement::pause):
1213         (WebCore::HTMLMediaElement::setVolume):
1214         (WebCore::HTMLMediaElement::setMuted):
1215         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
1216         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
1217         (WebCore::HTMLMediaElement::updateVolume):
1218         (WebCore::HTMLMediaElement::updatePlayState):
1219         (WebCore::HTMLMediaElement::setPausedInternal):
1220         * html/HTMLMediaElement.h:
1221         * platform/graphics/MediaPlayer.cpp:
1222         (WebCore::MediaPlayer::MediaPlayer):
1223         * platform/graphics/MediaPlayer.h:
1224         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1225         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1226         (WebCore::MediaPlayerPrivate::createQTMovie):
1227         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
1228         * platform/graphics/win/QTMovieWin.cpp:
1229         * platform/graphics/win/QTMovieWin.h:
1230
1231 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1232
1233         Reviewed by Simon.
1234
1235         * Fix "QObject::startTimer: QTimer can only be used with threads started with QThread"
1236         * The JSC GCController gets automatically destructed on application exit, it will stop
1237         its timer and we try to schedule the next timer. Now the GCController can get destructed
1238         after our QApplication is gone. This will trigger the above warning, we can avoid this
1239         by checking if our qApp is still around.
1240
1241         * platform/qt/SharedTimerQt.cpp:
1242         (WebCore::setSharedTimerFireTime):
1243
1244 2008-01-24  Morten Johan Sørvig  <msorvig@trolltech.com>
1245
1246         Reviewed by Simon.
1247
1248         Qt/Mac: Make sure the scrollbars does not overlap the grow box.
1249
1250         When showing only one scrollbar we need to move it so it doesn't overlap the
1251         grow box. This is similar to the code in QAbstractScrollArea.
1252
1253
1254         * platform/qt/ScrollViewQt.cpp:
1255         (WebCore::ScrollView::updateScrollbars):
1256
1257 2008-01-15  Michael Goddard  <michael.goddard@trolltech.com>
1258
1259         Reviewed by Darin.
1260
1261         While parsing -webkit-border-image, store
1262         the border widths as naked pointers rather
1263         than as OwnPtrs, since they point to the
1264         middle of an array.
1265
1266         Test: fast/css/border-image-crash.html
1267
1268         * css/CSSParser.cpp:
1269
1270 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1271
1272         Reviewed by Simon.
1273
1274         * Attempt to fix showing of popup again after a popup has been shown but
1275         the user did not select any item (e.g. clicked outside of the popup)
1276         * Keep track of the popup status using the virtuals showPopup and hidePopup
1277         and do not go into recursion when hiding a popup.
1278
1279         * platform/qt/QWebPopup.cpp:
1280         (WebCore::QWebPopup::showPopup):
1281         (WebCore::QWebPopup::hidePopup):
1282         * platform/qt/QWebPopup.h:
1283
1284 2008-01-24  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1285
1286         Reviewed by Simon.
1287
1288         * Assert the presence of the PopupMenuClient
1289
1290         * platform/qt/QWebPopup.cpp:
1291         (WebCore::QWebPopup::QWebPopup):
1292         (WebCore::QWebPopup::hideEvent):
1293         (WebCore::QWebPopup::activeChanged):
1294
1295 2008-01-23  David Kilzer  <ddkilzer@apple.com>
1296
1297         <rdar://problem/5702947> WebCore: CGContextDrawPDFDocument will be deprecated
1298
1299         Reviewed by Darin.
1300
1301         No test cases added since there is no change in behavior.
1302
1303         * platform/graphics/cg/PDFDocumentImage.cpp:
1304         (WebCore::PDFDocumentImage::draw): Replace CGContextDrawPDFDocument() with
1305         calls to CG methods that perform the equivalent work.
1306
1307 2008-01-23  Antti Koivisto  <antti@apple.com>
1308
1309         Reviewed by Hyatt, Adele.
1310
1311         Timers for media controls keep running when the page is in the page cache.
1312         
1313         Stop timers in RenderMedia and get rid of the controls tree when the page goes to the cache. 
1314
1315         * html/HTMLMediaElement.cpp:
1316         (WebCore::HTMLMediaElement::HTMLMediaElement):
1317         (WebCore::HTMLMediaElement::willSaveToCache):
1318         (WebCore::HTMLMediaElement::didRestoreFromCache):
1319         * html/HTMLMediaElement.h:
1320         (WebCore::HTMLMediaElement::inPageCache):
1321         * rendering/RenderMedia.cpp:
1322         (WebCore::RenderMedia::updateControls):
1323
1324 2008-01-23  Antti Koivisto  <antti@apple.com>
1325
1326         Reviewed by Adam.
1327
1328         Video that had already played to the end would start playing (from beginning) on back/forward navigation.
1329         
1330         Use setPausedInternal() instead of pause(). This avoid generating pause/play events and matches specification text.
1331
1332         * html/HTMLMediaElement.cpp:
1333         (WebCore::HTMLMediaElement::willSaveToCache):
1334
1335 2008-01-23  Alexey Proskuryakov  <ap@webkit.org>
1336
1337         Reviewed by Darin.
1338
1339         <rdar://problem/4200075> Missing support for accented chars in mailto forms
1340
1341         With some combinations of form parameters, this was resulting in regressed behavior.
1342
1343         Tests: fast/forms/mailto/get-non-ascii-text-plain-latin-1.html
1344                fast/forms/mailto/post-text-plain-with-accept-charset.html
1345                fast/forms/mailto/post-text-plain.html
1346
1347         * html/HTMLFormElement.cpp:
1348         (WebCore::HTMLFormElement::formData): Ignore accept-charset for mailto forms, which are always
1349         encoded as UTF-8.
1350         (WebCore::HTMLFormElement::isMailtoForm): Added.
1351         (WebCore::HTMLFormElement::dataEncoding): Added (factored out from formData).
1352         (WebCore::HTMLFormElement::submit): When round-tripping in text/plain case, use utf-8 encoding.
1353         * html/HTMLFormElement.h: Added a isMailtoForm() function. It may be a bit unfortunate that
1354         its result is calculated repeatedly, but this doesn't seem to be anywhere near hot code.
1355
1356 2008-01-22  Justin Garcia  <justin.garcia@apple.com>
1357
1358         Reviewed by Alice Liu.
1359
1360         <rdar://problem/5658727> Undo/redo for pasted or typed text in yahoo mail becomes disabled after one round of being selected
1361
1362         * rendering/RenderTextControl.cpp:
1363         (WebCore::RenderTextControl::updateFromElement): If value == text() and
1364         m_innerText is empty, then value and text() are "". In that case both DOM 
1365         mutations are no-ops and there is no reason to clear the Undo stack.
1366
1367 2008-01-23  Steve Falkenburg  <sfalken@apple.com>
1368
1369         <rdar://problem/5698732> Copyright strings should include 2008
1370
1371         Reviewed by Sam.
1372
1373         * WebCore.vcproj/QTMovieWin.rc:
1374
1375 2008-01-23  Steve Falkenburg  <sfalken@apple.com>
1376
1377         <rdar://problem/5699509> Allow file upload dialog to be localized.
1378
1379         Reviewed by Darin.
1380
1381         * platform/LocalizedStrings.h:
1382         * platform/win/FileChooserWin.cpp:
1383         (WebCore::FileChooser::openFileChooser):
1384
1385 2008-01-23  Adam Roben  <aroben@apple.com>
1386
1387         Fix behavior of type-to-select in <select> menus
1388
1389         In r27825 we started posting both a WM_KEYDOWN and WM_CHAR message
1390         whenever a key was pressed in the dropdown menu. However, since posted
1391         messages go through TranslateMessage, the WM_KEYDOWN was generating
1392         another WM_CHAR message, so two WM_CHAR messages in a row would reach
1393         the WebView. This caused the searching to happen twice for each key,
1394         so typing "dog" would search for "ddoogg".
1395
1396         Reviewed by Darin.
1397
1398         * platform/win/PopupMenuWin.cpp:
1399         (WebCore::PopupWndProc): Repost the WM_KEYDOWN message to the WebView.
1400         This is will generate a WM_CHAR message which will trigger the
1401         type-to-select behavior. This is very similar to our behavior prior to
1402         r27825, except that we're now calling PostMessage instead of
1403         SendMessage.
1404
1405 2008-01-23  Alp Toker  <alp@atoker.com>
1406
1407         Rubber-stamped by Mark Rowe.
1408
1409         Remove whitespace after -I in automake include lists.
1410
1411         * GNUmakefile.am:
1412
1413 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1414
1415         * Rubber stamped by Simon
1416
1417         * Load images incrementally. This will show warnings on the console
1418         and we want to fix them for Qt4.4. If that happens we have to remove
1419         the comment from the enum inside the ImageDecoderQt.cpp
1420
1421         * platform/graphics/qt/ImageDecoderQt.cpp:
1422         (WebCore::ImageDecoderQt::setData):
1423
1424 2008-01-23  Lars Knoll  <lars@trolltech.com>
1425
1426         Reviewed by Holger Freyther <holger.freyther@trolltech.com>.
1427
1428         Fix rendering of the Scrollbar as well as mouse handling for some styles.
1429
1430         The QStyle expects that that painter is set up to clip to the scrollbar bounds
1431         and some of the styles seem to paint somewhat outside of these bounds. Clipping to
1432         the scrollbar bounds before drawing removes some artifacts.
1433
1434         Also set m_opt.rect.topLeft to (0/0) in the mouse handlers. Fixes some issues with
1435         the oxygen style.
1436
1437
1438         * platform/qt/PlatformScrollBarQt.cpp:
1439         (WebCore::PlatformScrollbar::paint):
1440         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
1441         (WebCore::PlatformScrollbar::handleMousePressEvent):
1442
1443 2008-01-23  Michael Brasser  <michael.brasser@trolltech.com>
1444
1445         Reviewed by Simon.
1446
1447         Rendering fixes for Qtopia.
1448
1449         Make the focus ring work with line breaks (until we have QPainterPath::simplify) and
1450         call QStyle with better arguments when painting themed elements.
1451
1452         * platform/graphics/qt/GraphicsContextQt.cpp:
1453         (WebCore::GraphicsContext::drawFocusRing):
1454         * platform/qt/RenderThemeQt.cpp:
1455         (WebCore::RenderThemeQt::paintButton):
1456         (WebCore::RenderThemeQt::applyTheme):
1457
1458 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1459
1460         Reviewed by Simon.
1461
1462         * FormData::flatten does not include to be uploaded files. Create our own QIODevice
1463         for the QNetworkAccessManager and feed the complete content of the FormData* to
1464         the (HTTP) backend.
1465         * Try to optimize the ::readData implementation to fill the buffer as best as possible
1466
1467         * platform/network/qt/QNetworkReplyHandler.cpp:
1468         (WebCore::FormDataIODevice::FormDataIODevice):
1469         (WebCore::FormDataIODevice::~FormDataIODevice):
1470         (WebCore::FormDataIODevice::moveToNextElement):
1471         (WebCore::FormDataIODevice::readData):
1472         (WebCore::FormDataIODevice::writeData):
1473         (WebCore::FormDataIODevice::setParent):
1474         (WebCore::FormDataIODevice::isSequential):
1475         (WebCore::FormDataIODevice::slotFinished):
1476         (WebCore::QNetworkReplyHandler::start):
1477         * platform/network/qt/QNetworkReplyHandler.h:
1478
1479 2008-01-23  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
1480
1481         Reviewed by Simon.
1482
1483         * Coding-Style fixes
1484
1485         * platform/network/qt/QNetworkReplyHandler.cpp:
1486         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
1487
1488 2008-01-23  Michael Brasser  <michael.brasser@trolltech.com>
1489
1490         Reviewed by Simon.
1491
1492         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.
1493
1494         * platform/qt/QWebPopup.cpp:
1495         (WebCore::QWebPopup::QWebPopup):
1496
1497 2008-01-23  Simon Hausmann  <hausmann@webkit.org>
1498
1499         Reviewed by Lars.
1500
1501         Implemented FrameLoaderClient::startDownload() and FrameLoaderClient::download().
1502         
1503         Added two signals to QWebPage to handle downloading of links and handling of
1504         unsupported content.
1505         
1506
1507         * platform/network/qt/QNetworkReplyHandler.cpp:
1508         (WebCore::QNetworkReplyHandler::release):
1509         * platform/network/qt/QNetworkReplyHandler.h:
1510
1511 2008-01-22  Dan Bernstein  <mitz@apple.com>
1512
1513         Reviewed by Adele Peterson.
1514
1515         - fix http://bugs.webkit.org/show_bug.cgi?id=16905
1516           <rdar://problem/5692407> REGRESSION (3.0.4-TOT): "menu" pseudocolor is badly chosen
1517
1518         The regression test for this is fast/css/css2-system-color.html which
1519         is currently disabled.
1520
1521         * rendering/RenderThemeMac.mm:
1522         (WebCore::menuBackgroundColor): Added. Uses HIThemeDrawMenuBackground
1523         to draw the menu item background into a bitmap graphics context and
1524         returns the color of the pixel at (0, 0).
1525         (WebCore::RenderThemeMac::systemColor): Changed to call
1526         menuBackgroundColor for the CSS2 menu color.
1527
1528 2008-01-22  Darin Adler  <darin@apple.com>
1529
1530         Reviewed by Oliver Hunt.
1531
1532         - turn full repainting back on for <canvas> until we get incremental
1533           repaint working properly
1534
1535         Ollie and I came up with a plan for testing this, but for now we should
1536         just fall back on the "repaint everything" behavior we have always had.
1537
1538         * html/HTMLCanvasElement.cpp:
1539         (WebCore::HTMLCanvasElement::willDraw): Just call repaint.
1540
1541 2008-01-22  Alp Toker  <alp@atoker.com>
1542
1543         GTK+/qmake build fix.
1544
1545         * WebCore.pro:
1546
1547 2008-01-22  Adam Roben  <aroben@apple.com>
1548
1549         Add HTMLFrameOwnerElement::scrollingMode
1550
1551         This new virtual method is overridden by HTMLFrameElementBase to
1552         provide the scrolling mode set on the frame or iframe element. Object
1553         elements always have scrolling=auto, so there's no need to override
1554         this method for HTMLPlugInElement.
1555
1556         Reviewed by Hyatt.
1557
1558         * html/HTMLFrameElementBase.h: Declare scrollingMode as virtual.
1559         * html/HTMLFrameOwnerElement.h:
1560         (WebCore::HTMLFrameOwnerElement::scrollingMode): Added.
1561
1562 2008-01-22  David Hyatt  <hyatt@apple.com>
1563
1564         Fix for <rdar://problem/5698481> REGRESSION: Web Inspector source view gutter double divider and no padding
1565
1566         Now that cellpadding cascades properly on <td>s, we need to make the view source padding rules in the user
1567         agent sheet have !important in order to override author settings.
1568
1569         Reviewed by Tim
1570
1571         * css/view-source.css:
1572
1573 2008-01-22  Nikolas Zimmermann  <zimmermann@kde.org>
1574
1575         Reviewed by Alp.
1576
1577         Allow to use SVGPaintServerSolid without RenderObject/RenderStyle. Used later to draw SVG Fonts in HTML.
1578
1579         * svg/graphics/SVGPaintServer.cpp:
1580         (WebCore::SVGPaintServer::sharedSolidPaintServer):
1581         * svg/graphics/SVGPaintServer.h:
1582         * svg/graphics/cg/SVGPaintServerCg.cpp:
1583         (WebCore::SVGPaintServer::renderPath):
1584         (WebCore::SVGPaintServer::fillPath):
1585         (WebCore::SVGPaintServer::clipToFillPath):
1586         * svg/graphics/cg/SVGPaintServerSolidCg.cpp:
1587         (WebCore::SVGPaintServerSolid::setup):
1588
1589 2008-01-22  Nikolas Zimmermann  <zimmermann@kde.org>
1590
1591         Reviewed by Alp.
1592
1593         Initialize missing variables, m_lineGap / m_lineSpacing.
1594         Only noticeable when trying to render HTML text using SVG Fonts (which is not possible with trunk, but with my local version).
1595
1596         * platform/graphics/SimpleFontData.cpp:
1597         (WebCore::SimpleFontData::SimpleFontData):
1598
1599 2008-01-22  Alp Toker  <alp@atoker.com>
1600
1601         Reviewed by Nikolas.
1602
1603         Fix Cairo SVG fonts following changes in r29700.
1604
1605         Set the font description's details as needed in FontPlatformData and
1606         eliminate GraphicsContext::setPlatformFont() since it was redundant
1607         and assumed all fonts were Cairo fonts.
1608
1609         * platform/graphics/GraphicsContext.cpp:
1610         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1611         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1612         (WebCore::FontPlatformData::FontPlatformData):
1613
1614 2008-01-22  Dan Bernstein  <mitz@apple.com>
1615  
1616          Reviewed by Eric.
1617  
1618          - fix http://bugs.webkit.org/show_bug.cgi?id=16967
1619            <rdar://problem/5699344> Reproducible crash when navigating back to a page using SVG fonts
1620  
1621          Test: svg/custom/font-platformDestroy-crash.svg
1622  
1623          * platform/graphics/SimpleFontData.cpp:
1624          (WebCore::SimpleFontData::~SimpleFontData): Changed to call
1625          platformDestroy() only if platformInit() was called from the
1626          constructor.
1627
1628 2008-01-22  Lars Knoll  <lars@trolltech.com>
1629
1630         Reviewed by Simon.
1631
1632         cleanup the CookieJarQt implementation and implement cookiesEnabled.
1633
1634         * platform/qt/CookieJarQt.cpp:
1635         (WebCore::cookieJar):
1636         (WebCore::setCookies):
1637         (WebCore::cookies):
1638         (WebCore::cookiesEnabled):
1639
1640 2008-01-22  Lars Knoll  <lars@trolltech.com>
1641
1642         Reviewed by Simon.
1643
1644         Ported the font implementation to use the new QFont features of Qt 4.4.
1645         
1646
1647         * platform/graphics/Font.h:
1648         (WebCore::Font::setWordSpacing):
1649         (WebCore::Font::setLetterSpacing):
1650         (WebCore::Font::font):
1651         (WebCore::Font::):
1652         * platform/graphics/qt/FontQt.cpp:
1653         (WebCore::Font::Font):
1654         (WebCore::Font::setWordSpacing):
1655         (WebCore::Font::setLetterSpacing):
1656         (WebCore::qstring):
1657         (WebCore::setupLayout):
1658         (WebCore::Font::drawText):
1659         (WebCore::Font::width):
1660         (WebCore::Font::floatWidth):
1661         (WebCore::Font::offsetForPosition):
1662         (WebCore::Font::selectionRectForText):
1663         (WebCore::generateComponents):
1664         (WebCore::cursorToX):
1665         (WebCore::Font::~Font):
1666         (WebCore::Font::operator=):
1667         (WebCore::Font::operator==):
1668         (WebCore::Font::update):
1669
1670 2008-01-21  Eric Seidel  <eric@webkit.org>
1671
1672         Reviewed by Nikolas & Oliver.
1673         
1674         Tested by svg/custom/svg-features.html
1675         
1676         * dom/DOMImplementation.cpp:
1677         (WebCore::isSVG10Feature): use ENABLE(SVG_*) conditionals
1678         (WebCore::isSVG11Feature): use ENABLE(SVG_*) conditionals
1679
1680 2008-01-21  Geoffrey Garen  <ggaren@apple.com>
1681
1682         Reviewed by Maciej Stachowiak.
1683
1684         Adapted WebCore to the fix for http://bugs.webkit.org/show_bug.cgi?id=16909
1685         REGRESSION: Amazon.com crash (ActivationImp)
1686
1687         * bindings/js/kjs_proxy.cpp:
1688         (WebCore::KJSProxy::~KJSProxy): No convenient way to make this assertion
1689         anymore. (It wasn't firing for anyone, anyway, so it's no big loss.)
1690
1691         * bindings/objc/WebScriptObject.mm:
1692         (+[WebScriptObject throwException:]): Use the ExecState stack, instead
1693         of currentExec.
1694         (-[WebScriptObject setException:]): ditto. Also, a slight change in
1695         behavior: If no ExecStates are active, we no longer throw an exception
1696         in the global ExecState. The JavaScriptCore ChangeLog explains why.
1697         This also matches the behavior of +throwException.
1698
1699 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1700
1701         Not reviewed. Try to fix Qt build, after the rmdir() fixes.c
1702
1703         * platform/graphics/qt/SimpleFontDataQt.cpp:
1704         (WebCore::SimpleFontData::SimpleFontData):
1705
1706 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1707
1708         Not reviewed. Another Wx build fix.
1709
1710         * platform/graphics/wx/FontWx.cpp:
1711         (WebCore::Font::drawGlyphs):
1712
1713 2008-01-21  Darin Adler  <darin@apple.com>
1714
1715         - try to fix Qt build
1716
1717         * platform/qt/FileSystemQt.cpp:
1718         (WebCore::deleteEmptyDirectory): QDir::root().rmdir() instead of QDir::rmdir().
1719
1720 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1721
1722         Not reviewed. Yet another win/gtk build fix.
1723
1724         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1725         (WebCore::FontPlatformData::FontPlatformData):
1726         * platform/graphics/win/FontWin.cpp:
1727         (WebCore::Font::drawGlyphs):
1728
1729 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1730
1731         Not reviewed. Another build fix for Gtk/Linux & Wx/Mac.
1732
1733         * platform/graphics/SimpleFontData.cpp:
1734         (WebCore::SimpleFontData::SimpleFontData):
1735
1736 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1737
1738         Not reviewed. Build fix for Qt/Gtk & Wx.
1739
1740         * css/CSSFontSelector.cpp:
1741         * platform/graphics/SegmentedFontData.cpp:
1742         (WebCore::SegmentedFontData::isSVGFont): Remove SVG_FONTS block, it's a pure virtual function in the base class.
1743         * platform/graphics/SegmentedFontData.h:
1744
1745 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1746
1747         Not reviewed. Build fix for ports that don't build SVG: wx.
1748
1749         * css/CSSFontFaceSource.h: Wrap include in ENABLE(SVG_FONTS) blocks.
1750         * css/CSSFontFaceSrcValue.h: Ditto.
1751
1752 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1753
1754         Not reviewed. Build fix for Qt/Gtk.
1755
1756         * platform/graphics/SimpleFontData.h:
1757         (WebCore::SimpleFontData::svgFontData):
1758         (WebCore::SimpleFontData::isSVGFont):
1759
1760 2008-01-21  Nikolas Zimmermann  <zimmermann@kde.org>
1761
1762         Reviewed by Eric. Older parts reviewed by Dan.
1763
1764         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16880 (SVGCSSFontFace should die, instead integrate within the FontCache.)
1765         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16784 (In-document fonts work only as the first child to font-face-src)
1766
1767         Proper integration of SVG Fonts within the existing custom font concept, removing the need for a custom SVGCSSFontFace.
1768         Integrate within the CSSFontFaceSource logic for caching support, as well as the framework for external SVG Fonts.
1769
1770         Proper handling of missing glyphs, using <missing-glyph> element. If that is not specified in a font, fallback to non-SVG font rendering.
1771
1772         * GNUmakefile.am:
1773         * WebCore.pro:
1774         * WebCore.vcproj/WebCore.vcproj:
1775         * WebCore.xcodeproj/project.pbxproj:
1776         * css/CSSFontFaceSource.cpp:
1777         (WebCore::CSSFontFaceSource::getFontData):
1778         * css/CSSFontFaceSource.h:
1779         (WebCore::CSSFontFaceSource::svgFontFaceElement):
1780         (WebCore::CSSFontFaceSource::setSVGFontFaceElement):
1781         * css/CSSFontFaceSrcValue.h:
1782         (WebCore::CSSFontFaceSrcValue::m_isLocal):
1783         (WebCore::CSSFontFaceSrcValue::~CSSFontFaceSrcValue):
1784         (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
1785         (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement):
1786         * css/CSSFontSelector.cpp:
1787         (WebCore::CSSFontSelector::addFontFaceRule):
1788         * css/SVGCSSFontFace.cpp: Removed.
1789         * css/SVGCSSFontFace.h: Removed.
1790         * platform/graphics/Font.cpp:
1791         (WebCore::Font::ascent):
1792         (WebCore::Font::descent):
1793         (WebCore::Font::lineSpacing):
1794         (WebCore::Font::xHeight):
1795         (WebCore::Font::fontSelector):
1796         * platform/graphics/Font.h:
1797         * platform/graphics/FontData.h:
1798         * platform/graphics/SegmentedFontData.cpp:
1799         (WebCore::SegmentedFontData::isSVGFont):
1800         * platform/graphics/SegmentedFontData.h:
1801         * platform/graphics/SimpleFontData.cpp:
1802         (WebCore::SimpleFontData::SimpleFontData):
1803         * platform/graphics/SimpleFontData.h:
1804         (WebCore::SimpleFontData::ascent):
1805         (WebCore::SimpleFontData::descent):
1806         (WebCore::SimpleFontData::lineSpacing):
1807         (WebCore::SimpleFontData::lineGap):
1808         (WebCore::SimpleFontData::xHeight):
1809         (WebCore::SimpleFontData::isSVGFont):
1810         (WebCore::SimpleFontData::svgFontData):
1811         * platform/graphics/gtk/FontPlatformData.h:
1812         (WebCore::FontPlatformData::size):
1813         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1814         (WebCore::FontPlatformData):
1815         * platform/graphics/mac/FontPlatformData.h:
1816         (WebCore::FontPlatformData::FontPlatformData):
1817         (WebCore::FontPlatformData::size):
1818         * platform/graphics/win/FontPlatformData.h:
1819         * platform/graphics/win/FontPlatformDataWin.cpp:
1820         (WebCore::FontPlatformData::FontPlatformData):
1821         * rendering/RenderSVGText.cpp:
1822         (WebCore::RenderSVGText::relativeBBox):
1823         * svg/SVGFont.cpp:
1824         (WebCore::convertEmUnitToPixel):
1825         (WebCore::isCompatibleGlyph):
1826         (WebCore::svgFontAndFontFaceElementForFontData):
1827         (WebCore::SVGTextRunWalker::SVGTextRunWalker):
1828         (WebCore::SVGTextRunWalker::walk):
1829         (WebCore::floatWidthUsingSVGFontCallback):
1830         (WebCore::floatWidthMissingGlyphCallback):
1831         (WebCore::floatWidthOfSubStringUsingSVGFont):
1832         (WebCore::drawTextUsingSVGFontCallback):
1833         (WebCore::drawTextMissingGlyphCallback):
1834         (WebCore::Font::drawTextUsingSVGFont):
1835         * svg/SVGFontData.cpp: Added.
1836         (WebCore::SVGFontData::SVGFontData):
1837         (WebCore::SVGFontData::~SVGFontData):
1838         * svg/SVGFontData.h: Added.
1839         (WebCore::SVGFontData::svgFontFaceElement):
1840         (WebCore::SVGFontData::horizontalOriginX):
1841         (WebCore::SVGFontData::horizontalOriginY):
1842         (WebCore::SVGFontData::horizontalAdvanceX):
1843         (WebCore::SVGFontData::verticalOriginX):
1844         (WebCore::SVGFontData::verticalOriginY):
1845         (WebCore::SVGFontData::verticalAdvanceY):
1846         * svg/SVGFontFaceElement.cpp:
1847         (WebCore::SVGFontFaceElement::unitsPerEm):
1848         (WebCore::SVGFontFaceElement::xHeight):
1849         (WebCore::SVGFontFaceElement::horizontalOriginX):
1850         (WebCore::SVGFontFaceElement::horizontalOriginY):
1851         (WebCore::SVGFontFaceElement::horizontalAdvanceX):
1852         (WebCore::SVGFontFaceElement::verticalOriginX):
1853         (WebCore::SVGFontFaceElement::verticalOriginY):
1854         (WebCore::SVGFontFaceElement::verticalAdvanceY):
1855         (WebCore::SVGFontFaceElement::ascent):
1856         (WebCore::SVGFontFaceElement::descent):
1857         (WebCore::SVGFontFaceElement::fontFamily):
1858         (WebCore::SVGFontFaceElement::associatedFontElement):
1859         (WebCore::SVGFontFaceElement::rebuildFontFace):
1860         * svg/SVGFontFaceElement.h:
1861         * svg/SVGGlyphElement.cpp:
1862         (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes):
1863         (WebCore::parseSVGGlyphAttribute):
1864         (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
1865         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
1866         * svg/SVGGlyphElement.h:
1867         * svg/SVGMissingGlyphElement.cpp:
1868         * svg/svgattrs.in:
1869
1870 2008-01-21  Darin Adler  <darin@apple.com>
1871
1872         Reviewed by John Sullivan.
1873
1874         - fix <rdar://problem/5644324> Delegate-less WebKit clients should have no databases
1875
1876         - remove the default database quota setting
1877
1878         - simplify the quota-related client calls by merging the one for a new database with
1879           the one for an existing database, adding a feature where you can get details about
1880           a database being created using the same functions that work on the other databases,
1881           and removing the parameters and return values, instead having clients use a function
1882           to set the quota
1883
1884         - fix unsafe multi-thread access to the database tracker's quota map
1885         - fix bug in deleteAllDatabases where it would iterate a HashMap while modifying it
1886
1887         The tracker database is now only created when we set the quota for a database origin.
1888         Thus asking for info about databases won't cause anything to be written to disk.
1889
1890         * WebCore.base.exp: Updated.
1891
1892         * bindings/js/GCController.cpp: Added an #if to get rid of an unused function warning.
1893
1894         * page/Chrome.cpp: Removed database-related functions. There's no problem having the
1895         code deal directly with the client.
1896         * page/Chrome.h: Ditto. Also made Chrome inherit from Noncopyable.
1897
1898         * page/ChromeClient.h: Replaced the two quota-related functions with a single one.
1899         The details about the state of databases in the origin are now available by asking
1900         for database details. There's also no need to pass the security origin, since
1901         it's easy to get that from the frame's document.
1902
1903         * page/Settings.cpp: Removed the default quota setting.
1904         * page/Settings.h: Ditto.
1905
1906         * platform/FileSystem.h: Added deleteEmptyDirectory.
1907         * platform/gtk/FileSystemGtk.cpp:
1908         (WebCore::deleteEmptyDirectory): Added.
1909         * platform/posix/FileSystemPOSIX.cpp:
1910         (WebCore::deleteEmptyDirectory): Added.
1911         * platform/qt/FileSystemQt.cpp:
1912         (WebCore::deleteEmptyDirectory): Added.
1913         * platform/win/FileSystemWin.cpp:
1914         (WebCore::deleteEmptyDirectory): Added.
1915         * platform/wx/FileSystemWx.cpp:
1916         (WebCore::deleteEmptyDirectory): Added placeholder.
1917
1918         * storage/DatabaseDetails.h: Removed the isValid() function since its name is
1919         confusing -- we removed our other isValid() functions. For the few callers that
1920         need this, it's fine to just check name().isEmpty(). Made the member functions
1921         all const.
1922
1923         * storage/DatabaseTracker.cpp:
1924         (WebCore::DatabaseTracker::DatabaseTracker): Removed m_defaultQuota initialization.
1925         Added m_proposedDatabase and m_thread.
1926         (WebCore::DatabaseTracker::setDatabaseDirectoryPath): Got rid of code that would
1927         open the tracker database here. This might slightly speed up launch time, since
1928         we won't do the I/O until we have to, and before we were actually creating an SQL
1929         database in this code that's run when we go to the first webpage.
1930         (WebCore::DatabaseTracker::trackerDatabasePath): Added.
1931         (WebCore::DatabaseTracker::openTrackerDatabase): Added a boolean parameter telling
1932         this function whether to create the database. Made this function safe to call if
1933         the database is already open. Also made the function fail quietly if the path has
1934         not been set yet.
1935         (WebCore::DatabaseTracker::canEstablishDatabase): Got rid of the call to the
1936         establishEntryForOrigin function. The origin is now put in the tracker database
1937         when the quota is set to a non-zero value. When judging if there's enough space
1938         for the new database, require at least one byte even if estimatedSize is 0, and
1939         check for overflow. Also added code here to populate the origins map, which
1940         guarantees it will be ready when the database uses it on another thread later.
1941         Also changed this to call the new ChromeClient function.
1942         (WebCore::DatabaseTracker::hasEntryForDatabase): Added code to open the
1943         tracker database, since that's no longer done by setDatabaseDirectoryPath.
1944         (WebCore::DatabaseTracker::originPath): Added.
1945         (WebCore::DatabaseTracker::fullPathForDatabase): Added code so that this will
1946         return a null string for the proposed database if called from within the
1947         ChromeClient function. Also switched from empty string to null string for the
1948         error cases.
1949         (WebCore::DatabaseTracker::populateOrigins): Added code to open the tracker
1950         database.
1951         (WebCore::DatabaseTracker::databaseNamesForOrigin): Ditto.
1952         (WebCore::DatabaseTracker::detailsForNameAndOrigin): Ditto. Also added code that
1953         will return the details of the proposed database if called from within the
1954         ChromeClient function. This is how the client can learn of the display name and
1955         the estimated size of the new database.
1956         (WebCore::DatabaseTracker::setDatabaseDetails): Added code to open the tracker
1957         database.
1958         (WebCore::DatabaseTracker::quotaForOrigin): Made this code OK to call on a non-main
1959         thread by using m_quotaMapGuard to guard access to the map. Other code runs on the
1960         main thread only, and only functions that write to the map use the lock.
1961         (WebCore::DatabaseTracker::setQuota): Changed this function so it can insert the
1962         initial quota as well as updating an existing quota. Added locking since this
1963         function modifies the quota map. Added code to open the tracker database. Added
1964         an early exit if the quota is already correct, which is guarantees that if you
1965         set a quota to 0 it won't trigger creation of a tracker database.
1966         (WebCore::DatabaseTracker::addDatabase): Added code to open the tracker database.
1967         (WebCore::DatabaseTracker::deleteAllDatabases): Made a copy of the quota map before
1968         iterating it to find all the origins. This fixes a problem with the old code where
1969         it would modify the map while iterating it, which gives assertions in debug builds
1970         and unpredictable results.
1971         (WebCore::DatabaseTracker::deleteOrigin): Replaced deleteDatabasesWithOrigin with
1972         this function. Added code to open the tracker database if needed. Added code to
1973         delete the origin from the tracker database, and to close the tracker database
1974         and delete files and directories as needed if we are deleting the final origin.
1975         (WebCore::DatabaseTracker::deleteDatabase): Added code to open the tracker database
1976         if needed.
1977
1978         * storage/DatabaseTracker.h: Renamed databasePath to databaseDirectoryPath for
1979         clarity, including the data member, and the getter and setter functions.
1980         Replaced deleteDatabasesWithOrigin with deleteOrigin. Removed the functions
1981         dealing with default origin quota. There is no default any more; origins start
1982         with no quota and the client must set a quota. Added trackerDatabasePath and
1983         originPath helper functions. Added a boolean parameter to openTrackerDatabase
1984         to tell it whether to create the database or not. Removed the
1985         establishEntryForOrigin function. Renamed m_originQuotaMap to just m_quotaMap,
1986         and added m_quotaMapGuard. Added a QuotaMap typedef. Added m_proposedDatabase,
1987         which holds the origin and details for the current proposed database during
1988         the client callback function that must decide whether to grant quota. Added a
1989         m_thread data member for debugging use to assert if functions that can only
1990         be called on a single thread are misused.
1991
1992         * storage/SQLTransaction.cpp:
1993         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): Changed to call the
1994         new exceededDatabaseQuota function instead of the old one.
1995
1996         * svg/graphics/SVGImageEmptyClients.h: Updated for the change to ChromeClient.
1997
1998 2008-01-21  David Hyatt  <hyatt@apple.com>
1999
2000         Fix for http://bugs.webkit.org/show_bug.cgi?id=16935
2001
2002         Fix a bug in layers where the positioned ancestor was being computed incorrectly (the root should not
2003         automatically be included).
2004
2005         Reviewed by olliej
2006
2007         Added fast/layers/positioned-inside-root-with-margins.html
2008
2009         * rendering/RenderLayer.cpp:
2010         (WebCore::RenderLayer::stackingContext):
2011         (WebCore::RenderLayer::enclosingPositionedAncestor):
2012
2013 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
2014
2015         Reviewed by Holger.
2016
2017         Fix KURL to QUrl conversion.
2018         
2019         Stick to the encoded version of the URL and in addition to KURL we encode the
2020         characters mentioned in section 2.4.3 of RFC 2396 as QUrl requires these, too.
2021         
2022         This fixes fast/css/import-rule-regression-11590.html,
2023         fast/css/import-style-update.html, svg/hixie/processing-model/003.xml and
2024         svg/hixie/processing-model/004.xml.
2025
2026
2027         * platform/qt/KURLQt.cpp:
2028         (WebCore::toHex):
2029         (WebCore::KURL::operator QUrl):
2030
2031 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
2032
2033         Reviewed by Holger.
2034
2035         Fix focus chain handling and cycling through focusable objects (links) using tab/backtab.
2036         
2037         * Fix GraphicsContext::drawFocusRing to also draw single focus rects.
2038         * Implemented QWebPage::focusNextPrevChild by sending fake tab/shift-tab events
2039         and make the return value depend on whether we successfully determined a focusable
2040         node or not.
2041         * Changed QWebView::focusNextPrevChild() to call the base QWidget implementation correctly
2042         if we could not handle the focus chain ourselves.
2043         * Changed the focus policy of QWebView to correctly use WheelFocus instead of ClickFocus.
2044         * Made ChromeClientQt::canTakeFocus() and takeFocus() dummy method since they are only
2045         used to control the situation of stepping out of the focus chain inside the page.
2046         * Made inclusion of links in the focus chain configurable through QWebSettings::LinksIncludedInFocusChain.
2047         The layout tests expect this to be disabled but for the user it seems sensible to have it
2048         on by default, hence the default in qwebsettings.cpp
2049
2050         * platform/graphics/qt/GraphicsContextQt.cpp:
2051         (WebCore::GraphicsContext::drawFocusRing):
2052
2053 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
2054
2055         Reviewed by Holger.
2056
2057         Fix access key support and fast/forms/legend-access-key.html
2058
2059         SVN revision 26664 changed the default access key for the non-mac build to Alt
2060         while this test relies on Ctrl.
2061
2062         * page/EventHandler.cpp:
2063
2064 2008-01-21  Simon Hausmann  <hausmann@webkit.org>
2065
2066         Reviewed by Holger.
2067
2068         Fix error reporting when parsing X(HT)ML fragments.
2069         
2070         We use the regular XMLTokenizer write()/.../end() sequence to parse those
2071         fragments, but we should not report any parsing errors inline inside the
2072         content. Instead we should just return the error and the DOM layer will take
2073         care of throwing an exception.
2074         
2075         This fixes fast/innerHTML/innerHTML-changing-document-properties.xhtml
2076         
2077
2078         * dom/XMLTokenizer.cpp:
2079         (WebCore::createXHTMLParserErrorHeader):
2080
2081 2008-01-21  Holger Freyther  <holger.freyther@trolltech.com>
2082
2083         Reviewed by Simon.
2084
2085         Fix some issues with redirections.
2086         
2087         * Ensure that we deliver the response to the ResourceHandleClient only once by
2088         setting m_responseSent back to false only before calling start() for the
2089         redirection
2090         * Added 307 as another HTTP status code that causes a redirection after POST to
2091         become get, just like in MainResourceLoader::isPostOrRedirectAfterPost
2092         * Also set the HTTP method on the ResourceRequest to GET before passing it to
2093         willSendRequest.
2094         * willSendRequest's newRequest argument is actually an in/out argument and could be
2095         modified in theory, so set m_request accordingly after the call.
2096         
2097
2098         * platform/network/qt/QNetworkReplyHandler.cpp:
2099         (WebCore::QNetworkReplyHandler::finish):
2100         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2101
2102 2008-01-21  Holger Freyther  <holger.freyther@trolltech.com>
2103
2104         Reviewed by Simon.
2105
2106         Fixed WebCore::cookies() to return all cookies, not only the first one.
2107         
2108         Fixes login into mail.yahoo.com.
2109         
2110
2111         * platform/qt/CookieJarQt.cpp:
2112         (WebCore::cookies):
2113
2114 2008-01-20  Oliver Hunt  <oliver@apple.com>
2115
2116         Reviewed by Mitz.
2117
2118         Fix http://bugs.webkit.org/show_bug.cgi?id=16816 , rdar://problem/5682985
2119         
2120         Correctly trigger willPerformDragDestinationAction when a drop causes a 
2121         load to occur.  The logic that originally did this was lost during the
2122         great drag migration of '07.
2123
2124         * page/DragController.cpp:
2125         (WebCore::DragController::performDrag):
2126
2127 2008-01-20  Dan Bernstein  <mitz@apple.com>
2128
2129         Reviewed by Darin Adler.
2130
2131         - fix http://bugs.webkit.org/show_bug.cgi?id=16951
2132           Assertion failure in FrameView::scheduleRelayout (!m_frame->document() || !m_frame->document()->inPageCache()) when going back from a page with a focused popup
2133
2134         * dom/Document.cpp:
2135         (WebCore::Document::setFocusedNode): Bail out if the document is in the
2136         page cache. Documents in the back/forward cache are "frozen" and should
2137         not change state.
2138
2139 2008-01-20  Collin Jackson  <webkit@collinjackson.com>
2140
2141         Reviewed by Sam Weinig.
2142
2143         Fix for http://bugs.webkit.org/show_bug.cgi?id=16775
2144
2145         We now use frame()->loader()->url() for postMessage, preventing a
2146         malicious sender from overwriting the uri property (using a <base> tag,
2147         for example). Also, use frame->loader()->url().host() instead of 
2148         instead of document()->SecurityOrigin()->domain() to reflect a recent
2149         clarification in the HTML5 spec. 
2150
2151         Tests: http/tests/security/postMessage/domain-affected-by-document-domain.html
2152                http/tests/security/postMessage/domain-and-uri-unaffected-by-base-tag.html
2153                http/tests/security/postMessage/javascript-page-still-sends-domain.html
2154
2155         * bindings/js/JSDOMWindowCustom.cpp:
2156         (WebCore::JSDOMWindow::postMessage):
2157
2158 2008-01-20  Antti Koivisto  <antti@apple.com>
2159
2160         Reviewed by Adele.
2161
2162         Fix <rdar://problem/5695451>
2163         Middle part of the media timeline missing on Windows if load failed
2164
2165         Add some null checking to avoid getting garbage results from the functions.
2166
2167         * platform/graphics/MediaPlayer.cpp:
2168         * platform/graphics/win/QTMovieWin.cpp:
2169         (QTMovieWin::duration):
2170         (QTMovieWin::currentTime):
2171         (QTMovieWin::setCurrentTime):
2172         (QTMovieWin::maxTimeLoaded):
2173
2174 2008-01-19  Alp Toker  <alp@atoker.com>
2175
2176         Reviewed by Mark Rowe.
2177
2178         http://bugs.webkit.org/show_bug.cgi?id=16944
2179         Use of GST_PLUGIN_DEFINE_STATIC results in a module-level constructor
2180
2181         http://bugzilla.gnome.org/show_bug.cgi?id=510547
2182         Epiphany/Webkit fails to start due to initializing threads twice
2183
2184         Don't call GST_PLUGIN_DEFINE_STATIC() as it performs g_thread_init()
2185         in the global initializer, breaking subsequent calls to
2186         g_thread_init() in applications.
2187
2188         * platform/graphics/gtk/VideoSinkGStreamer.cpp:
2189
2190 2008-01-19  Alp Toker  <alp@atoker.com>
2191
2192         Reviewed by Mark Rowe.
2193
2194         Remove any fragment part from the URL to be requested just before
2195         passing it to curl, otherwise curl sends it as part of the HTTP/local
2196         file request, causing page loads to fail.
2197
2198         * platform/network/curl/ResourceHandleManager.cpp:
2199         (WebCore::ResourceHandleManager::startJob):
2200
2201 2008-01-19  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
2202
2203         Reviewed by Alp Toker.
2204
2205         Add svg foreign object and svg experimental to the GTK+/autotools
2206         build system.
2207
2208         * GNUmakefile.am:
2209
2210 2008-01-19  Dan Bernstein  <mitz@apple.com>
2211
2212         Reviewed by Maciej Stachowiak.
2213
2214         - fix <rdar://problem/5645813> CrashTracer: [USER] 6 crashes in Safari at com.apple.WebCore: WebCore::RenderBox::destroy + 116
2215
2216         Test: editing/selection/inconsistent-in-removeChildNode.html
2217
2218         * editing/SelectionController.cpp:
2219         (WebCore::SelectionController::nodeWillBeRemoved): If the selection
2220         base or extent are not visible any more, adjust the selection.
2221
2222 2008-01-19  Oliver Hunt  <oliver@apple.com>
2223
2224         Reviewed by Eric Seidel.
2225
2226         Build fix for --svg-foreign-object path
2227
2228         * svg/SVGForeignObjectElement.idl:
2229
2230 2008-01-18  Stephanie  <slewis@apple.com>
2231
2232         Reviewed by Oliver.
2233
2234         Workaround for <rdar://problem/5695848>.  Set mime_type for local files based on file extension. 
2235
2236         * platform/network/cf/ResourceResponseCFNet.cpp:
2237         (WebCore::ResourceResponse::doUpdateResourceResponse):
2238
2239 2008-01-18  Ada Chan  <adachan@apple.com>
2240
2241         <rdar://problem/5682340> REGRESSION (r28188): Context menu appears at wrong place when clicking in iframe whose parent is scrolled (16827)
2242         Calling absolutePosition() in EventHandler::hitTestResultAtPoint() is extremely inefficient and passing in
2243         true as fixed before was wrong.  Use HitTestResult::localPoint() instead, and take into account border and padding widths.
2244
2245         Reviewed by Hyatt and Darin.
2246
2247         * page/EventHandler.cpp:
2248         (WebCore::EventHandler::hitTestResultAtPoint):
2249         * rendering/HitTestResult.cpp:
2250         (WebCore::HitTestResult::operator=):
2251
2252 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2253
2254         Reviewed by Darin, landed by Beth.
2255
2256         - fixed http://bugs.webkit.org/show_bug.cgi?id=15765
2257
2258         The call to HTMLTokenizer::write might result in a call to ::end which will invoke
2259         HTMLParser::finished() or Document::finishedParsing(). HTMLParser::finished() will eventually
2260         call Document::finishedParsing. The Document will delete the calling HTMLTokenizer and from the deleted
2261         tokenizer we will call into FrameLoader::tokenizerProcessedData.
2262         -) FrameLoader::tokenizerProcessedData calls FrameLoader::checkCompleted which gets called from the Document::finishedParsing
2263            (FrameLoader::finishedParsing).
2264
2265         * html/HTMLTokenizer.cpp:
2266         (WebCore::HTMLTokenizer::timerFired):
2267
2268 2008-01-18  David Hyatt  <hyatt@apple.com>
2269
2270         Don't apply the border/margin/padding check to root line boxes, since their renderers
2271         are blocks.
2272
2273         * rendering/InlineFlowBox.cpp:
2274         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
2275         (WebCore::InlineFlowBox::placeBoxesVertically):
2276
2277 2008-01-18  Geoffrey Garen  <ggaren@apple.com>
2278
2279         Not reviewed: rolling out a previous patch.
2280         
2281         Fixed <rdar://problem/5695439> Crash during GCController destructor on
2282         quitting browser
2283
2284         Used svn merge to roll out r29603 because it introduced some crashes
2285         on quit.
2286         
2287         GC relies on static hash tables, so it's not safe to GC from a static
2288         destructor, which might run after the static hash tables' destructors.
2289
2290         * bindings/js/GCController.cpp:
2291         (WebCore::GCController::garbageCollectNow):
2292         * bindings/js/GCController.h:
2293
2294 2008-01-18  David Hyatt  <hyatt@apple.com>
2295
2296         Fix for http://bugs.webkit.org/show_bug.cgi?id=15665
2297
2298         Building on Beth's earlier work to start building line boxes for empty inlines, this patch makes more
2299         empty inline cases work.  Empty inlines on lines by themselves now set isLineEmpty to false so that
2300         bidiReorderLine will get properly called.  In addition, the "shrink boxes with no text children" quirk
2301         needs to be disabled for inlines with padding, margins or borders.
2302
2303         Reviewed by Beth
2304
2305         Added fast/inline/inline-padding-disables-text-quirk.html
2306
2307         * rendering/InlineFlowBox.cpp:
2308         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
2309         (WebCore::InlineFlowBox::placeBoxesVertically):
2310         (WebCore::InlineFlowBox::shrinkBoxesWithNoTextChildren):
2311         * rendering/RenderObject.h:
2312         (WebCore::RenderObject::hasBordersPaddingOrMargin):
2313         * rendering/bidi.cpp:
2314         (WebCore::inlineFlowRequiresLineBox):
2315         (WebCore::RenderBlock::findNextLineBreak):
2316
2317 2008-01-18  David Hyatt  <hyatt@apple.com>
2318
2319         Fix for http://bugs.webkit.org/show_bug.cgi?id=14975
2320
2321         Computed size of padding is incorrect because we default padding to auto.  This is a made-up value that
2322         was only used to implement cellpadding on tables.  We needed this made-up value in order to tell that
2323         padding wasn't set so that we could then apply cellpadding.
2324        
2325         This patch rewrites cellpadding to be like other browsers.  Instead of being a setting on the table
2326         renderer that applies to all cells (even ones that were not <td>s), cellpadding is now mapped into the
2327         style of <td>s.  With this change it effectively becomes a content model feature and not a rendering
2328         feature.
2329
2330         For example, a <td> will pick up cellpadding even when it is not a cell and/or the enclosing <table> is
2331         not a table.  Anonymous cells and CSS-display-type cells will now never pick up cellpadding.  This behavior
2332         is all consistent with other browsers.
2333
2334         Reviewed by Antti
2335
2336         Added fast/css/padding-no-renderer.html
2337
2338         * css/CSSStyleSelector.cpp:
2339         (WebCore::CSSStyleSelector::canShareStyleWithElement):
2340         (WebCore::CSSStyleSelector::styleForElement):
2341         * css/CSSStyleSelector.h:
2342         * dom/StyledElement.cpp:
2343         * dom/StyledElement.h:
2344         (WebCore::StyledElement::canHaveAdditionalAttributeStyleDecls):
2345         (WebCore::StyledElement::additionalAttributeStyleDecls):
2346         * html/HTMLTableCellElement.cpp:
2347         (WebCore::HTMLTableCellElement::additionalAttributeStyleDecls):
2348         * html/HTMLTableCellElement.h:
2349         (WebCore::HTMLTableCellElement::canHaveAdditionalAttributeStyleDecls):
2350         * html/HTMLTableColElement.cpp:
2351         (WebCore::HTMLTableColElement::additionalAttributeStyleDecls):
2352         * html/HTMLTableColElement.h:
2353         (WebCore::HTMLTableColElement::canHaveAdditionalAttributeStyleDecls):
2354         * html/HTMLTableElement.cpp:
2355         (WebCore::HTMLTableElement::parseMappedAttribute):
2356         (WebCore::HTMLTableElement::additionalAttributeStyleDecls):
2357         (WebCore::HTMLTableElement::addSharedCellDecls):
2358         (WebCore::HTMLTableElement::addSharedCellBordersDecl):
2359         (WebCore::HTMLTableElement::addSharedCellPaddingDecl):
2360         (WebCore::HTMLTableElement::addSharedGroupDecls):
2361         (WebCore::HTMLTableElement::attach):
2362         * html/HTMLTableElement.h:
2363         (WebCore::HTMLTableElement::canHaveAdditionalAttributeStyleDecls):
2364         * html/HTMLTableSectionElement.cpp:
2365         (WebCore::HTMLTableSectionElement::additionalAttributeStyleDecls):
2366         * html/HTMLTableSectionElement.h:
2367         (WebCore::HTMLTableSectionElement::canHaveAdditionalAttributeStyleDecls):
2368         * rendering/AutoTableLayout.cpp:
2369         (WebCore::AutoTableLayout::recalcColumn):
2370         * rendering/RenderObject.cpp:
2371         (WebCore::RenderObject::paddingTop):
2372         (WebCore::RenderObject::paddingBottom):
2373         (WebCore::RenderObject::paddingLeft):
2374         (WebCore::RenderObject::paddingRight):
2375         * rendering/RenderStyle.cpp:
2376         (WebCore::StyleSurroundData::StyleSurroundData):
2377         * rendering/RenderStyle.h:
2378         (WebCore::RenderStyle::initialPadding):
2379         * rendering/RenderTable.cpp:
2380         (WebCore::RenderTable::RenderTable):
2381         * rendering/RenderTable.h:
2382
2383 2008-01-18  Dan Bernstein  <mitz@apple.com>
2384
2385         Reviewed by Dave Hyatt.
2386
2387         - fix <rdar://problem/5615307> Repro crash in WebKit!WebCore::RenderContainer::destroyLeftoverChildren
2388
2389         Test: fast/table/insert-row-before-form.html
2390
2391         * rendering/RenderTableRow.cpp:
2392         (WebCore::RenderTableRow::addChild): Changed to ensure that the
2393         object a new cell is inserted before is a child of the row, and
2394         added an assertion that that object is either a cell or a form.
2395         * rendering/RenderTableSection.cpp:
2396         (WebCore::RenderTableSection::addChild): Changed to ensure that the
2397         object a new row is inserted before is a child of the table section, and
2398         added an assertion that that object is either a table row or a form.
2399
2400 2008-01-18  Geoffrey Garen  <ggaren@apple.com>
2401
2402         Reviewed by Brady Eidson.
2403
2404         Fixed <rdar://problem/5622424> World Leak dialog when closing a page
2405         that has a Database
2406         
2407         The problem was that each transaction and SQL statement would hold on
2408         to its callback indefinitely. By design, callbacks often establish
2409         reference cycles to temporarily protect their execution environments.
2410         To break the cycle, we need to explicitly release each callback as soon
2411         as it is no longer needed.
2412
2413         * storage/SQLStatement.cpp:
2414         (WebCore::SQLStatement::performCallback): Release our callback objects
2415         after performing our callback.
2416
2417         * storage/SQLTransaction.cpp:
2418         (WebCore::SQLTransaction::postflightAndCommit): Release our callback
2419         objects after the transaction has terminated.
2420         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): ditto.
2421
2422 2008-01-18  Adele Peterson  <adele@apple.com>
2423
2424         Reviewed by Antti.
2425
2426         Fix for <rdar://problem/5679490> media controls fade in and out too jerkily and too slowly
2427
2428         * rendering/RenderMedia.cpp: Shorten the duration for the fade in/out animation.
2429
2430 2008-01-18  Beth Dakin  <bdakin@apple.com>
2431
2432         Reviewed by Oliver.
2433
2434         Disables SVG foreign object for <rdar://problem/5686989> turn off 
2435         SVG foreignobject because it does not repaint/dirty correctly
2436
2437         * DerivedSources.make:
2438         * WebCore.SVG.ForeignObject.exp: Added.
2439         * WebCore.SVG.exp:
2440         * bindings/js/JSSVGElementWrapperFactory.cpp:
2441         (WebCore::createJSSVGWrapper):
2442         * rendering/RenderForeignObject.cpp:
2443         * rendering/RenderForeignObject.h:
2444         * svg/SVGForeignObjectElement.cpp:
2445         * svg/SVGForeignObjectElement.h:
2446         * svg/SVGForeignObjectElement.idl:
2447         * svg/SVGLocatable.cpp:
2448         (WebCore::SVGLocatable::nearestViewportElement):
2449         (WebCore::SVGLocatable::farthestViewportElement):
2450         * svg/SVGUseElement.cpp:
2451         (WebCore::isDisallowedElement):
2452         * svg/svgtags.in:
2453
2454 2008-01-18  Mark Rowe  <mrowe@apple.com>
2455
2456         Rubber-stamped by Adam Roben.
2457
2458         Fix mixed line endings in FileSystemWin.cpp and set svn:eol-style to native
2459         to try and keep them consistent in the future.
2460
2461         * platform/win/FileSystemWin.cpp:
2462         (WebCore::fileSize):
2463         (WebCore::fileExists):
2464         (WebCore::deleteFile):
2465         (WebCore::pathByAppendingComponent):
2466         (WebCore::fileSystemRepresentation):
2467         (WebCore::makeAllDirectories):
2468         (WebCore::homeDirectoryPath):
2469         (WebCore::bundleName):
2470         (WebCore::storageDirectory):
2471         (WebCore::cachedStorageDirectory):
2472
2473 2008-01-18  Antti Koivisto  <antti@apple.com>
2474
2475         Reviewed by Adam.
2476
2477         Fix unreachable code warning in RenderVideo on Windows.
2478         
2479         Make switch cases explicit.
2480
2481         * rendering/RenderImage.cpp:
2482         (WebCore::RenderImage::isWidthSpecified):
2483         (WebCore::RenderImage::isHeightSpecified):
2484         * rendering/RenderVideo.cpp:
2485         (WebCore::RenderVideo::isWidthSpecified):
2486         (WebCore::RenderVideo::isHeightSpecified):
2487
2488 2008-01-18  Timothy Hatcher  <timothy@apple.com>
2489
2490         Reviewed by Adam Roben.
2491
2492         <rdar://problem/5693558> REGRESSION (r29581): no form field focus
2493         rings and inactive text selection after loading a page
2494         Bug 16910: [GTK] REGRESSION: keyboard cursor doesn't blink
2495         Bug 16917: REGRESSION (r29581/2): Google Maps search box loses focused appearance
2496
2497         * page/FocusController.cpp:
2498         (WebCore::FocusController::setActive): Use focusedOrMainFrame() instead of focusedFrame()
2499         to call selectionController()->pageActivationChanged() for cases when the focusedFrame()
2500         has not been set yet. 
2501
2502 2008-01-18  Alexey Proskuryakov  <ap@webkit.org>
2503
2504         Reviewed by Brady.
2505
2506         Database origin tracking is broken.
2507
2508         * storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::populateOrigins):
2509         Move reading from statement back into the loop (broken in r29386).
2510
2511 2008-01-18  Marius Storm-Olsen  <marius@trolltech.com>
2512
2513         Reviewed by Simon Hausmann <hausmann@webkit.org>.
2514
2515         Add use of precompiled header, when building inside Qt.
2516         
2517         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.
2518         
2519
2520         * WebCore.pro:
2521
2522 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2523
2524         Reviewed by Holger.
2525
2526         Fix fast/forms/button-state-restore.html
2527         
2528         Similar to the fix for fast/forms/form-post-urlencoded.html transform POST
2529         requests to data urls into GET.
2530         
2531
2532         * platform/network/qt/QNetworkReplyHandler.cpp:
2533         (WebCore::QNetworkReplyHandler::start):
2534
2535 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2536
2537         Reviewed by Holger.
2538
2539         Fix LayoutTests/fast/cookies/local-file-can-set-cookies.html
2540         
2541         In WebCore::cookies() don't return the full raw form but only the name=value
2542         part. This fixes the getter part of the above test. The above test also
2543         requires a parsing fix in Qt 4.4's QNetworkCookie to fully pass.
2544         
2545
2546         * platform/qt/CookieJarQt.cpp:
2547         (WebCore::cookies):
2548
2549 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2550
2551         Reviewed by Holger.
2552
2553         Fix svg/custom/path-getTotalLength.svg
2554         
2555         Path::apply creates a PathElement and its points array on the stack,
2556         to fill it in from the QPainterPath data and then use the platform
2557         independent path applier functions to calculate properties such as
2558         the length. For converting a QPainterPath::CurveToElement we need
2559         three points in the path element. However we allocated only two
2560         on the stack and as a result we got memory corruption and the
2561         failing test.
2562         
2563
2564         * platform/graphics/qt/PathQt.cpp:
2565         (WebCore::Path::apply):
2566
2567 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2568
2569         Reviewed by Holger.
2570
2571         Fix LayoutTests/fast/dom/document-attribute-js-null.html
2572         
2573         Don't crash when trying to get/set cookies without a frameloader.
2574         
2575
2576         * platform/qt/CookieJarQt.cpp:
2577         (WebCore::setCookies):
2578         (WebCore::cookies):
2579
2580 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2581
2582         Reviewed by Holger.
2583
2584         Fix fast/dom/xmlhttprequest-get.xhtml
2585         
2586         For local file requests remove the content length and the last-modified
2587         headers in the response.
2588         
2589
2590         * platform/network/qt/QNetworkReplyHandler.cpp:
2591         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2592
2593 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2594
2595         Reviewed by Holger.
2596
2597         Fix fast/forms/form-post-urlencoded.html.
2598         
2599         Post requests on files don't really make sense, but for
2600         fast/forms/form-post-urlencoded.html we still need to retrieve the file,
2601         which means we map it to a Get instead.
2602         
2603
2604         * platform/network/qt/QNetworkReplyHandler.cpp:
2605         (WebCore::QNetworkReplyHandler::start):
2606
2607 2008-01-18  Simon Hausmann  <hausmann@webkit.org>
2608
2609         Reviewed by Holger.
2610
2611         Make QNetworkReplyHandler::abort() more robust against multiple invocations.
2612
2613         During DRT runs I see cancel() being called on the same handle multiple times. Guard
2614         against this a bit better by setting m_reply to 0 after we called abort() on it.
2615
2616         * platform/network/qt/QNetworkReplyHandler.cpp:
2617         (WebCore::QNetworkReplyHandler::abort):
2618
2619 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2620
2621         Reviewed by Simon.
2622
2623         * httpBody() can return 0 and other ports (cf/mac) check for this condition
2624         * Looking at the cf/mac implementation we might need to call setHTTPBody somewhere
2625         as well.
2626         
2627
2628         WARNING: NO TEST CASES ADDED OR CHANGED
2629
2630         * platform/network/qt/QNetworkReplyHandler.cpp:
2631         (WebCore::QNetworkReplyHandler::start):
2632
2633 2008-01-18  Prasanth Ullattil  <prasanth.ullattil@trolltech.com>
2634
2635         Reviewed by Simon Hausmann <hausmann@webkit.org>.
2636
2637         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.
2638
2639         * xml/XPathFunctions.cpp:
2640         (WebCore::XPath::FunCount::evaluate):
2641
2642 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2643
2644         Reviewed by Simon.
2645
2646         * Remove our windowClipRect reimplementation and instead have our own
2647         Widget::invalidate implementation that is invalidating
2648         IntRect(0, 0, width(), height()) without trying to clip it (in contrast
2649         to Widget::invalidateRect)
2650
2651         * platform/qt/PlatformScrollBar.h:
2652         * platform/qt/PlatformScrollBarQt.cpp:
2653         (WebCore::PlatformScrollbar::invalidate):
2654
2655 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2656
2657         Reviewed by Simon.
2658
2659         * Change the coordinate transformation in the PlatformMouseEvent handlers
2660         * We want to convert from coordinates of the containing window to our local
2661         position on the scrollbar.
2662
2663         * platform/qt/PlatformScrollBarQt.cpp:
2664         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
2665         (WebCore::PlatformScrollbar::handleMousePressEvent):
2666
2667 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2668
2669         Reviewed by Simon.
2670
2671         * Make the qDebug more usable. Do not have an additional newline and print
2672         the untranslated coordinates as well.
2673
2674         * platform/qt/PlatformScrollBarQt.cpp:
2675         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
2676         (WebCore::PlatformScrollbar::handleMousePressEvent):
2677
2678 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2679
2680         Reviewed by Simon.
2681
2682         * Dead code, remove it
2683
2684         * platform/qt/PlatformScrollBarQt.cpp:
2685
2686 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2687
2688         Reviewed by Simon.
2689
2690         * Coding-Style fixes.
2691
2692         * platform/qt/PlatformScrollBarQt.cpp:
2693         (WebCore::PlatformScrollbar::PlatformScrollbar):
2694
2695 2008-01-18  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2696
2697         Reviewed by Simon.
2698
2699         * Coding-Style fix
2700
2701         * platform/graphics/qt/ImageDecoderQt.cpp:
2702         (WebCore::ImageDecoderQt::ReadContext::ReadContext):
2703
2704 2008-01-17  Geoffrey Garen  <ggaren@apple.com>
2705
2706         Reviewed by Darin Adler.
2707
2708         Fixed: lots of WebCore leaks reported when quitting Safari
2709         
2710         If we're quitting with a GC still scheduled, do the GC before quitting.
2711         That way, WebCore's leak counters won't count objects that were
2712         scheduled for GC.
2713
2714         * bindings/js/GCController.cpp:
2715         (WebCore::GCController::~GCController):
2716         (WebCore::GCController::garbageCollectNow):
2717         * bindings/js/GCController.h:
2718
2719 2008-01-17  Alp Toker  <alp@atoker.com>
2720
2721         Reviewed by Oliver Hunt.
2722
2723         gdk_screen_get_font_options() returns NULL if no default options are
2724         set so we always have to NULL check to avoid crashes later on since
2725         Cairo doesn't accept NULL font options.
2726
2727         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2728         (WebCore::FontPlatformData::FontPlatformData):
2729
2730 2008-01-17  Antti Koivisto  <antti@apple.com>
2731
2732         Reviewed by Adele.
2733
2734         Windows fix for <rdar://problem/5605682>
2735         Disallow streaming protocols for media elements
2736         and <rdar://problem/5668711>
2737         Limit the container and codec types that the <video> tag supports
2738         
2739         - Disable unsupported QuickTime tracks types. 
2740         - Disallow streaming protocols (for now).
2741
2742         * WebCore.vcproj/WebCore.vcproj:
2743         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
2744         (WebCore::MediaPlayerPrivate::updateStates):
2745         * platform/graphics/win/QTMovieWin.cpp:
2746         (QTMovieWin::load):
2747         (QTMovieWin::disableUnsupportedTracks):
2748         * platform/graphics/win/QTMovieWin.h:
2749
2750 2008-01-17  Oliver Hunt  <oliver@apple.com>
2751
2752         Support smart copy and paste during drag and drop
2753         
2754         Reviewed by Alice
2755         
2756         In order for the drag and drop tests in Windows DRT to pass
2757         we need to support smart cut and paste operations during
2758         drag and drop on windows.
2759         
2760         There is no layout test as drag and drop is still unsupported
2761         on windows.  Once supported smart drag/drop is tested by existing
2762         tests
2763
2764         * platform/win/ClipboardUtilitiesWin.cpp:
2765         (WebCore::smartPasteFormat):
2766         * platform/win/ClipboardUtilitiesWin.h:
2767         * platform/win/ClipboardWin.cpp:
2768         (WebCore::ClipboardWin::writeRange):
2769         * platform/win/DragDataWin.cpp:
2770
2771 2008-01-17  Oliver Hunt  <oliver@apple.com>
2772
2773         Reviewed by Anders.
2774
2775         <rdar://problem/5692940> Crash when attempting to get text properties in
2776         SVG with no renderer
2777
2778         We use the element renderer to calculate the text element bounds,
2779         however there was no check against the possibility of the text dimension
2780         properties being requested on a element with no renderer (eg. unattached, 
2781         display: none).
2782
2783         Test: svg/text/text-property-with-display-none.html
2784
2785         * svg/SVGTextContentElement.cpp:
2786         (WebCore::rootInlineBoxForTextContentElement):
2787
2788 2008-01-17  Anders Carlsson  <andersca@apple.com>
2789
2790         Reviewed by Oliver.
2791
2792         <rdar://problem/5636742>
2793         CrashTracer: [USER] 1302 crashes in Safari at com.apple.WebCore: WTF::Vector<char, 0ul>::reserveCapacity + 78
2794         
2795         When loading full-frame plug-ins, disable buffering data for the main resource loader. Otherwise, this can cause us
2796         to crash when loading large files such as movies in the browser. We already do this for embedded plug-ins.
2797         
2798         * WebCore.base.exp:
2799         * loader/DocumentLoader.h:
2800         (WebCore::DocumentLoader::mainResourceLoader):
2801         New accessor method.
2802         
2803         * loader/PluginDocument.cpp:
2804         (WebCore::PluginTokenizer::writeRawData):
2805         Disable buffering for the main resource loader.
2806         
2807         * loader/ResourceLoader.cpp:
2808         (WebCore::ResourceLoader::setShouldBufferData):
2809         * loader/ResourceLoader.h:
2810         Have this free the buffer when disabling buffering.
2811
2812 2008-01-17  Adam Roben  <aroben@apple.com>
2813
2814         More Qt/GTK+ build fixing.
2815
2816         * platform/gtk/ScrollViewGtk.cpp:
2817         * platform/qt/ScrollViewQt.cpp:
2818
2819 2008-01-17  Alexey Proskuryakov  <ap@webkit.org>
2820
2821         Reviewed by Darin.
2822
2823         http://bugs.webkit.org/show_bug.cgi?id=16902
2824         <rdar://problem/5692566> fast/encoding/mailto-always-utf-8.html fails when run after
2825         fast/dom/Window/window-property-shadowing.html
2826
2827         Test: fast/dom/Window/window-property-shadowing_.html
2828
2829         * loader/FrameLoader.cpp: (WebCore::FrameLoader::clear): Clear the frame name, too.
2830
2831 2008-01-17  Adam Roben  <aroben@apple.com>
2832
2833         Qt/GTK+ build fix.
2834
2835         * platform/gtk/ScrollViewGtk.cpp:
2836         (WebCore::ScrollView::ScrollViewPrivate::isActive):
2837         * platform/qt/ScrollViewQt.cpp:
2838         (WebCore::ScrollView::ScrollViewPrivate::isActive):
2839
2840 2008-01-16  Adam Roben  <aroben@apple.com>
2841
2842         Update scroll bars/form controls when FocusController::isActive changes
2843
2844         Part of <rdar://5006915> Inactive look for Aqua controls
2845
2846         Reviewed by Darin.
2847
2848         All tests pass.
2849
2850         * page/FocusController.cpp:
2851         (WebCore::FocusController::setActive): Update control tints when the
2852         active state changes.
2853         * page/FrameView.cpp:
2854         (WebCore::FrameView::updateControlTints): On Windows, we have to ask
2855         ScrollView to paint so that the outermost scroll bars will paint. On
2856         Mac, the outermost scroll bars are taken care of by NSScroller.
2857         * platform/PopupMenu.h: Updated for ScrollBarClient changes.
2858         * platform/ScrollBar.h: Added a new ScrollBarClient method.
2859         * platform/win/PlatformScrollBarSafari.cpp:
2860         (WebCore::PlatformScrollbar::paint): Invalidate when updating control
2861         tints so that we can paint with the new tint later.
2862         (WebCore::PlatformScrollbar::paintButton): Pass the active state down
2863         to SafariTheme.
2864         (WebCore::PlatformScrollbar::paintTrack): Ditto.
2865         (WebCore::PlatformScrollbar::paintThumb): Ditto.
2866         * platform/win/ScrollViewWin.cpp:
2867         (WebCore::ScrollView::ScrollViewPrivate::isActive): Added.
2868         (WebCore::ScrollView::paint): Pass paint calls on down if we're
2869         updating control tints so the scroll bars can invalidate.
2870         * rendering/RenderLayer.cpp:
2871         (WebCore::RenderLayer::isActive): Added.
2872         * rendering/RenderLayer.h:
2873         * rendering/RenderListBox.cpp:
2874         (WebCore::RenderListBox::isActive): Added.
2875         * rendering/RenderListBox.h:
2876         * rendering/RenderTheme.cpp:
2877         (WebCore::RenderTheme::isActive): Added.
2878         * rendering/RenderTheme.h:
2879         * rendering/RenderThemeSafari.cpp:
2880         (WebCore::RenderThemeSafari::determineState): Pass the active state
2881         down to SafariTheme.
2882
2883 2008-01-16  Adam Roben  <aroben@apple.com>
2884
2885         Move focused/active state from Frame to SelectionController/FocusController
2886
2887         This is the first part of <rdar://5006915> Inactive look for Aqua
2888         controls.
2889
2890         The following methods were moved/renamed:
2891             - Frame::setIsActive -> FocusController::setActive
2892             - Frame::isActive -> SelectionController::isActiveAndFocused
2893             - Frame::setWindowHasFocus -> SelectionController::setFocused
2894
2895         Active state is now correctly a Page-level concept.
2896
2897         The Mac parts of this patch were written by Darin.
2898
2899         Reviewed by Darin.
2900
2901         All tests pass.
2902
2903         * WebCore.base.exp: Updated for method renames.
2904         * css/CSSStyleSelector.cpp:
2905         (WebCore::CSSStyleSelector::checkOneSelector): Ditto.
2906         * editing/SelectionController.cpp:
2907         (WebCore::SelectionController::SelectionController): Initialize new
2908         member.
2909         (WebCore::SelectionController::focusedOrActiveStateChanged): New
2910         private method. Most of this code came from Frame::setIsActive.
2911         (WebCore::SelectionController::pageActivationChanged): Added.
2912         (WebCore::SelectionController::setFocused): Added. Replaces
2913         Frame::setWindowHasFocus.
2914         (WebCore::SelectionController::isFocusedAndActive): Added. Replaces
2915         Frame::isActive.
2916         * editing/SelectionController.h:
2917         * page/FocusController.cpp:
2918         (WebCore::FocusController::FocusController): Initialize new member.
2919         (WebCore::FocusController::setFocusedFrame): Changed to just call
2920         SelectionController::setFocused, since active state has doesn't change
2921         when the focused frame changes.
2922         (WebCore::FocusController::setActive): Added. Replaces
2923         Frame::setIsActive.
2924         * page/FocusController.h:
2925         (WebCore::FocusController::isActive): Added.
2926         * page/Frame.cpp:
2927         (WebCore::Frame::setDocument): Updated for method renames.
2928         (WebCore::Frame::setFocusedNodeIfNeeded): Ditto.
2929         (WebCore::Frame::updateSecureKeyboardEntryIfActive): Ditto.
2930         (WebCore::FramePrivate::FramePrivate): Removed initialization of
2931         removed members.
2932         * page/Frame.h:
2933         * page/FramePrivate.h:
2934         * page/mac/WebCoreFrameBridge.h: Removed -selectionColor.
2935         * page/mac/WebCoreFrameBridge.mm: Ditto.
2936         * rendering/RenderListBox.cpp:
2937         (WebCore::RenderListBox::paintItemForeground): Updated for method
2938         renames.
2939         (WebCore::RenderListBox::paintItemBackground): Ditto.
2940         * rendering/RenderObject.cpp:
2941         (WebCore::RenderObject::selectionBackgroundColor): Ditto.
2942         (WebCore::RenderObject::selectionForegroundColor): Ditto.
2943         * rendering/RenderTextControl.cpp:
2944         (WebCore::RenderTextControl::capsLockStateMayHaveChanged): Ditto.
2945         * rendering/RenderTheme.cpp:
2946         (WebCore::RenderTheme::isFocused): Ditto.
2947
2948 2008-01-17  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2949
2950         Reviewed by Simon.
2951
2952         * Make the nice 'safari' feature work on our port. When viewing a single image, clicking
2953         on the image will zoom it.
2954         * It seems like our platform can only determine the size of the image once it is completely
2955         loaded. Call m_doc->imageChanged on the last chunk of data as well.
2956
2957         * loader/ImageDocument.cpp:
2958         (WebCore::ImageTokenizer::finish):
2959
2960 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
2961
2962         Reviewed by Lars.
2963
2964         Set the library version of QtWebKit to the Qt version.
2965
2966         * WebCore.pro:
2967
2968 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
2969
2970         Reviewed by Holger.
2971
2972         Re-enable gzip compression as accepted encoding, now that the bug is fixed in Qt 4.4's network module.
2973
2974         * platform/network/qt/QNetworkReplyHandler.cpp:
2975         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
2976
2977 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
2978
2979         Another Windows build fix, setCookies accidentially had a const
2980         Document pointer.
2981
2982         * platform/network/win/CookieJarWin.cpp:
2983
2984 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
2985
2986         MSVC Windows build fix. Forward declaring Document in CookieJar.h
2987         seems not enough for MSVC.
2988
2989         * platform/network/win/CookieJarWin.cpp:
2990
2991 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
2992
2993         Reviewed by Maciej, Lars, Holger.
2994
2995         http://bugs.webkit.org/show_bug.cgi?id=16589
2996
2997         Add a document parameter to WebCore::cookies, setCookies and cookiesEnabled.
2998
2999         * WebCore.pro:
3000         * bindings/js/kjs_navigator.cpp:
3001         (KJS::Navigator::getValueProperty):
3002         * dom/Document.cpp:
3003         (WebCore::Document::cookie):
3004         * platform/CookieJar.h:
3005         * platform/gtk/CookieJarGtk.cpp:
3006         (WebCore::setCookies):
3007         (WebCore::cookies):
3008         * platform/mac/CookieJar.mm:
3009         * platform/network/win/CookieJarWin.cpp:
3010         * platform/qt/CookieJarQt.cpp:
3011         (WebCore::setCookies):
3012         (WebCore::cookies):
3013         (WebCore::cookiesEnabled):
3014         * platform/wx/TemporaryLinkStubs.cpp:
3015
3016 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
3017
3018         Reviewed by Holger.
3019
3020         Windows build fix. (use localtime_r again instead of _s)
3021
3022         * loader/FTPDirectoryDocument.cpp:
3023         (WebCore::processFileDateString):
3024
3025 2008-01-17  Frans Englich  <fenglich@trolltech.com>
3026
3027         Reviewed by Simon Hausmann <hausmann@webkit.org>.
3028
3029         Fix linking on MinGW and at least one MSVC platform by having gmtimeQt in the correct namespace.
3030
3031         * loader/FTPDirectoryDocument.cpp:
3032
3033 2008-01-17  Simon Hausmann  <hausmann@webkit.org>
3034
3035         Reviewed by Holger.
3036
3037         Don't link QtWebKit against libQtXml when building against Qt 4.4.
3038
3039         This is not necessary anymore since QXmlStream has been moved into QtCore.
3040
3041         * WebCore.pro:
3042
3043 2008-01-17  Håvard Wall  <hwall@trolltech.com>
3044
3045         Reviewed by Simon Hausmann <hausmann@webkit.org>.
3046
3047         Fix compilation on arm
3048
3049         * platform/graphics/qt/GraphicsContextQt.cpp:
3050         (WebCore::GraphicsContext::endTransparencyLayer):
3051
3052 2008-01-17  Simon Hausmann  <shausman@trolltech.com>
3053
3054         Reviewed by Holger.
3055
3056         Fix compilation against Qt 4.4 without files that are specific for the Qt 4.3 build.
3057
3058         * WebCore.pro:
3059         * platform/network/qt/ResourceHandleQt.cpp:
3060         * platform/qt/MIMETypeRegistryQt.cpp:
3061         * platform/qt/PlugInInfoStoreQt.cpp:
3062
3063 2008-01-17  Frans Englich  <fenglich@trolltech.com>
3064
3065         Reviewed by Simon Hausmann <hausmann@webkit.org>.
3066
3067         Fixes compilation with MinGW.
3068         Neither localtime_r nor localtime_s are available on MingW, so instead of
3069         calling back to the thread-unsafe localtime use QDateTime instead.
3070
3071         * loader/FTPDirectoryDocument.cpp:
3072         (WebCore::FTPDirectoryTokenizer::WebCore::processFilesizeString):
3073         (WebCore::FTPDirectoryTokenizer::WebCore::wasLastDayOfMonth):
3074         (WebCore::FTPDirectoryTokenizer::WebCore::WebCore::gmtimeQt):
3075         * loader/FTPDirectoryParser.cpp:
3076         (WebCore::parseOneFTPLine):
3077
3078 2008-01-17  Dan Bernstein  <mitz@apple.com>
3079
3080         Reviewed by Dave Hyatt.
3081
3082         - fix determinePitch for segmented fonts
3083
3084         Covered by fast/css/font-face-implicit-local-font.html
3085
3086         * platform/graphics/FontFallbackList.cpp:
3087         (WebCore::FontFallbackList::determinePitch): If the primary font is
3088         segmented, treat as fixed pitch only if it has only one segment
3089         and that segment is fixed-pitch.
3090
3091 2008-01-16  David Hyatt  <hyatt@apple.com>
3092
3093         Fix for http://bugs.webkit.org/show_bug.cgi?id=16611
3094
3095         Make sure vertical-align length values are offset from their parents rather than being absolute to the
3096         line.
3097
3098         Reviewed by olliej
3099
3100         Added fast/css/vertical-align-lengths.html
3101
3102         * rendering/RenderObject.cpp:
3103         (WebCore::RenderObject::getVerticalPosition):
3104
3105 2008-01-16  Dan Bernstein  <mitz@apple.com>
3106
3107         Reviewed by Dave Hyatt.
3108
3109         - fix for @font-face rules with unicode-range: always use a local font where not
3110           explicitly overlaid.
3111
3112         Test: fast/css/font-face-implicit-local-font.html
3113
3114         * css/CSSFontSelector.cpp:
3115         (WebCore::CSSFontSelector::addFontFaceRule): Changed to insert an implicit
3116         @font-face rule with the local font the matches the family and description before
3117         any explicit @font-face rules that overlay specific ranges of the same font.
3118         * css/CSSSegmentedFontFace.h:
3119         (WebCore::CSSSegmentedFontFace::numRanges): Addded.
3120
3121 2008-01-16  Antti Koivisto  <antti@apple.com>
3122
3123         Fix Tiger build.
3124
3125         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3126         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
3127
3128 2008-01-16  Antti Koivisto  <antti@apple.com>
3129
3130         Reviewed by Adele.
3131         
3132         OS X fix for <rdar://problem/5605682>
3133         Disallow streaming protocols for media elements
3134         and <rdar://problem/5668711>
3135         Limit the container and codec types that the <video> tag supports
3136         
3137         - Disable unsupported QuickTime tracks types. 
3138         - Disallow streaming protocols (for now).
3139         - Set QTMovie QTMoviePreventExternalURLLinksAttribute and QTSecurityPolicyNoCrossSiteAttribute 
3140           to limit QuickTime's access to external resources.
3141         
3142         Windows patch coming up.
3143
3144         Tests: media/broken-video.html
3145                media/unsupported-rtsp.html
3146                media/unsupported-tracks.html
3147
3148         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3149         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3150         (WebCore::MediaPlayerPrivate::createQTMovie):
3151         (WebCore::MediaPlayerPrivate::updateStates):
3152         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
3153
3154 2008-01-16  Rodney Dawes  <dobey@wayofthemonkey.com>
3155
3156         Reviewed by Alp Toker.
3157
3158         http://bugs.webkit.org/show_bug.cgi?id=16897
3159         Add shared plugins directory to INCLUDE path
3160
3161         Add the plugins directory to INCLUDEPATH
3162
3163         * GNUmakefile.am:
3164         * WebCore.pro:
3165
3166 2008-01-16  Geoffrey Garen  <ggaren@apple.com>
3167
3168         Reviewed by Sam Weinig.
3169         
3170         Added a debug counter for SQL transactions. This helped me debug an SQL
3171         leak.
3172
3173         * bindings/js/JSCustomSQLTransactionCallback.cpp:
3174         (WebCore::):
3175         (WebCore::JSCustomSQLTransactionCallbackCounter::~JSCustomSQLTransactionCallbackCounter):
3176         (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
3177         (WebCore::JSCustomSQLTransactionCallback::~JSCustomSQLTransactionCallback):
3178         * bindings/js/JSCustomSQLTransactionCallback.h:
3179
3180         * bindings/js/kjs_window.cpp: Removed a silly comment.
3181
3182 2008-01-16  David Hyatt  <hyatt@apple.com>
3183
3184         Fix for http://bugs.webkit.org/show_bug.cgi?id=14846, cell padding can't be changed dynamically.
3185
3186         Reviewed by Eric Seidel
3187
3188         Added fast/table/dynamic-cellpadding.html
3189
3190         * html/HTMLTableElement.cpp:
3191         (WebCore::HTMLTableElement::parseMappedAttribute):
3192         * rendering/RenderTable.cpp:
3193         (WebCore::RenderTable::setCellPadding):
3194         * rendering/RenderTable.h:
3195
3196 2008-01-16  David Hyatt  <hyatt@apple.com>
3197
3198         Fix for <rdar://problem/5681647> Item pages on http://www.stendmarsofa.com/ hang Safari
3199
3200         This regression was caused by an attempt to implement a WinIE quirk in RenderBlock::calcInlinePrefWidths.
3201         The original patch introduced pathological O(n^2) behavior into this function even when the quirk didn't need
3202         to apply.  In addition the quirk was only partially implemented (the full quirk did not care what was adjacent
3203         to images and also needed bidi.cpp patched, since the quirk applies both when computing pref widths and when
3204         laying out).
3205
3206         This new patch rewrites the quirk to be complete.  The original test case attached to the bug that tested a variety
3207         of image/text combinations now fully matches WinIE.
3208
3209         Reviewed by Beth
3210
3211         Added fast/table/unbreakable-images-quirk.html
3212
3213         * rendering/RenderBlock.cpp:
3214         (WebCore::RenderBlock::calcInlinePrefWidths):
3215         * rendering/bidi.cpp:
3216         (WebCore::RenderBlock::findNextLineBreak):
3217
3218 2008-01-16  Rodney Dawes  <dobey@wayofthemonkey.com>
3219
3220         Reviewed by Jon Honeycutt
3221
3222         Move isPluginBlacklisted to PluginPackageWin.cpp, to avoid
3223         a circular dependency on PluginDatabaseWin
3224         Remove the getFileVersion method, and just check the versions directly
3225         in isPluginBlacklisted, as it was the only caller
3226
3227         http://bugs.webkit.org/show_bug.cgi?id=16884
3228
3229         * plugins/win/PluginDatabaseWin.cpp:
3230         * plugins/win/PluginDatabaseWin.h:
3231         * plugins/win/PluginPackageWin.cpp:
3232         * plugins/win/PluginPackageWin.h:
3233
3234 2008-01-16  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3235
3236         Reviewed by Lars.
3237
3238         * Set the cursor on the containingWindow() instead of the
3239         nativeWidget()
3240         * This should be safe even with plugins as the cursor is set
3241         on the mouse events.
3242
3243         * platform/qt/WidgetQt.cpp:
3244         (WebCore::Widget::setCursor):
3245
3246 2008-01-16  Brad Hughes  <bhughes@trolltech.com>
3247
3248         Reviewed by Lars.
3249
3250         Improve the sqlite3 dependency when building WebKit inside Qt.
3251
3252         Build sqlite3 into QtWebKit if a system sqlite3 development package
3253         can't be found.
3254
3255         * WebCore.pro:
3256
3257 2008-01-16  Lars Knoll  <lars@trolltech.com>
3258
3259         Reviewed by Simon Hausmann <simon.hausmann@trolltech.com>.
3260
3261         Implement GraphicsContext::clipOut and fix transparency layers.
3262
3263         Transparency layers where broken in two ways: It always used the
3264         complete device rect as the size of the layer pixmap and the pixmaps
3265         where not correctly initialized to transparent.
3266
3267         This fixes the worst drawing errors in the Inspector and makes drawing it
3268         10 times faster.
3269
3270         * platform/graphics/qt/GraphicsContextQt.cpp:
3271         (WebCore::toQtLineJoin):
3272         (WebCore::TransparencyLayer::TransparencyLayer):
3273         (WebCore::GraphicsContextPlatformPrivate::p):
3274         (WebCore::GraphicsContext::platformContext):
3275         (WebCore::GraphicsContext::savePlatformState):
3276         (WebCore::GraphicsContext::restorePlatformState):
3277         (WebCore::GraphicsContext::drawRect):
3278         (WebCore::GraphicsContext::drawLine):
3279         (WebCore::GraphicsContext::drawEllipse):
3280         (WebCore::GraphicsContext::strokeArc):
3281         (WebCore::GraphicsContext::drawConvexPolygon):
3282         (WebCore::GraphicsContext::fillRect):
3283         (WebCore::GraphicsContext::fillRoundedRect):
3284         (WebCore::GraphicsContext::clip):
3285         (WebCore::GraphicsContext::drawFocusRing):
3286         (WebCore::GraphicsContext::beginTransparencyLayer):
3287         (WebCore::GraphicsContext::endTransparencyLayer):
3288         (WebCore::GraphicsContext::clearRect):
3289         (WebCore::GraphicsContext::strokeRect):
3290         (WebCore::GraphicsContext::setLineCap):
3291         (WebCore::GraphicsContext::setLineJoin):
3292         (WebCore::GraphicsContext::setMiterLimit):
3293         (WebCore::GraphicsContext::setAlpha):
3294         (WebCore::GraphicsContext::setCompositeOperation):
3295         (WebCore::GraphicsContext::clipOut):
3296         (WebCore::GraphicsContext::translate):
3297         (WebCore::GraphicsContext::origin):
3298         (WebCore::GraphicsContext::rotate):
3299         (WebCore::GraphicsContext::scale):
3300         (WebCore::GraphicsContext::clipOutEllipseInRect):
3301         (WebCore::GraphicsContext::addInnerRoundedRectClip):
3302         (WebCore::GraphicsContext::setPlatformStrokeStyle):
3303         (WebCore::GraphicsContext::setPlatformStrokeThickness):
3304         (WebCore::GraphicsContext::setPlatformFillColor):
3305         (WebCore::GraphicsContext::setUseAntialiasing):
3306
3307 2008-01-16  Lars Knoll  <lars@trolltech.com>
3308
3309         Reviewed by Simon Hausmann <simon.hausmann@trolltech.com>.
3310
3311         Trivially implement the themed search field by mapping it to a text field
3312
3313         Also add a bunch of notImplemented warnings for other places where we don't
3314         have an implementatin in RenderTheme.
3315
3316         * platform/qt/RenderThemeQt.cpp:
3317         (WebCore::RenderThemeQt::paintTextField):
3318         (WebCore::RenderThemeQt::paintMenuListButton):
3319         (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
3320         (WebCore::RenderThemeQt::paintSliderTrack):
3321         (WebCore::RenderThemeQt::paintSliderThumb):
3322         (WebCore::RenderThemeQt::paintSearchField):
3323         (WebCore::RenderThemeQt::adjustSearchFieldStyle):
3324         (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
3325         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
3326         (WebCore::RenderThemeQt::adjustSearchFieldDecorationStyle):
3327         (WebCore::RenderThemeQt::paintSearchFieldDecoration):
3328         (WebCore::RenderThemeQt::adjustSearchFieldResultsDecorationStyle):
3329         (WebCore::RenderThemeQt::paintSearchFieldResultsDecoration):
3330
3331 2008-01-16  Holger Freyther  <holger.freyther@trolltech.com>
3332
3333         Reviewed by Simon.
3334
3335         * Follow the EventHandlerWin.cpp and always return true in the handlers.
3336         * Match the windows implementation more closely as well.
3337         * This is fixing "selection" bugs with the Web Inspector
3338
3339         * page/qt/EventHandlerQt.cpp:
3340         (WebCore::EventHandler::focusDocumentView):
3341         (WebCore::EventHandler::passMousePressEventToSubframe):
3342         (WebCore::EventHandler::passMouseMoveEventToSubframe):
3343         (WebCore::EventHandler::passMouseReleaseEventToSubframe):
3344         (WebCore::EventHandler::passMousePressEventToScrollbar):
3345
3346 2008-01-16  Simon Hausmann  <hausmann@webkit.org>
3347
3348         Reviewed by Lars Knoll <lars@trolltech.com>.
3349
3350         Fix crashes in the new networking code.
3351
3352         When the ResourceLoader cancels the handle we have to make sure not to access
3353         the resource handle afterwards again.
3354
3355         * platform/network/qt/QNetworkReplyHandler.cpp:
3356         (WebCore::QNetworkReplyHandler::finish):
3357         (WebCore::QNetworkReplyHandler::forwardData):
3358
3359 2008-01-16  Lars Knoll  <lars@trolltech.com>
3360
3361         Reviewed by Simon.
3362
3363         add conversion methods from and to QUrl to KURL.
3364
3365         Use them in the places I found at the moment. Fixes a bug
3366         where form data was encoded twice.
3367         Also fix QWebSettings to take a QUrl for the user style sheet
3368         location.
3369
3370         * WebCore.pro:
3371         * platform/KURL.h:
3372         * platform/network/qt/QNetworkReplyHandler.cpp:
3373         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3374         * platform/network/qt/ResourceRequestQt.cpp:
3375         (WebCore::ResourceRequest::toNetworkRequest):
3376         * platform/qt/KURLQt.cpp: Added.
3377         (WebCore::KURL::KURL):
3378         (WebCore::KURL::operator QUrl):
3379
3380 2008-01-15  Darin Adler  <darin@apple.com>
3381
3382         Rubber-stamped by Maciej Stachowiak and Oliver Hunt.
3383
3384         - fix <rdar://problem/5689748> REGRESSION: Cannot redirect to protocols handled by external applications
3385
3386         Put navigation policy delegate calls back for redirects.
3387         Just rolled out the change where I took them out.
3388
3389         * loader/MainResourceLoader.cpp:
3390         (WebCore::MainResourceLoader::callContinueAfterNavigationPolicy):
3391         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
3392         (WebCore::MainResourceLoader::willSendRequest):
3393         * loader/MainResourceLoader.h:
3394
3395 2008-01-15  Adele Peterson  <adele@apple.com>
3396
3397         Reviewed by Sam.
3398
3399         Remove unused variable for old media control background drawing code.
3400
3401         * rendering/RenderThemeMac.h:
3402         * rendering/RenderThemeMac.mm:
3403         (WebCore::RenderThemeMac::RenderThemeMac):
3404         (WebCore::RenderThemeMac::~RenderThemeMac):
3405
3406 2008-01-15  Sam Weinig  <sam@webkit.org>
3407
3408         Reviewed by Geoffrey Garen.
3409
3410         Fix <rdar://problem/5595552> r27608 introduced a 20% increase in JS binary size, 4% increase in WebCore binary size
3411
3412         - Update JS Function implementations to use a static function based method. This decreases
3413           the binary size of an Intel only build by 1013.5K.
3414
3415         * WebCore.xcodeproj/project.pbxproj:
3416         * bindings/js/JSDOMWindowCustom.cpp:
3417         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
3418         * bindings/js/JSEventTargetBase.cpp:
3419         (WebCore::jsEventTargetAddEventListener):
3420         (WebCore::jsEventTargetRemoveEventListener):
3421         (WebCore::jsEventTargetDispatchEvent):
3422         (WebCore::retrieveEventTargetAndCorrespondingNode):
3423         * bindings/js/JSEventTargetBase.h:
3424         * bindings/js/JSHTMLInputElementBase.cpp:
3425         (WebCore::jsHTMLInputElementBaseFunctionSetSelectionRange):
3426         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
3427         * bindings/js/JSHTMLInputElementBase.h:
3428         * bindings/js/JSLocation.cpp:
3429         (WebCore::JSLocation::getOwnPropertySlot):
3430         (WebCore::jsLocationProtoFuncReplace):
3431         (WebCore::jsLocationProtoFuncReload):
3432         (WebCore::jsLocationProtoFuncAssign):
3433         (WebCore::jsLocationProtoFuncToString):
3434         * bindings/js/JSLocation.h:
3435         * bindings/js/JSXMLHttpRequest.cpp:
3436         (KJS::jsXMLHttpRequestPrototypeFunctionAbort):
3437         (KJS::jsXMLHttpRequestPrototypeFunctionGetAllResponseHeaders):
3438         (KJS::jsXMLHttpRequestPrototypeFunctionGetResponseHeader):
3439         (KJS::jsXMLHttpRequestPrototypeFunctionOpen):
3440         (KJS::jsXMLHttpRequestPrototypeFunctionSend):
3441         (KJS::jsXMLHttpRequestPrototypeFunctionSetRequestHeader):
3442         (KJS::jsXMLHttpRequestPrototypeFunctionOverrideMIMEType):
3443         (KJS::jsXMLHttpRequestPrototypeFunctionAddEventListener):
3444         (KJS::jsXMLHttpRequestPrototypeFunctionRemoveEventListener):
3445         (KJS::jsXMLHttpRequestPrototypeFunctionDispatchEvent):
3446         * bindings/js/JSXMLHttpRequest.h:
3447         * bindings/js/JSXSLTProcessor.cpp:
3448         (KJS::jsXSLTProcessorPrototypeFunctionImportStylesheet):
3449         (KJS::jsXSLTProcessorPrototypeFunctionTransformToFragment):
3450         (KJS::jsXSLTProcessorPrototypeFunctionTransformToDocument):
3451         (KJS::jsXSLTProcessorPrototypeFunctionSetParameter):
3452         (KJS::jsXSLTProcessorPrototypeFunctionGetParameter):
3453         (KJS::jsXSLTProcessorPrototypeFunctionRemoveParameter):
3454         (KJS::jsXSLTProcessorPrototypeFunctionClearParameters):
3455         (KJS::jsXSLTProcessorPrototypeFunctionReset):
3456         * bindings/js/JSXSLTProcessor.h:
3457         * bindings/js/kjs_events.cpp:
3458         (WebCore::jsClipboardPrototypeFunctionClearData):
3459         (WebCore::jsClipboardPrototypeFunctionGetData):
3460         (WebCore::jsClipboardPrototypeFunctionSetData):
3461         (WebCore::jsClipboardPrototypeFunctionSetDragImage):
3462         * bindings/js/kjs_events.h:
3463         * bindings/js/kjs_navigator.cpp:
3464         (KJS::pluginsFunctionRefresh):
3465         (KJS::navigatorProtoFuncJavaEnabled):
3466         * bindings/js/kjs_navigator.h:
3467         * bindings/js/kjs_window.cpp:
3468         (KJS::Window::getOwnPropertySlot):
3469         (KJS::windowProtoFuncAToB):
3470         (KJS::windowProtoFuncBToA):
3471         (KJS::windowProtoFuncOpen):
3472         (KJS::windowProtoFuncSetTimeout):
3473         (KJS::windowProtoFuncClearTimeout):
3474         (KJS::windowProtoFuncSetInterval):
3475         (KJS::windowProtoFuncAddEventListener):
3476         (KJS::windowProtoFuncRemoveEventListener):
3477         (KJS::windowProtoFuncShowModalDialog):
3478         (KJS::windowProtoFuncNotImplemented):
3479         * bindings/js/kjs_window.h:
3480         * bindings/scripts/CodeGenerator.pm:
3481         * bindings/scripts/CodeGeneratorJS.pm:
3482
3483 2008-01-15  Adele Peterson  <adele@apple.com>
3484
3485         Reviewed by Dan.
3486
3487         Fix for <rdar://problem/5682492> With the <video> element, the audio is heard when forwarding or rewinding a movie while it's playing
3488
3489         * rendering/MediaControlElements.cpp: (WebCore::MediaControlSeekButtonElement::defaultEventHandler):
3490           Instead of pausing the media when you stop seeking on mouse up, pause the video when you first start seeking on mouse down. 
3491
3492 2008-01-15  Alp Toker  <alp@atoker.com>
3493
3494         Rubber-stamped by Anders.
3495
3496         Make the HTTP backend configurable in the GTK+ port. curl is currently
3497         the only option.
3498
3499         * GNUmakefile.am:
3500
3501 2008-01-15  Adele Peterson  <adele@apple.com>
3502
3503         Build fix.
3504
3505         * rendering/RenderThemeSafari.cpp: Removing MediaBackgroundAppearance.
3506
3507 2008-01-14  Samuel Weinig  <sam@webkit.org>
3508
3509         Reviewed by Darin.
3510
3511         Fix for <rdar://problem/5671040>
3512         REGRESSION: 6% HTML iBench regression from r28722 (getElementsByClassName)
3513
3514         On my most consistent tests, this brings the HTML iBench from 1.46 -> 1.41,
3515         which does not completely make up reported regression, but I was not able to
3516         reproduce those findings either.
3517
3518         * css/CSSStyleSelector.cpp:
3519         (WebCore::CSSStyleSelector::matchRules):
3520         (WebCore::CSSStyleSelector::checkOneSelector):
3521         * dom/ClassNames.cpp:
3522         (WebCore::ClassNames::parseClassAttribute):
3523         * dom/ClassNames.h:
3524         (WebCore::ClassNames::contains):
3525         (WebCore::ClassNames::operator[]):
3526
3527 2008-01-15  Adele Peterson  <adele@apple.com>
3528
3529         Build fix.  This time for real.
3530
3531         * rendering/RenderThemeSafari.cpp:
3532
3533 2008-01-15  Adele Peterson  <adele@apple.com>
3534
3535         Build fix.
3536
3537         * rendering/RenderThemeSafari.cpp:
3538
3539 2008-01-15  Dan Bernstein  <mitz@apple.com>
3540
3541         Reviewed by Darin Adler.
3542
3543         - fix <rdar://problem/5666926> svg/custom/use-css-no-effect-on-shadow-tree.svg is failing
3544
3545         * svg/SVGPreserveAspectRatio.cpp:
3546         (WebCore::SVGPreserveAspectRatio::getCTM): Changed the arguments' type
3547         from float to double in order to make the values passed to scale() and
3548         translate() on Mac OS X and on Windows the same.
3549         * svg/SVGPreserveAspectRatio.h:
3550
3551 2008-01-15  Alexey Proskuryakov  <ap@webkit.org>
3552
3553         Reviewed by Darin.
3554
3555         <rdar://problem/5342813> REGRESSION: Safari encodes mailto URLs incorrectly
3556
3557         Test: fast/encoding/mailto-always-utf-8.html
3558
3559         * platform/KURL.cpp: (WebCore::encodeRelativeString): Always use UTF-8 for mailto URLs.
3560
3561 2008-01-15  Adele Peterson  <adele@apple.com>
3562
3563         Reviewed by Adam and Antti.
3564
3565         WebCore part of fix for <rdar://problem/5619062> Add load progress indicator to video controls
3566
3567         * WebCore.base.exp: Removed symbol for wkGetMediaControlBackgroundImageData.  Added symbol for wkDrawMediaSliderTrack.
3568         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Removed case for MediaBackgroundAppearance.
3569         * css/html4.css: Removed -webkit-appearance: media-background rule for the media panel element.  Removed unnecessary margin for slider.
3570         * rendering/RenderStyle.h: (WebCore::): Removed MediaBackgroundAppearance.
3571
3572         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
3573           Call updateMediaPlayer more frequently so the load progress control gets updated appropriately.
3574         * platform/mac/WebCoreSystemInterface.h: Removed wkGetMediaControlBackgroundImageData.  Added wkDrawMediaSliderTrack.
3575         * platform/mac/WebCoreSystemInterface.mm: ditto.
3576
3577         * rendering/RenderTheme.h: Removed paintMediaBackground. Added paintMediaSliderTrack.
3578         * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): Call paintMediaSliderTrack for elements with MediaSliderAppearance.
3579         * rendering/RenderThemeMac.h: Removed paintMediaBackground. Added paintMediaSliderTrack.
3580         * rendering/RenderThemeMac.mm:
3581         (WebCore::RenderThemeMac::adjustSliderThumbSize): Added different sizes for the media slider thumb.
3582         (WebCore::RenderThemeMac::paintMediaSliderTrack): Added.  Calls wkDrawMediaSliderTrack with the percentage the media has loaded.
3583         * rendering/RenderThemeSafari.cpp: ditto.
3584         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
3585         (WebCore::RenderThemeSafari::paintMediaSliderTrack):
3586         * rendering/RenderThemeSafari.h:
3587
3588 2008-01-15  Alexey Proskuryakov  <ap@webkit.org>
3589
3590         Reviewed by Mark Rowe.
3591
3592         Some logging channels weren't initialized from user defaults.
3593