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