b05a50f4a291362511412a951d9d2b15e087f05f
[WebKit-https.git] / WebCore / ChangeLog
1 2007-12-12  Anders Carlsson  <andersca@apple.com>
2
3         Reviewed by Adam and Jon.
4
5         <rdar://problem/5349282>
6         popup blocking is not applied to plugins on Windows.
7         
8         Implement popup blocking. If the plug-in supports the new 
9         NPN_PushPopupsEnabledState/NPN_PopPopupsEnabledState API we just use that
10         to determine if a plug-in request can open new windows.
11         
12         If a plug-in does not support the new API, we assume that a plug-in can open new windows
13         in response to either mouse click or key press events.
14         
15         * plugins/win/PluginViewWin.cpp:
16         (WebCore::PluginRequestWin::PluginRequestWin):
17         (WebCore::PluginRequestWin::shouldAllowPopups):
18         Add new shouldAllowPopups member.
19         
20         (WebCore::PluginViewWin::popPopupsStateTimerFired):
21         Reset the popup state.
22         
23         (WebCore::isWindowsMessageUserGesture):
24         New function that given a windows message id returns whether it's a user gesture or not.
25         
26         (WebCore::PluginViewWin::wndProc):
27         Allow popups if the window message is a user gesture.
28         
29         (WebCore::PluginViewWin::dispatchNPEvent):
30         New method that dispatches an NPEvent, turning on popups if necessary.
31         
32         (WebCore::PluginViewWin::paint):
33         (WebCore::PluginViewWin::handleKeyboardEvent):
34         (WebCore::PluginViewWin::handleMouseEvent):
35         Call dispatchNPEvent().
36         
37         (WebCore::PluginViewWin::performRequest):
38         (WebCore::PluginViewWin::load):
39         Add calls to shouldAllowPopups().
40         
41         (WebCore::PluginViewWin::pushPopupsEnabledState):
42         (WebCore::PluginViewWin::popPopupsEnabledState):
43         New methods that maintain the popup state stack.
44         
45         (WebCore::PluginViewWin::arePopupsAllowed):
46         New method that returns whether popups are allowed.
47         
48         (WebCore::PluginViewWin::PluginViewWin):
49         * plugins/win/PluginViewWin.h:
50         Add new instance variables.
51         
52         * plugins/win/npapi.cpp:
53         (NPN_PushPopupsEnabledState):
54         (NPN_PopPopupsEnabledState):
55         Implement these.
56
57 2007-12-12  Dan Bernstein  <mitz@apple.com>
58
59         Reviewed by John Sullivan.
60
61         - fix a bug in debug builds only where selecting an earlier item in
62           a popup selects the first item
63
64         Test: fast/forms/menulist-selection-reset.html
65
66         * html/HTMLSelectElement.cpp:
67         (WebCore::HTMLSelectElement::recalcListItems): Added an argument that
68         tells that function whether it should update the selected state of
69         option elements.
70         (WebCore::HTMLSelectElement::checkListItems): Changed to pass false
71         as the above argument.
72         * html/HTMLSelectElement.h:
73
74 2007-12-12  Adele Peterson  <adele@apple.com>
75
76         Reviewed by Geoff.
77
78         Fix for <rdar://problem/5643054> Remove cue point implementation for media elements
79
80         When the specification for cue ranges is more final, we will implement those.
81
82         * html/HTMLMediaElement.cpp:
83         (WebCore::HTMLMediaElement::~HTMLMediaElement):
84         (WebCore::HTMLMediaElement::load):
85         * html/HTMLMediaElement.h:
86         * html/HTMLMediaElement.idl:
87         * platform/graphics/MediaPlayer.cpp:
88         * platform/graphics/MediaPlayer.h:
89         (WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
90         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
91         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
92         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
93         (WebCore::MediaPlayerPrivate::load):
94         (WebCore::MediaPlayerPrivate::play):
95         (WebCore::MediaPlayerPrivate::pause):
96         (WebCore::MediaPlayerPrivate::setEndTime):
97         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
98         (WebCore::MediaPlayerPrivate::endPointTimerFired):
99         (WebCore::MediaPlayerPrivate::timeChanged):
100         (WebCore::MediaPlayerPrivate::didEnd):
101         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
102         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
103         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
104         (WebCore::MediaPlayerPrivate::endPointTimerFired):
105         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
106
107 2007-12-12  MorganL  <morganl.webkit@yahoo.com>
108
109         Reviewed by Maciej.
110
111         Fixes:
112         http://bugs.webkit.org/show_bug.cgi?id=16408
113
114         When navigating back/forward to a http:// link, we should prefer to
115         load from cache if possible.
116
117         * loader/FrameLoader.cpp:
118
119 2007-12-12  Anders Carlsson  <andersca@apple.com>
120
121         Reviewed by Sam.
122
123         <rdar://problem/5132003>
124         dumpResourceLoadCallbacks is not implemented in DRT on Windows.
125         
126         * platform/network/cf/ResourceErrorCF.cpp:
127         (WebCore::ResourceError::unpackPlatformError):
128         Handle kCFErrorDomainWinSock.
129         
130         * platform/network/cf/ResourceHandleCFNet.cpp:
131         (WebCore::willSendRequest):
132         Ignore willSendRequest calls where the redirect response is null, like we do in 
133         the Mac version.
134
135 2007-12-12  Steve Falkenburg  <sfalken@apple.com>
136
137         <rdar://problem/5643785> Fix iBench regression caused by mis-placed nested timer check.
138         
139         Reviewed by Anders.
140
141         * platform/win/SharedTimerWin.cpp:
142         (WebCore::TimerWindowWndProc): Don't set high-resolution timer flag inside non-high-resolution timer proc.
143
144 2007-12-12  Beth Dakin  <bdakin@apple.com>
145
146         Reviewed by Oliver.
147
148         Fix for <rdar://problem/5643770> REGRESSION: Free-standing SVGs 
149         with width and height 100% clip to 300 x 150
150
151         Though it was correct in an earlier iteration of my patch, it is 
152         not sufficient in the final, committed version to ask if the 
153         relativeWidthValue() or relativeHeightValue() is greater than 0 
154         just to determine if one has been set, for, they are now 
155         initialized to 300 and 150 respectively! This patch instead adds a 
156         bool to keep track of whether a container size has been set, and 
157         only used the relative value if it has.
158
159         * rendering/RenderSVGRoot.cpp:
160         (WebCore::RenderSVGRoot::calcViewport):
161         * svg/SVGSVGElement.cpp:
162         (WebCore::SVGSVGElement::SVGSVGElement):
163         * svg/SVGSVGElement.h:
164         (WebCore::SVGSVGElement::setContainerSize):
165         (WebCore::SVGSVGElement::hasSetContainerSize):
166
167 2007-12-12  Brady Eidson  <beidson@apple.com>
168
169         Reviewed by Steve Falkenburg 
170
171         <rdar://problem/5012636> - WebURLProtectionSpace::realm returns the hostname rather than the authentication realm
172
173         * platform/network/ProtectionSpace.cpp:
174         (WebCore::ProtectionSpace::ProtectionSpace): Assign the realm to m_realm, instead of the host
175
176 2007-12-12  Alp Toker  <alp@atoker.com>
177
178         Reviewed by Maciej.
179
180         http://bugs.webkit.org/show_bug.cgi?id=16388
181         [GTK] Widget::setCursor() gets called frequently
182
183         Cache the current cursor to avoid calling gdk_window_set_cursor() when
184         there's no change in cursor.
185
186         * platform/gtk/WidgetGtk.cpp:
187         (WebCore::Widget::Widget):
188         (WebCore::Widget::cursor):
189         (WebCore::Widget::setCursor):
190
191 2007-12-12  Rodney Dawes  <dobey@wayofthemonkey.com>
192
193         Reviewed by Maciej.
194
195         http://bugs.webkit.org/show_bug.cgi?id=16342
196         Build Warning and Error fixes in WebCore GTK+
197
198         Use C-style casts for casting function pointers to gpointer
199         Use static_cast<int> to cast a float to int to fix a warning
200
201         * platform/gtk/PlatformScrollBarGtk.cpp:
202         (PlatformScrollbar::PlatformScrollbar):
203         (PlatformScrollbar::~PlatformScrollbar):
204         (PlatformScrollbar::gtkValueChanged):
205         * platform/gtk/ThreadingGtk.cpp:
206         (callFunctionOnMainThread):
207         (callOnMainThread):
208
209 2007-12-12  Dan Bernstein  <mitz@apple.com>
210
211         Reviewed by Darin Adler.
212
213         - better fix for a crash when pressing a key that is not associated
214           with a command
215
216         * editing/EditorCommand.cpp:
217         (WebCore::Editor::command): Return the empty command if the command name
218         is empty.
219
220 2007-12-12  Alexey Proskuryakov  <ap@webkit.org>
221
222         Reviewed by Darin.
223
224         http://bugs.webkit.org/show_bug.cgi?id=16410
225         Implement isKeypadEvent() on Windows
226
227         Test: platform/win/fast/events/keyLocation-numpad.html
228
229         * platform/win/KeyEventWin.cpp:
230         (WebCore::isKeypadEvent): Added.
231         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Also fixed a mistake with autorepeat.
232
233 2007-12-12  Oliver Hunt  <oliver@apple.com>
234
235         Reviewed by Maciej.
236
237         <rdar://problem/5071781> window.mouseout events are not sent 
238         to window when mouse moves out of window 
239
240         Make PlatformMouseEvent recognise WM_MOUSELEAVE.
241
242         * platform/win/PlatformMouseEventWin.cpp:
243         (WebCore::messageToEventType):
244         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
245
246 2007-12-12  Sam Weinig  <sam@webkit.org>
247
248         Fix Mac release build.
249
250         * WebCore.base.exp:
251
252 2007-12-12  Sam Weinig  <sam@webkit.org>
253
254         Build fix for Qt, Gtk, and Wx.
255
256         * css/CSSParser.cpp:
257         (WebCore::CSSParser::parseValue):
258         * loader/win/FrameLoaderWin.cpp:
259         (WebCore::FrameLoader::urlSelected):
260         * platform/network/curl/ResourceHandleManager.cpp:
261         (WebCore::parseDataUrl):
262         (WebCore::ResourceHandleManager::startJob):
263         * platform/network/win/CookieJarWin.cpp:
264         (WebCore::setCookies):
265         (WebCore::cookies):
266         * platform/network/win/ResourceHandleWin.cpp:
267         (WebCore::ResourceHandle::start):
268         * platform/qt/PasteboardQt.cpp:
269         (WebCore::Pasteboard::writeURL):
270
271 2007-12-11  Dan Bernstein  <mitz@apple.com>
272
273         Reviewed by Maciej Stachowiak.
274
275         - allow non-integer font sizes on Windows for small caps
276
277         * platform/graphics/win/FontDataWin.cpp:
278         (WebCore::FontData::smallCapsFontData):
279         * platform/graphics/win/FontPlatformData.h:
280         (WebCore::FontPlatformData::size):
281         (WebCore::FontPlatformData::setSize):
282         * platform/graphics/win/FontPlatformDataWin.cpp:
283         (WebCore::FontPlatformData::FontPlatformData):
284
285 2007-12-11  Sam Weinig  <sam@webkit.org>
286
287         Build fix for Qt, Gtk, and Wx.
288
289         * platform/gtk/CookieJarGtk.cpp:
290         (WebCore::setCookies):
291         (WebCore::cookies):
292         * platform/qt/ClipboardQt.cpp:
293         (WebCore::ClipboardQt::writeURL):
294         * platform/qt/CookieJarQt.cpp:
295         (WebCore::setCookies):
296         (WebCore::cookies):
297         * platform/wx/PasteboardWx.cpp:
298         (WebCore::Pasteboard::writeURL):
299
300 2007-12-11  Sam Weinig  <sam@webkit.org>
301
302         Reviewed by Darin Adler.
303
304         Scrub URL out of the tree in preparation for renaming KURL to URL.
305             - Renames Document::URL() -> Document::url()
306             - Renames DocumentLoader::URL() -> DocumentLoader::url()
307             - Renames KURL::url() to KURL::string() and KURL::deprecatedString()
308             - Remove FrameLoader::URL()
309             - Various variable renames.
310
311         The change from Document::URL() to Document::url() required changes
312         to the bindings scripts as well, because URL() is the name of a DOM
313         method.  The code generation scripts now have code to special case URL()
314         to url().
315
316         * WebCore.base.exp:
317         * bindings/js/kjs_events.cpp:
318         (WebCore::JSLazyEventListener::parseCode):
319         * bindings/js/kjs_navigator.cpp:
320         (KJS::Navigator::getValueProperty):
321         * bindings/js/kjs_proxy.cpp:
322         (WebCore::KJSProxy::initScript):
323         * bindings/js/kjs_window.cpp:
324         (KJS::Window::put):
325         (KJS::Window::allowsAccessFrom):
326         (KJS::Location::put):
327         (KJS::LocationProtoFuncReplace::callAsFunction):
328         (KJS::LocationProtoFuncReload::callAsFunction):
329         (KJS::LocationProtoFuncAssign::callAsFunction):
330         * bindings/scripts/CodeGenerator.pm:
331         * bindings/scripts/CodeGeneratorCOM.pm:
332         * bindings/scripts/CodeGeneratorJS.pm:
333         * bindings/scripts/CodeGeneratorObjC.pm:
334         * css/CSSImportRule.cpp:
335         (WebCore::CSSImportRule::insertedIntoParent):
336         * css/CSSParser.cpp:
337         (WebCore::CSSParser::parseValue):
338         (WebCore::CSSParser::parseContent):
339         (WebCore::CSSParser::parseBackgroundImage):
340         (WebCore::CSSParser::parseFontFaceSrc):
341         (WebCore::CSSParser::parseBorderImage):
342         (WebCore::CSSParser::createImportRule):
343         * css/CSSStyleSelector.cpp:
344         (WebCore::CSSStyleSelector::setEncodedURL):
345         * dom/Document.cpp:
346         (WebCore::Document::processHttpEquiv):
347         (WebCore::Document::cookie):
348         (WebCore::Document::setCookie):
349         (WebCore::Document::domain):
350         (WebCore::Document::setDomain):
351         (WebCore::Document::getImageMap):
352         (WebCore::Document::completeURL):
353         * dom/Document.h:
354         (WebCore::Document::url):
355         (WebCore::Document::baseURL):
356         * dom/Element.cpp:
357         (WebCore::Element::baseURI):
358         * dom/ProcessingInstruction.h:
359         * dom/StyledElement.cpp:
360         (WebCore::StyledElement::addCSSImageProperty):
361         * dom/StyledElement.h:
362         * dom/XMLTokenizer.cpp:
363         (WebCore::XMLTokenizer::endElementNs):
364         (WebCore::XMLTokenizer::end):
365         (WebCore::):
366         * dom/XMLTokenizer.h:
367         * editing/Editor.cpp:
368         (WebCore::Editor::copy):
369         * editing/markup.cpp:
370         (WebCore::completeURLs):
371         * history/CachedPage.h:
372         (WebCore::CachedPage::url):
373         * history/HistoryItem.cpp:
374         (WebCore::HistoryItem::HistoryItem):
375         (WebCore::HistoryItem::setURL):
376         (WebCore::HistoryItem::isCurrentDocument):
377         * html/HTMLBaseElement.cpp:
378         (WebCore::HTMLBaseElement::process):
379         * html/HTMLParser.cpp:
380         (WebCore::HTMLParser::reportErrorToConsole):
381         * html/HTMLScriptElement.cpp:
382         (WebCore::HTMLScriptElement::childrenChanged):
383         (WebCore::HTMLScriptElement::insertedIntoDocument):
384         (WebCore::HTMLScriptElement::evaluateScript):
385         * html/HTMLScriptElement.h:
386         * html/HTMLTokenizer.cpp:
387         (WebCore::HTMLTokenizer::scriptExecution):
388         * loader/Cache.cpp:
389         (WebCore::createResource):
390         (WebCore::Cache::requestResource):
391         * loader/CachedCSSStyleSheet.cpp:
392         (WebCore::CachedCSSStyleSheet::checkNotify):
393         * loader/CachedResource.cpp:
394         (WebCore::CachedResource::CachedResource):
395         * loader/CachedResource.h:
396         (WebCore::CachedResource::):
397         * loader/CachedScript.h:
398         * loader/DocLoader.cpp:
399         (WebCore::DocLoader::checkForReload):
400         (WebCore::DocLoader::requestResource):
401         * loader/DocumentLoader.cpp:
402         (WebCore::DocumentLoader::url):
403         (WebCore::DocumentLoader::replaceRequestURLForAnchorScroll):
404         (WebCore::DocumentLoader::setRequest):
405         (WebCore::DocumentLoader::startLoadingMainResource):
406         * loader/DocumentLoader.h:
407         * loader/FrameLoader.cpp:
408         (WebCore::FormSubmission::FormSubmission):
409         (WebCore::ScheduledRedirection::ScheduledRedirection):
410         (WebCore::FrameLoader::changeLocation):
411         (WebCore::FrameLoader::urlSelected):
412         (WebCore::FrameLoader::requestFrame):
413         (WebCore::FrameLoader::loadSubframe):
414         (WebCore::FrameLoader::submitFormAgain):
415         (WebCore::FrameLoader::submitForm):
416         (WebCore::FrameLoader::didExplicitOpen):
417         (WebCore::FrameLoader::replaceContentsWithScriptResult):
418         (WebCore::FrameLoader::executeScript):
419         (WebCore::FrameLoader::receivedFirstData):
420         (WebCore::FrameLoader::begin):
421         (WebCore::FrameLoader::startIconLoader):
422         (WebCore::FrameLoader::commitIconURLToIconDatabase):
423         (WebCore::FrameLoader::scheduleRefresh):
424         (WebCore::FrameLoader::redirectionTimerFired):
425         (WebCore::FrameLoader::loadPlugin):
426         (WebCore::FrameLoader::didNotOpenURL):
427         (WebCore::FrameLoader::updatePolicyBaseURL):
428         (WebCore::FrameLoader::scrollToAnchor):
429         (WebCore::FrameLoader::startRedirectionTimer):
430         (WebCore::FrameLoader::load):
431         (WebCore::FrameLoader::canLoad):
432         (WebCore::FrameLoader::shouldHideReferrer):
433         (WebCore::FrameLoader::shouldAllowNavigation):
434         (WebCore::FrameLoader::commitProvisionalLoad):
435         (WebCore::FrameLoader::clientRedirected):
436         (WebCore::FrameLoader::open):
437         (WebCore::FrameLoader::didTellBridgeAboutLoad):
438         (WebCore::FrameLoader::haveToldBridgeAboutLoad):
439         (WebCore::FrameLoader::post):
440         (WebCore::FrameLoader::loadResourceSynchronously):
441         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
442         (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent):
443         (WebCore::FrameLoader::createHistoryItem):
444         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget):
445         (WebCore::FrameLoader::loadItem):
446         (WebCore::FrameLoader::urlsMatchItem):
447         (WebCore::FrameLoader::recursiveGoToItem):
448         (WebCore::FrameLoader::updateHistoryForStandardLoad):
449         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory):
450         * loader/FrameLoader.h:
451         (WebCore::FrameLoader::url):
452         * loader/ImageDocument.cpp:
453         (WebCore::ImageDocument::createDocumentStructure):
454         * loader/MainResourceLoader.cpp:
455         (WebCore::shouldLoadAsEmptyDocument):
456         (WebCore::MainResourceLoader::didFinishLoading):
457         * loader/NavigationAction.cpp:
458         (WebCore::NavigationAction::NavigationAction):
459         * loader/NavigationAction.h:
460         (WebCore::NavigationAction::url):
461         * loader/PluginDocument.cpp:
462         (WebCore::PluginTokenizer::createDocumentStructure):
463         * loader/SubresourceLoader.cpp:
464         (WebCore::SubresourceLoader::load):
465         (WebCore::SubresourceLoader::create):
466         * loader/icon/IconLoader.cpp:
467         (WebCore::IconLoader::startLoading):
468         (WebCore::IconLoader::finishLoading):
469         * loader/loader.cpp:
470         (WebCore::Loader::servePendingRequests):
471         * loader/mac/LoaderNSURLExtras.m:
472         (urlOriginalData):
473         * page/Chrome.cpp:
474         (WebCore::Chrome::setToolTip):
475         * page/ContextMenuController.cpp:
476         (WebCore::ContextMenuController::contextMenuItemSelected):
477         * page/Frame.cpp:
478         (WebCore::Frame::setUserStyleSheetLocation):
479         * page/InspectorController.cpp:
480         (WebCore::InspectorResource::type):
481         (WebCore::addSourceToFrame):
482         (WebCore::InspectorController::addScriptResource):
483         (WebCore::InspectorController::updateScriptResourceRequest):
484         (WebCore::InspectorController::didCommitLoad):
485         * page/mac/WebCoreFrameBridge.mm:
486         (-[WebCoreFrameBridge getData:andResponse:forURL:]):
487         * platform/KURL.h:
488         (WebCore::KURL::string):
489         (WebCore::KURL::deprecatedString):
490         * platform/mac/ClipboardMac.mm:
491         (WebCore::ClipboardMac::getData):
492         * platform/mac/CookieJar.mm:
493         (WebCore::cookies):
494         (WebCore::setCookies):
495         * platform/mac/PasteboardMac.mm:
496         (WebCore::Pasteboard::writeURL):
497         (WebCore::fileWrapperForImage):
498         (WebCore::Pasteboard::writeImage):
499         (WebCore::Pasteboard::plainText):
500         * platform/network/ResourceHandle.cpp:
501         (WebCore::ResourceHandle::portAllowed):
502         * platform/network/ResourceRequestBase.cpp:
503         (WebCore::ResourceRequestBase::isNull):
504         * platform/network/cf/ResourceHandleCFNet.cpp:
505         (WebCore::willSendRequest):
506         (WebCore::didReceiveResponse):
507         (WebCore::didReceiveData):
508         (WebCore::didFinishLoading):
509         (WebCore::didFail):
510         (WebCore::didReceiveChallenge):
511         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
512         (WebCore::ResourceHandle::~ResourceHandle):
513         (WebCore::ResourceHandle::start):
514         * platform/win/ClipboardUtilitiesWin.cpp:
515         (WebCore::createGlobalData):
516         (WebCore::urlToMarkup):
517         * platform/win/ClipboardWin.cpp:
518         (WebCore::writeURL):
519         (WebCore::writeImageToDataObject):
520         (WebCore::ClipboardWin::writeURL):
521         (WebCore::ClipboardWin::writeRange):
522         * platform/win/PasteboardWin.cpp:
523         (WebCore::Pasteboard::writeSelection):
524         (WebCore::Pasteboard::writeURL):
525         * plugins/win/PluginDatabaseWin.cpp:
526         (WebCore::PluginDatabaseWin::findPlugin):
527         * plugins/win/PluginStreamWin.cpp:
528         (WebCore::PluginStreamWin::startStream):
529         (WebCore::PluginStreamWin::destroyStream):
530         * plugins/win/PluginViewWin.cpp:
531         (WebCore::scriptStringIfJavaScriptURL):
532         (WebCore::PluginViewWin::performRequest):
533         * svg/SVGImageLoader.cpp:
534         (WebCore::SVGImageLoader::updateFromElement):
535         * xml/XMLHttpRequest.cpp:
536         (WebCore::XMLHttpRequest::getResponseXML):
537         (WebCore::XMLHttpRequest::urlMatchesDocumentDomain):
538         * xml/XSLImportRule.cpp:
539         (WebCore::XSLImportRule::loadSheet):
540         * xml/XSLTProcessor.cpp:
541         (WebCore::XSLTProcessor::createDocumentFromSource):
542         (WebCore::xsltStylesheetPointer):
543         (WebCore::xmlDocPtrFromNode):
544
545 2007-12-11  Beth Dakin  <bdakin@apple.com>
546
547         Reviewed by Darin.
548
549         Fix for <rdar://problem/5641255> SVGs with width and height 100% 
550         fail to render when used as background images
551
552         CachedImage now has a setImageContainerSize function. It is only 
553         needed for SVG right now.
554         * loader/CachedImage.cpp:
555         (WebCore::CachedImage::setImageContainerSize):
556         * loader/CachedImage.h:
557
558         Relatively sized SVGs have no intrinsic size. Because this call is 
559         low-level enough that we cannot pass in the container size and get 
560         the real size of the SVG, we need to know if it has relative 
561         dimensions, and if so, we need to get the size from scaledTileSize.
562         * platform/graphics/Image.cpp:
563         (WebCore::Image::drawTiled):
564         * platform/graphics/Image.h:
565         (WebCore::Image::setContainerSize):
566         (WebCore::Image::hasRelativeWidth):
567         (WebCore::Image::hasRelativeHeight):
568
569         Re-factored calculateBackgroundSize a bit so that it returns an 
570         IntSize. Made it a member function so that it can send m_width and 
571         m_height along to setImageContainerSize.
572         * rendering/RenderBox.cpp:
573         (WebCore::RenderBox::calculateBackgroundSize):
574         (WebCore::RenderBox::calculateBackgroundImageGeometry):
575         * rendering/RenderBox.h:
576
577         Need to account for relatively sized SVGs in calcViewport()
578         * rendering/RenderSVGRoot.cpp:
579         (WebCore::RenderSVGRoot::calcViewport):
580         
581         Added new member variables to store the size of the SVG container. 
582         relativeWidthValue() and relativeHeightValue() use the stored SVG 
583         container size to correctly calculate the width and height of a 
584         relatively sized SVG.
585         * svg/SVGSVGElement.cpp:
586         (WebCore::SVGSVGElement::SVGSVGElement):
587         (WebCore::SVGSVGElement::setContainerSize):
588         (WebCore::SVGSVGElement::relativeWidthValue):
589         (WebCore::SVGSVGElement::relativeHeightValue):
590         * svg/SVGSVGElement.h:
591         (WebCore::SVGSVGElement::containerSize):
592         
593         Re-factored size calculations to use the size of the container.
594         * svg/graphics/SVGImage.cpp:
595         (WebCore::SVGImage::setContainerSize):
596         (WebCore::SVGImage::size):
597         (WebCore::SVGImage::hasRelativeWidth):
598         (WebCore::SVGImage::hasRelativeHeight):
599         * svg/graphics/SVGImage.h:
600
601 2007-12-11  Darin Adler  <darin@apple.com>
602
603         * editing/Editor.cpp:
604         (WebCore::Editor::yankFromKillRing): Try to fix non-Mac builds by adding
605         a missing return statement.
606
607 2007-12-11  Darin Adler  <darin@apple.com>
608
609         Reviewed by Geoff.
610
611         - exposed many new commands to the DOM Document executeCommand function by
612           merging the JSEditor and Editor executeCommand implementations
613         - replaced the execCommand function with a EditorCommand class
614         - replaced the WTF::StrHash<> class template with the WebCore::StringHash class
615         - replaced the WTF::CaseInsensitiveHash<> class template with the
616           WebCore::CaseFoldingHash class
617
618         * WebCore.base.exp: Updated.
619         * WebCore.pro: Added EditorCommand.cpp, removed JSEditor.cpp.
620         * WebCore.vcproj/WebCore.vcproj: Ditto.
621         * WebCore.xcodeproj/project.pbxproj: Ditto.
622         * WebCoreSources.bkl: Ditto.
623
624         * dom/Document.cpp:
625         (WebCore::Document::Document): Removed code to set up m_jsEditor.
626         (WebCore::Document::~Document): Removed code to delete m_jsEditor.
627         (WebCore::command): Added. Helper function that gets an Editor::Command.
628         (WebCore::Document::executeCommand): Changed to use Editor::Command instead of
629         JSEditor.
630         (WebCore::Document::queryCommandEnabled): Ditto.
631         (WebCore::Document::queryCommandIndeterm):
632         (WebCore::Document::queryCommandState): Ditto.
633         (WebCore::Document::queryCommandSupported): Ditto.
634         (WebCore::Document::queryCommandValue): Ditto.
635
636         * dom/Document.h: Removed JSEditor, jsEditor, m_jsEditor. Changed to
637         use CaseFoldingHash.
638
639         * editing/Editor.cpp:
640         (WebCore::Editor::selectionForCommand): Renamed from selectionForEvent and
641         made into a member function so it is accessible from the new EditorCommand.cpp file.
642         Also changed to get the selection from the passed-in frame instead of from the
643         page, because this should work on the targeted frame unless the event overrides it.
644         (WebCore::Editor::handleKeypress): Updated for selectionForCommand change.
645         (WebCore::Editor::handleInputMethodKeypress): Ditto.
646         (WebCore::imageElementFromImageDocument): Renamed and changed to return
647         a HTMLImageElement instead of a Node*.
648         (WebCore::Editor::canCopy): Updated for name change.
649         (WebCore::Editor::selectionUnorderedListState): Updated for TriState change.
650         (WebCore::Editor::selectionOrderedListState): Ditto.
651         (WebCore::Editor::selectionStartHasStyle): Make type of local more specific.
652         (WebCore::updateState): Moved here from Frame.
653         (WebCore::Editor::selectionHasStyle): Ditto.
654         (WebCore::Editor::Editor): Initialize m_shouldStartNewKillRingSequence.
655         (WebCore::Editor::insertTextWithoutSendingTextEvent): Updated for
656         selectionForCommand change.
657         (WebCore::Editor::copy): Updated for imageElementFromImageDocument change.
658         (WebCore::Editor::toggleBold): Call the ToggleBold command via the command
659         machinery since it's no longer in this file as a local function.
660         (WebCore::Editor::toggleUnderline): Call the ToggleUnderline command.
661         (WebCore::Editor::setBaseWritingDirection): Change type of argument and of
662         local variable.
663         (WebCore::Editor::addToKillRing): Moved here from EditorMac. Not useful
664         without a kill ring, but it's relatively straightforward to implement one.
665         (WebCore::Editor::appendToKillRing): Put default implementation here for
666         platforms other than Mac. We should probably put a simple kill ring
667         implementation here -- doesn't need to be shared with the OS oh platforms
668         other than Mac.
669         (WebCore::Editor::prependToKillRing): Ditto.
670         (WebCore::Editor::yankFromKillRing): Ditto.
671         (WebCore::Editor::startNewKillRingSequence): Ditto.
672         (WebCore::Editor::setKillRingToYankedState): Ditto.
673
674         * editing/Editor.h: Moved the TriState enum here instead of inside the
675         Frame class. Added EditorCommandSource enum. Moved selectionHasStyle
676         here from the Frame class. Added Editor::Command class with five functions
677         for the various things you can do with a command (execute it, check if it
678         can be used, and its state and value). Changed hte parameter of
679         setBaseWritingDirection to be a const String& rather than a String.
680         Got rid of the kill-ring-related operations, but added the kill ring
681         functions themselves. Made selectedRange() public. Made the
682         m_startNewKillRingSequence not Mac-specific and added "should" to its
683         name.
684
685         * editing/EditorCommand.cpp: Copied from WebCore/editing/Editor.cpp.
686         Retained only the editing commands.
687         (WebCore::targetFrame): Moved to the top of the file.
688         (WebCore::executeApplyStyle): Added. Helper function for commands
689         that need to apply styles.
690         (WebCore::executeToggleStyle): Added. Helper function for commands
691         that need to toggle styles based on the style of the start of selection.
692         (WebCore::executeApplyParagraphStyle): Added. Like executeApplyStyle, but
693         for paragraph styles.
694         (WebCore::executeInsertFragment): Added. Helper function for commands
695         that need to insert a DOM fragment.
696         (WebCore::executeInsertNode): Added. Helper function for commands that
697         need to insert a tree rooted in a single DOM node.
698         (WebCore::stateStyle): Added. Helper function for the state of commands
699         that represent style.
700         (WebCore::valueStyle): Added. Helper function for the value of commands
701         that represent style.
702         (WebCore::canScroll): Added. Helper functions for some move and scroll
703         commands that need to determine if the renderer they are in can scroll.
704         (WebCore::unionDOMRanges): Moved here from EditorMac.
705         (WebCore::executeBackColor):
706         (WebCore::executeBackwardDelete):
707         (WebCore::executeCopy):
708         (WebCore::executeCreateLink):
709         (WebCore::executeCut):
710         (WebCore::executeDelete):
711         (WebCore::executeDeleteToMark):
712         (WebCore::executeDeleteWordBackward):
713         (WebCore::executeDeleteWordForward):
714         (WebCore::executeFindString):
715         (WebCore::executeFontName):
716         (WebCore::executeFontSize):
717         (WebCore::executeFontSizeDelta):
718         (WebCore::executeForeColor):
719         (WebCore::executeFormatBlock):
720         (WebCore::executeForwardDelete):
721         (WebCore::executeIndent):
722         (WebCore::executeInsertBacktab):
723         (WebCore::executeInsertHorizontalRule):
724         (WebCore::executeInsertHTML):
725         (WebCore::executeInsertImage):
726         (WebCore::executeInsertLineBreak):
727         (WebCore::executeInsertNewline):
728         (WebCore::executeInsertNewlineInQuotedContent):
729         (WebCore::executeInsertOrderedList):
730         (WebCore::executeInsertParagraph):
731         (WebCore::executeInsertTab):
732         (WebCore::executeInsertText):
733         (WebCore::executeInsertUnorderedList):
734         (WebCore::executeJustifyCenter):
735         (WebCore::executeJustifyFull):
736         (WebCore::executeJustifyLeft):
737         (WebCore::executeJustifyRight):
738         (WebCore::executeMoveBackward):
739         (WebCore::executeMoveBackwardAndModifySelection):
740         (WebCore::executeMoveDown):
741         (WebCore::executeMoveDownAndModifySelection):
742         (WebCore::executeMoveDownByPageAndModifyCaret):
743         (WebCore::executeMoveForward):
744         (WebCore::executeMoveForwardAndModifySelection):
745         (WebCore::executeMoveLeft):
746         (WebCore::executeMoveLeftAndModifySelection):
747         (WebCore::executeMoveRight):
748         (WebCore::executeMoveRightAndModifySelection):
749         (WebCore::executeMoveToBeginningOfDocument):
750         (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
751         (WebCore::executeMoveToBeginningOfLine):
752         (WebCore::executeMoveToBeginningOfLineAndModifySelection):
753         (WebCore::executeMoveToBeginningOfParagraph):
754         (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
755         (WebCore::executeMoveToBeginningOfSentence):
756         (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
757         (WebCore::executeMoveToEndOfDocument):
758         (WebCore::executeMoveToEndOfDocumentAndModifySelection):
759         (WebCore::executeMoveToEndOfSentence):
760         (WebCore::executeMoveToEndOfSentenceAndModifySelection):
761         (WebCore::executeMoveToEndOfLine):
762         (WebCore::executeMoveToEndOfLineAndModifySelection):
763         (WebCore::executeMoveToEndOfParagraph):
764         (WebCore::executeMoveToEndOfParagraphAndModifySelection):
765         (WebCore::executeMoveParagraphBackwardAndModifySelection):
766         (WebCore::executeMoveParagraphForwardAndModifySelection):
767         (WebCore::executeMoveUp):
768         (WebCore::executeMoveUpAndModifySelection):
769         (WebCore::executeMoveUpByPageAndModifyCaret):
770         (WebCore::executeMoveWordBackward):
771         (WebCore::executeMoveWordBackwardAndModifySelection):
772         (WebCore::executeMoveWordForward):
773         (WebCore::executeMoveWordForwardAndModifySelection):
774         (WebCore::executeMoveWordLeft):
775         (WebCore::executeMoveWordLeftAndModifySelection):
776         (WebCore::executeMoveWordRight):
777         (WebCore::executeMoveWordRightAndModifySelection):
778         (WebCore::executeOutdent):
779         (WebCore::executePaste):
780         (WebCore::executePasteAndMatchStyle):
781         (WebCore::executePrint):
782         (WebCore::executeRedo):
783         (WebCore::executeRemoveFormat):
784         (WebCore::executeSelectAll):
785         (WebCore::executeSelectToMark):
786         (WebCore::executeSetMark):
787         (WebCore::executeStrikethrough):
788         (WebCore::executeSubscript):
789         (WebCore::executeSuperscript):
790         (WebCore::executeSwapWithMark):
791         (WebCore::executeToggleBold):
792         (WebCore::executeToggleItalic):
793         (WebCore::executeTranspose):
794         (WebCore::executeUnderline):
795         (WebCore::executeUndo):
796         (WebCore::executeUnlink):
797         (WebCore::executeUnscript):
798         (WebCore::executeUnselect):
799         (WebCore::executeYank):
800         (WebCore::executeYankAndSelect):
801         (WebCore::supported):
802         (WebCore::supportedPaste):
803         (WebCore::enabled):
804         (WebCore::enabledAnySelection):
805         (WebCore::enabledAnySelectionAndMark):
806         (WebCore::enableCaretInEditableText):
807         (WebCore::enabledCopy):
808         (WebCore::enabledCut):
809         (WebCore::enabledInEditableText):
810         (WebCore::enabledInRichlyEditableText):
811         (WebCore::enabledPaste):
812         (WebCore::enabledRangeInEditableText):
813         (WebCore::enabledRangeInRichlyEditableText):
814         (WebCore::enabledRedo):
815         (WebCore::enabledUndo):
816         (WebCore::stateNone):
817         (WebCore::stateBold):
818         (WebCore::stateItalic):
819         (WebCore::stateOrderedList):
820         (WebCore::stateStrikethrough):
821         (WebCore::stateSubscript):
822         (WebCore::stateSuperscript):
823         (WebCore::stateUnderline):
824         (WebCore::stateUnorderedList):
825         (WebCore::valueNull):
826         (WebCore::valueBackColor):
827         (WebCore::valueFontName):
828         (WebCore::valueFontSize):
829         (WebCore::valueFontSizeDelta):
830         (WebCore::valueForeColor):
831         (WebCore::createCommandMap): Added lots of commands, including all the commands
832         from JSEditor. A few commands needed different behavior based on whether they are
833         invoked from the DOM or a keyboard binding.
834         (WebCore::Editor::command): Added. Gets a command object given a name.
835         (WebCore::Editor::Command::Command): Added.
836         (WebCore::Editor::Command::execute): Added.
837         (WebCore::Editor::Command::isSupported): Added.
838         (WebCore::Editor::Command::isEnabled): Added.
839         (WebCore::Editor::Command::state): Added.
840         (WebCore::Editor::Command::value): Added.
841         (WebCore::Editor::execCommand): Changed to call command().execute().
842
843         * editing/JSEditor.cpp: Removed.
844         * editing/JSEditor.h: Removed.
845
846         * editing/mac/EditorMac.mm: Changed to provide kill ring primitives intead of
847         kill ring commands, so the kill ring commands can be cross-platform.
848         (WebCore::Editor::appendToKillRing): Added.
849         (WebCore::Editor::prependToKillRing): Added.
850         (WebCore::Editor::yankFromKillRing): Added.
851         (WebCore::Editor::startNewKillRingSequence): Added.
852         (WebCore::Editor::setKillRingToYankedState): Added.
853
854         * page/Frame.cpp: Removed selectionHasStyle, TriState, and updateState.
855         * page/Frame.h: Ditto.
856
857         * page/mac/WebCoreFrameBridge.mm: Removed selectionHasStyle.
858         * page/mac/WebCoreFrameBridge.h: Ditto.
859
860         * platform/ContextMenu.cpp:
861         (WebCore::ContextMenu::checkOrEnableIfNeeded): Updated for TriState change.
862
863         * platform/text/StringHash.h:
864         (WebCore::StringHash::hash): Merged the StrHash<> template classes into this.
865         (WebCore::StringHash::equal): Ditto.
866         (WebCore::CaseFoldingHash::hash): Merged the CaseInsensitiveHash<> template
867         classes into this.
868         (WebCore::CaseFoldingHash::equal): Ditto.
869
870         * platform/text/StringImpl.cpp:
871         (WebCore::equal): Changed to invoke StringHash.
872         (WebCore::equalIgnoringCase): Changed to invoke CaseFoldingHash.
873
874         * dom/DOMImplementation.cpp:
875         (WebCore::addString): Updated to use StringHash and CaseFoldingHash.
876         (WebCore::isSVG10Feature): Ditto.
877         (WebCore::isSVG11Feature): Ditto.
878         * loader/FrameLoader.cpp:
879         (WebCore::localSchemes): Ditto.
880         * platform/graphics/FontCache.cpp:
881         (WebCore::computeHash): Ditto.
882         * platform/network/HTTPHeaderMap.h: Ditto.
883         * platform/text/PlatformString.h: Ditto.
884         * platform/text/StringImpl.h: Ditto.
885         * rendering/RenderPartObject.cpp:
886         (WebCore::RenderPartObject::updateWidget): Ditto.
887         * xml/XMLHttpRequest.cpp:
888         (WebCore::canSetRequestHeader): Ditto.
889
890         * rendering/RenderTreeAsText.cpp: Removed stray include of JSEditor.h.
891
892 2007-12-11  Darin Adler  <darin@apple.com>
893
894         * platform/wx/KeyboardEventWx.cpp:
895         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Another try at fixing the
896         WX build. Changes the code around a little bit.
897
898 2007-12-11  Darin Adler  <darin@apple.com>
899
900         * platform/wx/KeyboardEventWx.cpp:
901         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Quick try at fixing build.
902
903 2007-12-11  Dan Bernstein  <mitz@apple.com>
904
905         Reviewed by Darin Adler.
906
907         - fix <rdar://problem/5631507> Text doesn't wrap properly at Tamil version of Wikipedia
908
909         Test: fast/text/international/complex-character-based-fallback.html
910
911         * platform/graphics/Font.cpp:
912         (WebCore::Font::glyphDataForCharacter): Added a forceSmallCaps argument
913         that forces this function to use the small caps font. It is used for
914         combining marks that need to combine with a small cap.
915         * platform/graphics/Font.h:
916         * platform/win/UniscribeController.cpp:
917         (WebCore::UniscribeController::advance): Changed to split the string
918         into runs of characters that will be rendered using the same FontData.
919         This is done by calling glyphDataForCharacter() for each cahracter to
920         find the FontData it should be rendered with.
921         (WebCore::UniscribeController::itemizeShapeAndPlace): Added a fontData
922         argument that is passed on to shapeAndPlaceItem() instead of the
923         smallCaps argument.
924         (WebCore::UniscribeController::shapeAndPlaceItem): Added a fontData
925         argument and removed the font fallback logic from this function, as
926         it is now expected to be called with an item all of whose characters
927         can be rendered with the given fontData.
928         * platform/win/UniscribeController.h:
929
930 2007-12-07  Alexey Proskuryakov  <ap@webkit.org>
931
932         Reviewed by Darin.
933
934         <rdar://problem/5535636>
935         Have to press 4 times instead of 2 times to get the expected result of ^^ with german keyboard.
936
937         http://bugs.webkit.org/show_bug.cgi?id=13916
938         JavaScript detects Tab as a character input on a textfield validation
939
940         Test: platform/win/fast/events/double-dead-char.html
941
942         * platform/PlatformKeyboardEvent.h:
943         (WebCore::PlatformKeyboardEvent::):
944         (WebCore::PlatformKeyboardEvent::type):
945         (WebCore::PlatformKeyboardEvent::windowsVirtualKeyCode):
946         (WebCore::PlatformKeyboardEvent::setWindowsVirtualKeyCode):
947         (WebCore::PlatformKeyboardEvent::keyIdentifier):
948         (WebCore::PlatformKeyboardEvent::setIsAutoRepeat):
949         Added an explicit type member to differentiate different kinds of events:
950           RawKeyDown == keydown == WM_KEYDOWN
951           KeyUp == keyup == WM_KEYUP
952           Char == keypress == WM_CHAR
953           KeyDown == e.g. NSKeyDown or NSFlagsChanged, used on platforms that have a different model for
954           event processing, and needs to be converted to RawKeyDown (+ Char) for processing in DOM.
955
956         * platform/mac/KeyEventMac.mm:
957         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Updated for changed data members.
958         Fix Enter (numeric keypad) charCode to match Return, as we check for it from keypress default handlers.
959         (WebCore::windowsKeyCodeForKeyEvent): 
960         (WebCore::isKeyUpEvent): Made it do something closer to what it claims; added a FIXME explaining
961         that it still fails.
962         (WebCore::disambiguateKeyDownEvent): Downgrade from KeyDown to RawKeyDown or Char, removing information that
963         should not be available in those (because it cannot be provided on Windows).
964
965         * platform/win/KeyEventWin.cpp:
966         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Updated for changed data members.
967         Used standard Windows constants for bit masks instead of our own ones.
968         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent): Should never be called on Windows.
969
970         * platform/gtk/KeyEventGtk.cpp:
971         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
972         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
973         * platform/qt/PlatformKeyboardEventQt.cpp:
974         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
975         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
976         * platform/wx/KeyboardEventWx.cpp:
977         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
978         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
979         Updated for cross-platform changes as much as it was possible without appropriate build
980         environments.
981
982         * WebCore.base.exp: Export PlatformKeyboardEvent::disambiguateKeyDownEvent(), used by platforms that need to
983         convert their fancy key events to RawKeyDown/Char pairs. Export Editor::isTextInsertionCommand().
984
985         * bridge/EditorClient.h:
986         Renamed handleKeypress() to handleKeyboardEvent(), as it gets both keydowns and keypresses.
987         Renamed handleInputMethodKeypress() to handleInputMethodKeydown(), as IMs work with raw keydowns.
988
989         * dom/Document.h:
990         * dom/Document.cpp:
991         (WebCore::Document::defaultEventHandler): Moved accesskey processing to EventHandler.
992
993         * dom/KeyboardEvent.h: Added comments describing keyCode/charCode behavior.
994
995         * dom/KeyboardEvent.cpp:
996         (WebCore::eventTypeForKeyboardEventType):
997         (WebCore::KeyboardEvent::KeyboardEvent): Conversion between platform and DOM event types is
998         now straightforward, so scary hacks such as using autorepeat to distinguish types are
999         not needed.
1000         (WebCore::KeyboardEvent::keyCode): Added a comment describing other browsers' behavior.
1001         (WebCore::KeyboardEvent::charCode): Added a comment describing other browsers' behavior.
1002         Changed to a more compatible behavior: raw keydown/keyup events do not and can not have
1003         character codes.
1004
1005         * editing/Editor.h:
1006         * editing/Editor.cpp:
1007         (WebCore::Editor::isTextInsertionCommand): Is this command actually text input in disguise?
1008         (WebCore::Editor::handleKeyboardEvent): Updated for new function names.
1009         (WebCore::Editor::handleInputMethodKeydown): Ditto.
1010
1011         * html/HTMLButtonElement.cpp:
1012         (WebCore::HTMLButtonElement::defaultEventHandler): Perform the default action when handling an
1013         appropriate event. Enter is processed on keypress (and thus should be checked for via charCode,
1014         not keyIdentifier), Space is processed on keydown+keyup! We now match IE in that a button is
1015         highlighted when Space is pressed.
1016
1017         * html/HTMLInputElement.cpp:
1018         (WebCore::HTMLInputElement::defaultEventHandler):
1019         * html/HTMLSelectElement.cpp:
1020         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
1021         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1022         Made a number of fixes to when default actions take place, similar to HTMLButtonElement ones
1023         described above.
1024
1025         * page/EventHandler.cpp:
1026         (WebCore::EventHandler::keyEvent): Unless we have a combined KeyDown, just forward the event
1027         to the target. Call accesskey handling directly, as it doesn't seem to be part of normal event
1028         handling in IE. Also streamlined the code in KeyDown case, thanks to handleInputMethodKeypress()
1029         now being handleInputMethodKeydown().
1030         (WebCore::EventHandler::handleTextInputEvent): Check that we were not called from keydown.
1031         (WebCore::EventHandler::defaultTextInputEventHandler): Removed a call to defaultTabEventHandler,
1032         as default tab handling happens when processing keydown.
1033         (WebCore::handleAccessKey): Moved from Document, as access keys are processed outside normal
1034         event handling. Fixed accesskey processing to use information that's available in a raw keydown
1035         event.
1036
1037         (WebCore::EventHandler::defaultKeyboardEventHandler): Do not ignore keydown; in particular,
1038         handle tabs during keydown processing.
1039
1040         * page/mac/EventHandlerMac.mm:
1041         (WebCore::EventHandler::currentKeyboardEvent): Disambiguate KeyDown as RawKeyDown, as this is
1042         what callers want.
1043
1044         * platform/text/PlatformString.h:
1045         * platform/text/String.cpp:
1046         (WebCore::String::characterStartingAt):
1047         * platform/text/StringImpl.cpp:
1048         (WebCore::StringImpl::characterStartingAt):
1049         * platform/text/StringImpl.h:
1050         Added a UChar32 accessor.
1051
1052         * svg/graphics/SVGImageEmptyClients.h:
1053         (WebCore::SVGEmptyEditorClient::handleKeyboardEvent):
1054         (WebCore::SVGEmptyEditorClient::handleInputMethodKeydown):
1055         Updated for new function names.
1056
1057 2007-12-11  John Sullivan  <sullivan@apple.com>
1058
1059         Reviewed by Adele
1060
1061         Tiger build fix -- don't call QTMovieView setDelegate: directly because it's not public
1062
1063         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1064         (WebCore::MediaPlayerPrivate::createQTMovieView):
1065         (WebCore::MediaPlayerPrivate::detachQTMovieView):
1066
1067 2007-12-11  Alexey Proskuryakov  <ap@webkit.org>
1068
1069         Reviewed by Darin.
1070
1071         http://bugs.webkit.org/show_bug.cgi?id=16325
1072         <rdar://problem/5632997> REGRESSION: www.xerox.ru doesn't work
1073
1074         Fix this on Windows, too!
1075
1076         Test: http/tests/misc/empty-cookie.html
1077
1078         * platform/network/win/CookieJarWin.cpp:
1079         (WebCore::setCookies):
1080         (WebCore::cookies):
1081         Same fix as on Mac, translated into CF.
1082
1083         * platform/win/CookieJarWin.cpp: Removed - the real one is in platform/network/win.
1084
1085 2007-12-11  Christian Dywan  <christian@twotoasts.de>
1086
1087         Reviewed by Alp Toker.
1088
1089         http://bugs.webkit.org/show_bug.cgi?id=16371
1090         Implement additional mouse cursors for Gtk
1091
1092         Added cursor bitmaps from Mozilla:
1093         http://lxr.mozilla.org/mozilla1.8/source/widget/src/gtk2/nsGtkCursors.h
1094
1095         * platform/gtk/CursorGtk.cpp:
1096         (WebCore::customCursorNew):
1097         (WebCore::verticalTextCursor):
1098         (WebCore::cellCursor):
1099         (WebCore::contextMenuCursor):
1100         (WebCore::noDropCursor):
1101         (WebCore::copyCursor):
1102         (WebCore::progressCursor):
1103         (WebCore::aliasCursor):
1104         (WebCore::noneCursor):
1105         (WebCore::notAllowedCursor):
1106         (WebCore::zoomInCursor):
1107         (WebCore::zoomOutCursor):
1108         * platform/gtk/CursorGtk.h: Added.
1109
1110 2007-12-10  Oliver Hunt  <oliver@apple.com>
1111
1112         Reviewed by Weinig, Dan, and Alexey.
1113
1114         Fix character set used for dynamically loaded scripts.
1115
1116         Fix for:
1117             <rdar://problem/5333163> Safari can not display the mouse over pop menu on ChinaTimes News site correctly.
1118             <rdar://problem/5530048> [Safari]? :Leopard9A576: The typed CH characters displays as garbage in Sina website after reloading the webpage.
1119             <rdar://problem/5416588> All menus for chinese IBM site have wrong encoding
1120             
1121         Use the same logic to determine the charset for a script loaded dynamically
1122         as we do for a statically loaded script.
1123
1124         * html/HTMLScriptElement.cpp:
1125         (WebCore::HTMLScriptElement::insertedIntoDocument):
1126
1127 2007-12-10  Justin Garcia  <justin.garcia@apple.com>
1128
1129         Reviewed by Oliver Hunt.
1130
1131         <rdar://problem/5482023> GoogleDocs: After FormatBlock in an empty document, certain functions are disabled
1132         
1133         We were trying to insert a block of the requested type before the body element.
1134         
1135         * editing/FormatBlockCommand.cpp:
1136         (WebCore::FormatBlockCommand::doApply): 
1137         Removed unnecessary ()s in the if condition.
1138         Removed "|| !upstreamStart.node()->isDescendantOf(root)" from the if condition, since
1139         a) upstreamStart will never be outside the root editable element, since in that case
1140         there would be no block inside the editable root to Format, and b) if upstreamStart.node() 
1141         *is* the root, then refNode is the root, and we shouldn't insert before the root, we should insert
1142         at [root, 0].
1143         Added comments to explain the use of upstream() in the second if-clause.
1144         Added an early return for case where there is nothing selected, in that case, there is nothing
1145         to move.
1146
1147 2007-12-10  Adele Peterson  <adele@apple.com>
1148
1149         Reviewed and partially fixed by Tim Hatcher.
1150
1151         Remaining part of fix for <rdar://problem/5633400>
1152         Transformed <video> is not clipped correctly until a repaint is forced
1153
1154         Replace the implementation of a QTKit method to avoid repaints from the NSView system associated with the QTMovie
1155         from clobbering the WebCore repaints.
1156
1157         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerRepaint): Added.
1158         * html/HTMLMediaElement.h:
1159         * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::repaint): Added.
1160         * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerRepaint): Added.
1161
1162         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1163         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1164         (method_setImplementation): Added for Tiger.
1165
1166         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate): Call detachQTMovieView, which now does more cleanup.
1167         (WebCore::MediaPlayerPrivate::cancelLoad): ditto.
1168         (WebCore::MediaPlayerPrivate::setVisible): ditto.
1169         (WebCore::MediaPlayerPrivate::detachQTMovieView): Clear the delegate as well as m_qtMovieView pointer.
1170
1171         (WebCore::MediaPlayerPrivate::repaint): Added.  Triggers a repaint on the video renderer.
1172         (-[WebCoreMovieObserver repaint]): ditto.
1173
1174         (WebCore::mainThreadSetNeedsDisplay): Added.
1175          Does a WebCore repaint instead of going through the view repaint system for QTMovieView.
1176         (WebCore::MediaPlayerPrivate::createQTMovieView): Replace the implementation of _mainThreadSetNeedsDisplay.
1177
1178 2007-12-10  Geoffrey Garen  <ggaren@apple.com>
1179
1180         Reviewed by Sam Weinig.
1181
1182         Updated for rename in JavaScriptCore.
1183
1184         * bridge/mac/WebCoreScriptDebugger.mm:
1185         (-[WebCoreScriptCallFrame scopeChain]):
1186         (-[WebCoreScriptCallFrame functionName]):
1187         (-[WebCoreScriptCallFrame evaluateWebScript:]):
1188
1189 2007-12-10  Rodney Dawes  <dobey@wayofthemonkey.com>
1190
1191         Bug 16383: Ambiguous Window Usage in kjs_dom.cpp
1192         <http://bugs.webkit.org/show_bug.cgi?id=16383>
1193
1194         Use KJS::Window not the ambiguous Window
1195
1196         Reviewed by ddkilzer.
1197
1198         * bindings/js/kjs_dom.cpp (checkNodeSecurity):
1199
1200 2007-12-10  Sam Weinig  <sam@webkit.org>
1201
1202         Fix non-mac builds.
1203
1204         * page/WindowFeatures.cpp: #include <wtf/MathExtras.h> for isnan.
1205
1206 2007-12-10  Marvin Decker  <marv.decker@gmail.com>
1207
1208         Reviewed by Darin.
1209
1210         Fix a divide by 0 in the progress tracker.
1211         http://bugs.webkit.org/show_bug.cgi?id=15055
1212
1213         * loader/ProgressTracker.cpp:
1214         (WebCore::ProgressTracker::incrementProgress):
1215
1216 2007-12-09  Sam Weinig  <sam@webkit.org>
1217
1218         Reviewed by Darin.
1219
1220         More cleanup of kjs_window.
1221         - Move WindowFeatures from bridge/ to page/
1222         - Move functions related to WindowFeatures (boolFeature,
1223           floatFeature, setWindowFeature, parseWindowFeatures) into the class.
1224         - Fix up whitespace.
1225
1226         * WebCore.vcproj/WebCore.vcproj:
1227         * WebCore.xcodeproj/project.pbxproj:
1228         * bindings/js/kjs_window.cpp:
1229         (KJS::DOMWindowTimer::~DOMWindowTimer):
1230         (KJS::createWindow):
1231         (KJS::showModalDialog):
1232         (KJS::Window::getOwnPropertySlot):
1233         (KJS::Window::allowsAccessFrom):
1234         (KJS::Window::shouldInterruptScript):
1235         (KJS::WindowProtoFuncAToB::callAsFunction):
1236         (KJS::WindowProtoFuncOpen::callAsFunction):
1237         (KJS::Window::setReturnValueSlot):
1238         (KJS::ScheduledAction::execute):
1239         (KJS::Window::timerFired):
1240         (KJS::Location::Location):
1241         (KJS::Location::getValueProperty):
1242         (KJS::Location::getOwnPropertySlot):
1243         (KJS::Location::put):
1244         (KJS::LocationProtoFuncReplace::callAsFunction): Use better variable names.
1245         (KJS::LocationProtoFuncAssign::callAsFunction): Ditto.
1246         (KJS::LocationProtoFuncToString::callAsFunction): Remove extraneous calls to
1247         allowsAccessFrom, cleanup the function a little.
1248         (KJS::PausedTimeouts::~PausedTimeouts):
1249         * bridge/WindowFeatures.h: Removed.
1250         * page/WindowFeatures.cpp: Added.
1251         (WebCore::isSeparator):
1252         (WebCore::WindowFeatures::WindowFeatures):
1253         (WebCore::WindowFeatures::setWindowFeature):
1254         (WebCore::WindowFeatures::boolFeature):
1255         (WebCore::WindowFeatures::floatFeature):
1256         * page/WindowFeatures.h: Copied from WebCore/bridge/WindowFeatures.h.
1257         (WebCore::WindowFeatures::WindowFeatures):
1258
1259 2007-12-10  Timothy Hatcher  <timothy@apple.com>
1260
1261         Reviewed by Mark Rowe.
1262
1263         <rdar://problem/5639463> Bundle versions on Tiger should be 4523.x not 523.x
1264
1265         * Configurations/Version.xcconfig: Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR,
1266           so assume Tiger and use a 4 for the SYSTEM_VERSION_PREFIX.
1267
1268 2007-12-10  Alp Toker  <alp@atoker.com>
1269
1270         Reviewed by Niko.
1271
1272         Cairo implementation of GraphicsContext::setUseAntialiasing().
1273
1274         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1275         (WebCore::GraphicsContext::setUseAntialiasing):
1276
1277 2007-12-10  Rob Buis  <buis@kde.org>
1278
1279         Reviewed by Darin.
1280
1281         http://bugs.webkit.org/show_bug.cgi?id=16182
1282         SVG should disable antialiasing for shape-rendering="crispEdges"
1283
1284         Turn off anti-aliasing of shapes when shape-rendering="crispEdges".
1285
1286         * platform/graphics/GraphicsContext.h:
1287         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1288         (WebCore::GraphicsContext::setUseAntialiasing):
1289         * platform/graphics/cg/GraphicsContextCG.cpp:
1290         (WebCore::GraphicsContext::setUseAntialiasing):
1291         * platform/graphics/qt/GraphicsContextQt.cpp:
1292         (WebCore::GraphicsContext::setUseAntialiasing):
1293         * platform/graphics/wx/GraphicsContextWx.cpp:
1294         (WebCore::GraphicsContext::setUseAntialiasing):
1295         * rendering/RenderPath.cpp:
1296         (WebCore::RenderPath::paint):
1297
1298 2007-12-09  Rob Buis  <buis@kde.org>
1299
1300         Reviewed by Niko.
1301
1302         http://bugs.webkit.org/show_bug.cgi?id=16163
1303         SVG crash in Node::setChanged() on Debug builds only (trashed parent)
1304
1305         Fix the crash by properly unregistering as client from SVGResource
1306         when deleting a styled svg node.
1307
1308         * svg/SVGStyledElement.cpp:
1309         (WebCore::SVGStyledElement::~SVGStyledElement):
1310
1311 2007-12-10  Brady Eidson  <beidson@apple.com>
1312
1313         Rubberstamped by John
1314
1315         * storage/DatabaseTracker.cpp:
1316         (WebCore::DatabaseTracker::canEstablishDatabase): If the UI Delegate returns *exactly* the estimated size
1317           for the new quota, we should allow the database to be created
1318
1319 2007-12-10  David D. Kilzer  <ddkilzer@webkit.org>
1320
1321         Bug 9683: Implement select.options.remove() method
1322         <http://bugs.webkit.org/show_bug.cgi?id=9683>
1323
1324         Reviewed by Maciej.
1325
1326         Implement select.options.remove() by calling select.remove()
1327         with the same arguments.  This is what MSIE 7 does, although its
1328         select.remove() method differs from WebKit's by throwing an
1329         exception when called with no arguments or with a negative
1330         integer argument.  Note that the DOM Level 1 documentation
1331         specifies that select.remove() does not throw an exception.
1332
1333         Tests: fast/js/select-options-remove-gc.html
1334                fast/js/select-options-remove.html
1335
1336         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1337         (WebCore::JSHTMLOptionsCollection::remove): Added.
1338         * html/HTMLOptionsCollection.cpp:
1339         (WebCore::HTMLOptionsCollection::remove): Added.
1340         * html/HTMLOptionsCollection.h:
1341         * html/HTMLOptionsCollection.idl:
1342
1343 2007-12-09  Sam Weinig  <sam@webkit.org>
1344
1345         Rubber stamped by Mark Rowe.
1346
1347         * WebCore.xcodeproj/project.pbxproj: Add missing DerivedSources files.
1348
1349 2007-12-09  Oliver Hunt  <oliver@apple.com>
1350
1351         Reviewed by Niko.
1352
1353         Correction, 'z' and 'Z' are the only commands that cannot have an extended
1354         list of arguments.
1355
1356         * svg/SVGParserUtilities.cpp:
1357         (WebCore::SVGPathParser::parseSVG):
1358
1359 2007-12-09  Oliver Hunt  <oliver@apple.com>
1360
1361         Reviewed by Niko.
1362
1363         Prevent unlimited iteration in the case of invalid path data.
1364         
1365         The only path commands that can leave numbers trailing the command processing
1366         are 'm' and 'M', in which trailing numbers are parsed as arguments to an
1367         implicit lineto command.  In any case we should just terminate as an invalid
1368         path.
1369
1370         * svg/SVGParserUtilities.cpp:
1371         (WebCore::SVGPathParser::parseSVG):
1372
1373 2007-12-09  Luca Bruno  <lethalman88@gmail.com>
1374
1375         Reviewed by Alp Toker.
1376
1377         http://bugs.webkit.org/show_bug.cgi?id=15825
1378         [GTK] curl - slow dns causing hangs.
1379
1380         Create a vector of jobs, to satisfy requests in the right order.
1381         Set a limit to the number of simultaneous connections.
1382
1383         * platform/network/curl/ResourceHandleManager.cpp:
1384         (WebCore::maxRunningJobs): added
1385         (WebCore::ResourceHandleManager::ResourceHandleManager):
1386         (WebCore::ResourceHandleManager::removeFromCurl):
1387         (WebCore::ResourceHandleManager::startScheduledJobs):
1388
1389         * platform/network/curl/ResourceHandleManager.h:
1390         (WebCore::ResourceHandleList): removed
1391         (WebCore::ResourceHandleManager::m_runningJobs): added
1392         (WebCore::ResourceHandleManager::m_resourceHandleListHead): removed
1393         (WebCore::ResourceHandleManager::m_resourceHandleList): added
1394
1395 2007-12-08  Sam Weinig  <sam@webkit.org>
1396
1397         Reviewed by Oliver.
1398
1399         Cleanup kjs_window.h/cpp.
1400
1401         * bindings/js/kjs_window.cpp:
1402         (KJS::WindowPrivate::WindowPrivate):
1403         (KJS::DOMWindowTimer::DOMWindowTimer):
1404         (KJS::Window::Window):
1405         (KJS::Window::retrieveWindow):
1406         (KJS::Window::retrieveActive):
1407         (KJS::Window::retrieve):
1408         (KJS::Window::location):
1409         (KJS::Window::mark):
1410         (KJS::allowPopUp):
1411         (KJS::parseModalDialogFeatures):
1412         (KJS::floatFeature):
1413         (KJS::canShowModalDialog):
1414         (KJS::canShowModalDialogNow):
1415         (KJS::showModalDialog):
1416         (KJS::Window::getValueProperty):
1417         (KJS::Window::getOwnPropertySlot):
1418         (KJS::Window::globalExec):
1419         (KJS::Window::setListener):
1420         (KJS::Window::getListener):
1421         (KJS::Window::findOrCreateJSEventListener):
1422         (KJS::Window::findOrCreateJSUnprotectedEventListener):
1423         (KJS::Window::clearHelperObjectProperties):
1424         (KJS::Window::setCurrentEvent):
1425         (KJS::WindowProtoFuncAToB::callAsFunction):
1426         (KJS::WindowProtoFuncBToA::callAsFunction):
1427         (KJS::WindowProtoFuncOpen::callAsFunction):
1428         (KJS::WindowProtoFuncSetTimeout::callAsFunction):
1429         (KJS::WindowProtoFuncClearTimeout::callAsFunction):
1430         (KJS::WindowProtoFuncSetInterval::callAsFunction):
1431         (KJS::WindowProtoFuncAddEventListener::callAsFunction):
1432         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
1433         (KJS::WindowProtoFuncShowModalDialog::callAsFunction):
1434         (KJS::WindowProtoFuncNotImplemented::callAsFunction):
1435         * bindings/js/kjs_window.h:
1436         (KJS::PausedTimeouts::PausedTimeouts):
1437         (KJS::PausedTimeouts::takeTimeouts):
1438         (KJS::ScheduledAction::ScheduledAction):
1439
1440 2007-12-08  Sam Weinig  <sam@webkit.org>
1441
1442         Reviewed by Mitz.
1443
1444         Move window scrolling, moving and resizing methods from KJS::Window
1445         to WebCore::DOMWindow so that there bindings can be autogenerated.
1446
1447         Tests: fast/dom/Window/window-resize-and-move-arguments.html
1448                fast/dom/Window/window-scroll-arguments.html
1449
1450         * WebCore.xcodeproj/project.pbxproj:
1451         * bindings/js/kjs_window.cpp:
1452         (KJS::Window::getValueProperty): Remove extraneous allowsAccessFrom check.
1453         (KJS::WindowProtoFuncOpen::callAsFunction):
1454         (KJS::WindowProtoFuncNotImplemented::callAsFunction): Remove extraneous allowsAccessFrom check.
1455         * bindings/js/kjs_window.h:
1456         * bindings/scripts/CodeGeneratorJS.pm: Add new extended attribute
1457         to ensure that the no less than the declared number of attributes
1458         is allowed.
1459         * page/DOMWindow.cpp:
1460         (WebCore::DOMWindow::adjustWindowRect): Moved from kjs_window.
1461         (WebCore::DOMWindow::scrollBy):
1462         (WebCore::DOMWindow::scrollTo):
1463         (WebCore::DOMWindow::moveBy):
1464         (WebCore::DOMWindow::moveTo):
1465         (WebCore::DOMWindow::resizeBy):
1466         (WebCore::DOMWindow::resizeTo):
1467         * page/DOMWindow.h:
1468         (WebCore::DOMWindow::scroll):
1469         * page/DOMWindow.idl:
1470
1471 2007-12-08  Kevin Ollivier  <kevino@theolliviers.com>
1472
1473         Reviewed by Alp Toker.
1474
1475         http://bugs.webkit.org/show_bug.cgi?id=14651
1476         [CURL] didReceiveResponse() only called for HTTP loads
1477
1478         http://bugs.webkit.org/show_bug.cgi?id=14583
1479         [GDK] file:// relative CSS include URLs handled incorrectly
1480
1481         Make sure CURL sets the ResourceResponse URL and calls
1482         didReceiveResponse for local files too. 
1483
1484         * platform/network/curl/ResourceHandleManager.cpp:
1485         (WebCore::writeCallback):
1486
1487 2007-12-08  Oliver Hunt  <oliver@apple.com>
1488
1489         Reviewed by Sam W.
1490
1491         Split the ENABLE_SVG_EXPERIMENTAL_FEATURES flag into separate flags.
1492         
1493         Fixes <rdar://problem/5620249> Must disable SVG animation
1494         <rdar://problem/5612772> Disable SVG filters on Mac to match Windows behavior
1495         
1496         In order to allow finer grained control over the set of SVG features
1497         this patch splits ENABLE_SVG_EXPERIMENTAL_FEATURES into the following
1498         distinct flags:
1499         ENABLE_SVG_ANIMATION
1500         ENABLE_SVG_FILTERS
1501         ENABLE_SVG_FONTS
1502         ENABLE_SVG_AS_IMAGE
1503         ENABLE_SVG_USE
1504         
1505         by default only ENABLE_SVG_AS_IMAGE and ENABLE_SVG_USE are set.
1506
1507         * Configurations/WebCore.xcconfig:
1508         * DerivedSources.make:
1509           Handle the increased number of build flags that may be necessary
1510           
1511         * WebCore.SVG.Animation.exp: Added.
1512         * WebCore.SVG.Filters.exp: Added.
1513         * WebCore.SVG.exp:
1514           We now may not need the animation or filter exports so 
1515           these need to be separate.
1516           
1517         * WebCore.vcproj/WebCore.vcproj:
1518         * WebCore.vcproj/build-generated-files.sh:
1519           Update for new flags
1520           
1521         Remainder of changes are to swap ENABLE(SVG_EXPERIMENTAL_FEATURES) 
1522         with the appropriate specific feature flag.  
1523         * bindings/js/JSSVGElementWrapperFactory.cpp:
1524         (WebCore::createJSSVGWrapper):
1525         * bindings/objc/DOM.mm:
1526         (WebCore::createElementClassMap):
1527         * dom/make_names.pl:
1528         * loader/CachedImage.cpp:
1529         (WebCore::CachedImage::createImage):
1530         * page/DOMWindow.idl:
1531         * rendering/RenderPath.cpp:
1532         (WebCore::RenderPath::absoluteClippedOverflowRect):
1533         * rendering/RenderSVGContainer.cpp:
1534         (WebCore::RenderSVGContainer::absoluteClippedOverflowRect):
1535         * rendering/RenderSVGImage.cpp:
1536         (WebCore::RenderSVGImage::absoluteClippedOverflowRect):
1537         * rendering/RenderSVGRoot.cpp:
1538         (WebCore::RenderSVGRoot::paint):
1539         (WebCore::RenderSVGRoot::absoluteClippedOverflowRect):
1540         * rendering/RenderSVGText.cpp:
1541         (WebCore::RenderSVGText::absoluteClippedOverflowRect):
1542         * rendering/SVGRenderSupport.cpp:
1543         (WebCore::prepareToRenderSVGContent):
1544         (WebCore::finishRenderSVGContent):
1545         * svg/SVGAnimateElement.cpp:
1546         * svg/SVGAnimateElement.h:
1547         * svg/SVGAnimateElement.idl:
1548         * svg/SVGAnimateMotionElement.cpp:
1549         * svg/SVGAnimateMotionElement.h:
1550         * svg/SVGAnimateTransformElement.cpp:
1551         * svg/SVGAnimateTransformElement.h:
1552         * svg/SVGAnimateTransformElement.idl:
1553         * svg/SVGComponentTransferFunctionElement.cpp:
1554         * svg/SVGComponentTransferFunctionElement.h:
1555         * svg/SVGComponentTransferFunctionElement.idl:
1556         * svg/SVGDocumentExtensions.cpp:
1557         (WebCore::SVGDocumentExtensions::startAnimations):
1558         * svg/SVGFEBlendElement.cpp:
1559         * svg/SVGFEBlendElement.h:
1560         * svg/SVGFEBlendElement.idl:
1561         * svg/SVGFEColorMatrixElement.cpp:
1562         * svg/SVGFEColorMatrixElement.h:
1563         * svg/SVGFEColorMatrixElement.idl:
1564         * svg/SVGFEComponentTransferElement.cpp:
1565         * svg/SVGFEComponentTransferElement.h:
1566         * svg/SVGFEComponentTransferElement.idl:
1567         * svg/SVGFECompositeElement.cpp:
1568         * svg/SVGFECompositeElement.h:
1569         * svg/SVGFECompositeElement.idl:
1570         * svg/SVGFEDiffuseLightingElement.cpp:
1571         * svg/SVGFEDiffuseLightingElement.h:
1572         * svg/SVGFEDiffuseLightingElement.idl:
1573         * svg/SVGFEDisplacementMapElement.cpp:
1574         * svg/SVGFEDisplacementMapElement.h:
1575         * svg/SVGFEDisplacementMapElement.idl:
1576         * svg/SVGFEDistantLightElement.cpp:
1577         * svg/SVGFEDistantLightElement.h:
1578         * svg/SVGFEDistantLightElement.idl:
1579         * svg/SVGFEFloodElement.cpp:
1580         * svg/SVGFEFloodElement.h:
1581         * svg/SVGFEFloodElement.idl:
1582         * svg/SVGFEFuncAElement.cpp:
1583         * svg/SVGFEFuncAElement.h:
1584         * svg/SVGFEFuncAElement.idl:
1585         * svg/SVGFEFuncBElement.cpp:
1586         * svg/SVGFEFuncBElement.h:
1587         * svg/SVGFEFuncBElement.idl:
1588         * svg/SVGFEFuncGElement.cpp:
1589         * svg/SVGFEFuncGElement.h:
1590         * svg/SVGFEFuncGElement.idl:
1591         * svg/SVGFEFuncRElement.cpp:
1592         * svg/SVGFEFuncRElement.h:
1593         * svg/SVGFEFuncRElement.idl:
1594         * svg/SVGFEGaussianBlurElement.cpp:
1595         * svg/SVGFEGaussianBlurElement.h:
1596         * svg/SVGFEGaussianBlurElement.idl:
1597         * svg/SVGFEImageElement.cpp:
1598         * svg/SVGFEImageElement.h:
1599         * svg/SVGFEImageElement.idl:
1600         * svg/SVGFELightElement.cpp:
1601         * svg/SVGFELightElement.h:
1602         * svg/SVGFEMergeElement.cpp:
1603         * svg/SVGFEMergeElement.h:
1604         * svg/SVGFEMergeElement.idl:
1605         * svg/SVGFEMergeNodeElement.cpp:
1606         * svg/SVGFEMergeNodeElement.h:
1607         * svg/SVGFEMergeNodeElement.idl:
1608         * svg/SVGFEOffsetElement.cpp:
1609         * svg/SVGFEOffsetElement.h:
1610         * svg/SVGFEOffsetElement.idl:
1611         * svg/SVGFEPointLightElement.cpp:
1612         * svg/SVGFEPointLightElement.h:
1613         * svg/SVGFEPointLightElement.idl:
1614         * svg/SVGFESpecularLightingElement.cpp:
1615         * svg/SVGFESpecularLightingElement.h:
1616         * svg/SVGFESpecularLightingElement.idl:
1617         * svg/SVGFESpotLightElement.cpp:
1618         * svg/SVGFESpotLightElement.h:
1619         * svg/SVGFESpotLightElement.idl:
1620         * svg/SVGFETileElement.cpp:
1621         * svg/SVGFETileElement.h:
1622         * svg/SVGFETileElement.idl:
1623         * svg/SVGFETurbulenceElement.cpp:
1624         * svg/SVGFETurbulenceElement.h:
1625         * svg/SVGFETurbulenceElement.idl:
1626         * svg/SVGFilterElement.cpp:
1627         * svg/SVGFilterElement.h:
1628         * svg/SVGFilterElement.idl:
1629         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1630         * svg/SVGTimer.cpp:
1631         (WebCore::SVGTimer::animationsByElement):
1632         * svg/SVGUseElement.cpp:
1633         (WebCore::SVGUseElement::buildPendingResource):
1634         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
1635         * svg/SVGUseElement.h:
1636         * svg/TimeScheduler.cpp:
1637         (WebCore::TimeScheduler::connectIntervalTimer):
1638         (WebCore::TimeScheduler::disconnectIntervalTimer):
1639         * svg/graphics/SVGResourceFilter.cpp:
1640         * svg/graphics/SVGResourceFilter.h:
1641         * svg/graphics/cg/SVGResourceFilterCg.cpp:
1642         * svg/graphics/cg/SVGResourceFilterCg.mm:
1643         * svg/graphics/filters/SVGDistantLightSource.h:
1644         * svg/graphics/filters/SVGFEBlend.cpp:
1645         * svg/graphics/filters/SVGFEBlend.h:
1646         * svg/graphics/filters/SVGFEColorMatrix.cpp:
1647         * svg/graphics/filters/SVGFEColorMatrix.h:
1648         * svg/graphics/filters/SVGFEComponentTransfer.cpp:
1649         * svg/graphics/filters/SVGFEComponentTransfer.h:
1650         * svg/graphics/filters/SVGFEComposite.cpp:
1651         * svg/graphics/filters/SVGFEComposite.h:
1652         * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
1653         * svg/graphics/filters/SVGFEConvolveMatrix.h:
1654         * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
1655         * svg/graphics/filters/SVGFEDiffuseLighting.h:
1656         * svg/graphics/filters/SVGFEDisplacementMap.cpp:
1657         * svg/graphics/filters/SVGFEDisplacementMap.h:
1658         * svg/graphics/filters/SVGFEFlood.cpp:
1659         * svg/graphics/filters/SVGFEFlood.h:
1660         * svg/graphics/filters/SVGFEGaussianBlur.cpp:
1661         * svg/graphics/filters/SVGFEGaussianBlur.h:
1662         * svg/graphics/filters/SVGFEImage.cpp:
1663         * svg/graphics/filters/SVGFEImage.h:
1664         * svg/graphics/filters/SVGFEMerge.cpp:
1665         * svg/graphics/filters/SVGFEMerge.h:
1666         * svg/graphics/filters/SVGFEMorphology.cpp:
1667         * svg/graphics/filters/SVGFEMorphology.h:
1668         * svg/graphics/filters/SVGFEOffset.cpp:
1669         * svg/graphics/filters/SVGFEOffset.h:
1670         * svg/graphics/filters/SVGFESpecularLighting.cpp:
1671         * svg/graphics/filters/SVGFESpecularLighting.h:
1672         * svg/graphics/filters/SVGFETile.h:
1673         * svg/graphics/filters/SVGFETurbulence.cpp:
1674         * svg/graphics/filters/SVGFETurbulence.h:
1675         * svg/graphics/filters/SVGFilterEffect.cpp:
1676         * svg/graphics/filters/SVGFilterEffect.h:
1677         * svg/graphics/filters/SVGLightSource.cpp:
1678         * svg/graphics/filters/SVGLightSource.h:
1679         * svg/graphics/filters/SVGPointLightSource.h:
1680         * svg/graphics/filters/SVGSpotLightSource.h:
1681         * svg/graphics/filters/cg/SVGFEBlendCg.mm:
1682         * svg/graphics/filters/cg/SVGFEColorMatrixCg.mm:
1683         * svg/graphics/filters/cg/SVGFEComponentTransferCg.mm:
1684         * svg/graphics/filters/cg/SVGFECompositeCg.mm:
1685         * svg/graphics/filters/cg/SVGFEDiffuseLightingCg.mm:
1686         * svg/graphics/filters/cg/SVGFEDisplacementMapCg.mm:
1687         * svg/graphics/filters/cg/SVGFEFloodCg.mm:
1688         * svg/graphics/filters/cg/SVGFEGaussianBlurCg.mm:
1689         * svg/graphics/filters/cg/SVGFEHelpersCg.h:
1690         * svg/graphics/filters/cg/SVGFEHelpersCg.mm:
1691         * svg/graphics/filters/cg/SVGFEImageCg.mm:
1692         * svg/graphics/filters/cg/SVGFEMergeCg.mm:
1693         * svg/graphics/filters/cg/SVGFEOffsetCg.mm:
1694         * svg/graphics/filters/cg/SVGFESpecularLightingCg.mm:
1695         * svg/graphics/filters/cg/SVGFETileCg.mm:
1696         * svg/graphics/filters/cg/SVGFilterEffectCg.mm:
1697         * svg/graphics/filters/cg/WKArithmeticFilter.h:
1698         * svg/graphics/filters/cg/WKArithmeticFilter.m:
1699         * svg/graphics/filters/cg/WKComponentMergeFilter.h:
1700         * svg/graphics/filters/cg/WKComponentMergeFilter.m:
1701         * svg/graphics/filters/cg/WKDiffuseLightingFilter.h:
1702         * svg/graphics/filters/cg/WKDiffuseLightingFilter.m:
1703         * svg/graphics/filters/cg/WKDiscreteTransferFilter.h:
1704         * svg/graphics/filters/cg/WKDiscreteTransferFilter.m:
1705         * svg/graphics/filters/cg/WKDisplacementMapFilter.h:
1706         * svg/graphics/filters/cg/WKDisplacementMapFilter.m:
1707         * svg/graphics/filters/cg/WKDistantLightFilter.h:
1708         * svg/graphics/filters/cg/WKDistantLightFilter.m:
1709         * svg/graphics/filters/cg/WKGammaTransferFilter.h:
1710         * svg/graphics/filters/cg/WKGammaTransferFilter.m:
1711         * svg/graphics/filters/cg/WKIdentityTransferFilter.h:
1712         * svg/graphics/filters/cg/WKIdentityTransferFilter.m:
1713         * svg/graphics/filters/cg/WKLinearTransferFilter.h:
1714         * svg/graphics/filters/cg/WKLinearTransferFilter.m:
1715         * svg/graphics/filters/cg/WKNormalMapFilter.h:
1716         * svg/graphics/filters/cg/WKNormalMapFilter.m:
1717         * svg/graphics/filters/cg/WKPointLightFilter.h:
1718         * svg/graphics/filters/cg/WKPointLightFilter.m:
1719         * svg/graphics/filters/cg/WKSpecularLightingFilter.h:
1720         * svg/graphics/filters/cg/WKSpecularLightingFilter.m:
1721         * svg/graphics/filters/cg/WKSpotLightFilter.h:
1722         * svg/graphics/filters/cg/WKSpotLightFilter.m:
1723         * svg/graphics/filters/cg/WKTableTransferFilter.h:
1724         * svg/graphics/filters/cg/WKTableTransferFilter.m:
1725         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.h:
1726         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.mm:
1727         * svg/svgtags.in:
1728
1729 2007-12-08  Dan Bernstein  <mitz@apple.com>
1730
1731         Reviewed by Adele Peterson.
1732
1733         - fix two bugs in parsing of stylesheets in <style> elements created by
1734           the parser:
1735           1. each such stylesheet is parsed twice, once when the text node is
1736              added and again when the </style> tag is reached
1737           2. re-inserting such a <style> element into the document fails to
1738              re-parse and apply its stylesheet.
1739
1740         Test for bug #2: fast/dom/HTMLStyleElement/insert-parser-generated.html
1741
1742         * html/HTMLStyleElement.cpp:
1743         (WebCore::HTMLStyleElement::finishedParsing):
1744         * svg/SVGStyleElement.cpp:
1745         (WebCore::SVGStyleElement::finishedParsing):
1746
1747 2007-12-07  Sam Weinig  <sam@webkit.org>
1748
1749         Reviewed by Darin.
1750
1751         - Removes the faulty isSafeScript implementation that was only
1752           used for plugins.
1753         - Renames isSafeScript to allowsAccessFrom.
1754
1755         * bindings/js/JSDOMWindowCustom.cpp:
1756         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1757         (WebCore::JSDOMWindow::customPut):
1758         * bindings/js/kjs_dom.cpp:
1759         (WebCore::checkNodeSecurity):
1760         * bindings/js/kjs_window.cpp:
1761         (KJS::createWindow):
1762         (KJS::Window::getValueProperty):
1763         (KJS::Window::namedItemGetter):
1764         (KJS::Window::getOwnPropertySlot):
1765         (KJS::Window::put):
1766         (KJS::Window::allowsAccessFrom):
1767         (KJS::Window::setListener):
1768         (KJS::Window::getListener):
1769         (KJS::WindowProtoFuncOpen::callAsFunction):
1770         (KJS::WindowProtoFuncSetTimeout::callAsFunction):
1771         (KJS::WindowProtoFuncClearTimeout::callAsFunction):
1772         (KJS::WindowProtoFuncSetInterval::callAsFunction):
1773         (KJS::WindowProtoFuncAddEventListener::callAsFunction):
1774         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
1775         (KJS::WindowProtoFuncNotImplemented::callAsFunction):
1776         (KJS::Location::getOwnPropertySlot):
1777         (KJS::Location::put):
1778         (KJS::LocationProtoFuncReplace::callAsFunction):
1779         (KJS::LocationProtoFuncReload::callAsFunction):
1780         (KJS::LocationProtoFuncAssign::callAsFunction):
1781         (KJS::LocationProtoFuncToString::callAsFunction):
1782         * bindings/js/kjs_window.h:
1783         (KJS::Window::allowsAccessFrom):
1784         * bindings/objc/WebScriptObject.mm:
1785         (-[WebScriptObject _isSafeScript]): Reverse caller/argument of allowsAccessFrom to match
1786         the new call.
1787         * bindings/scripts/CodeGeneratorJS.pm:
1788
1789 2007-12-08  Rob Buis  <buis@kde.org>
1790
1791         Reviewed by Darin.
1792
1793         http://bugs.webkit.org/show_bug.cgi?id=15464
1794         SVGLengthList allows bad values
1795
1796         Be more strict with svg lengths without a unit identifier.
1797
1798         Test: svg/custom/invalid-lengthlist.svg
1799
1800         * svg/SVGLength.cpp:
1801         (WebCore::SVGLength::setValueAsString):
1802
1803 2007-12-08  Rob Buis  <buis@kde.org>
1804
1805         Mac Tiger build fix.
1806
1807         Use the wtf prefix when including MathExtras.h.
1808
1809         * rendering/RenderMedia.cpp:
1810
1811 2007-12-08  Alp Toker  <alp@atoker.com>
1812
1813         GTK+ build fix (for ENABLE_VIDEO builds):
1814
1815         Include MathExtras.h to get isfinite().
1816
1817         * rendering/RenderMedia.cpp:
1818
1819 2007-12-08  Rob Buis  <buis@kde.org>
1820
1821         Reviewed by Darin.
1822
1823         http://bugs.webkit.org/show_bug.cgi?id=15528
1824         svg_dynamic_cast should be removed
1825
1826         Replace svg_dynamic_cast with a combination of
1827         isSVGElement and static_cast.
1828
1829         * rendering/SVGRootInlineBox.cpp:
1830         (WebCore::SVGRootInlineBox::buildLayoutInformation):
1831         (WebCore::SVGRootInlineBox::buildTextChunks):
1832         * svg/SVGAnimationElement.cpp:
1833         (WebCore::SVGAnimationElement::targetElement):
1834         * svg/SVGElement.h:
1835         * svg/SVGElementInstance.cpp:
1836         (WebCore::SVGElementInstance::updateInstance):
1837         * svg/SVGFilterElement.cpp:
1838         (WebCore::SVGFilterElement::canvasResource):
1839         * svg/SVGGradientElement.cpp:
1840         (WebCore::SVGGradientElement::buildStops):
1841         * svg/SVGLocatable.cpp:
1842         (WebCore::SVGLocatable::getTransformToElement):
1843         * svg/SVGMaskElement.cpp:
1844         (WebCore::SVGMaskElement::drawMaskerContent):
1845         * svg/SVGSwitchElement.cpp:
1846         (WebCore::SVGSwitchElement::childShouldCreateRenderer):
1847         * svg/SVGUseElement.cpp:
1848         (WebCore::SVGUseElement::insertedIntoDocument):
1849         (WebCore::SVGUseElement::buildPendingResource):
1850         (WebCore::SVGUseElement::buildInstanceTree):
1851         (WebCore::SVGUseElement::handleDeepUseReferencing):
1852         (WebCore::SVGUseElement::buildShadowTree):
1853         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
1854         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
1855         * svg/graphics/SVGResource.cpp:
1856         (WebCore::getResourceById):
1857
1858 2007-12-07  Antti Koivisto  <antti@apple.com>
1859
1860         Reviewed by Adele.
1861         
1862         Partial fix for <rdar://problem/5633400>
1863         Transformed <video>, <img>, <embed> are not clipped correctly until a repaint is forced
1864         
1865         Fix video painting when transform is applied.
1866
1867         Test: media/video-transformed.html
1868
1869         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1870         (WebCore::MediaPlayerPrivate::paint):
1871
1872 2007-12-07  Dan Bernstein  <mitz@apple.com>
1873
1874         Reviewed by Sam Weinig.
1875
1876         - fix http://bugs.webkit.org/show_bug.cgi?id=16348
1877           @font-face does not affect the default style
1878
1879         Test: fast/css/font-face-default-font.html
1880
1881         * dom/Document.cpp:
1882         (WebCore::Document::recalcStyle): Pass our font selector to
1883         Font::update() if we already have one.
1884
1885 2007-12-07  Darin Adler  <darin@apple.com>
1886
1887         - fix Windows build
1888
1889         * bridge/win/GlobalHistoryWin.cpp:
1890         (WebCore::historyContains): Missed a rename.
1891
1892 2007-12-07  Brady Eidson  <beidson@apple.com>
1893
1894         Reviewed by Anders and Darin
1895
1896         When a statement bumps up against the quota and the UI Delegate grants more space, we need to
1897         actually set the new maximum size on the SQLiteDatabase (in addition to storing the new max quota
1898         in the DatabaseTracker, which was already done)
1899
1900         * storage/SQLTransaction.cpp:
1901         (WebCore::SQLTransaction::runStatements): If a statement is being retried, set the maximum size on
1902           the SQLiteDatabase to the new maximum size
1903
1904 2007-12-07  Darin Adler  <darin@apple.com>
1905
1906         - fix Tiger build
1907
1908         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Tiger didn't even have
1909         QTKIT_VERSION_MAX_ALLOWED, so add logic to work without that.
1910
1911 2007-12-07  Darin Adler  <darin@apple.com>
1912
1913         - fix 64-bit build, hopefully without breaking Tiger build
1914
1915         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1916         (WebCore::MediaPlayerPrivate::updateStates):
1917         Don't use Movies.h constants that are nonexistent in 64-bit.
1918         Define the new QTMovie.h constants, though, when using an older QTKit.
1919
1920 2007-12-07  Brady Eidson  <beidson@apple.com>
1921
1922         Reviewed by Anders
1923
1924         Fix <rdar://problem/5636115> - Prompted for quota increase to create database when it already existed
1925
1926         * storage/DatabaseTracker.cpp:
1927         (WebCore::DatabaseTracker::canEstablishDatabase): Check hasEntryForDatabase before doing any prompting
1928         (WebCore::DatabaseTracker::hasEntryForDatabase): Check and see if this database already exists
1929         * storage/DatabaseTracker.h:
1930
1931 2007-12-07  Darin Adler  <darin@apple.com>
1932
1933         Reviewed by Mitz.
1934
1935         - http://bugs.webkit.org/show_bug.cgi?id=15981
1936           speed up visited-link code a bit
1937
1938         * bridge/GlobalHistory.h: Change historyContains to take a character pointer plus length
1939         instead of requiring a DeprecatedString.
1940
1941         * bridge/mac/GlobalHistoryMac.mm: (WebCore::historyContains): Updated for above change.
1942         Also removes pointless "fast Latin-1" case that was never used.
1943         * bridge/win/GlobalHistoryWin.cpp: (WebCore::historyContains): Ditto.
1944         * platform/gtk/TemporaryLinkStubs.cpp: (WebCore::historyContains): Ditto.
1945         * platform/wx/TemporaryLinkStubs.cpp: (WebCore::historyContains): Ditto.
1946
1947         * css/CSSStyleSelector.cpp:
1948         (WebCore::findHash): Added. Helper for cleanpath.
1949         (WebCore::findSlashDotDotSlash): Ditto.
1950         (WebCore::findSlashSlash): Ditto.
1951         (WebCore::findSlashDotSlash): Ditto.
1952         (WebCore::cleanpath): Changed to use fast helper functions instead of slower general-purpose
1953         DeprecatedString find function.
1954         (WebCore::containsColonSlashSlash): Added. Helper for checkPseudoState.
1955         (WebCore::checkPseudoState): Got rid of reference count churn by using an AtomicString*
1956         instead of an AtomicString for the attribute value. Changed to use fast helper function
1957         instead of slower DeprecatedString::contains function, and also made the fast case not
1958         bother allocating a DeprecatedConstString.
1959
1960         - unrelated tiny cleanup
1961
1962         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
1963         (WebCore::releaseCachedStops): Use static_cast instead of reinterpret_cast.
1964         (WebCore::cgGradientCallback): Ditto.
1965
1966 2007-12-07  Darin Adler  <darin@apple.com>
1967
1968         Fix build on Tiger (Mark Rowe told me how).
1969
1970         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1971         Include <objc/objc-runtime.h>, which existed back on Tiger,
1972         rather than <objc/runtime.h>, which did not.
1973
1974 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
1975
1976         Build fix: rolling out last build fix to change #include path.
1977
1978         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1979
1980 2007-12-07  Steve Falkenburg  <sfalken@apple.com>
1981
1982         Re-named our B&I flag from BUILDBOT to PRODUCTION.
1983
1984         Reviewed by Sam Weinig.
1985
1986         * WebCore.vcproj/WebCore.make:
1987
1988 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
1989
1990         Build fix: corrected #include path.
1991
1992         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1993
1994 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
1995
1996         Reviewed by Sam Weinig.
1997
1998         Added some namespace qualifications and a forwarding header, now that
1999         KJS::Node is sometimes #included in WebCore by JavaScriptCore headers.
2000
2001         * ForwardingHeaders/wtf/ListRefPtr.h: Added.
2002         * bindings/js/JSXSLTProcessor.cpp:
2003         (KJS::JSXSLTProcessorPrototypeFunctionTransformToFragment::callAsFunction):
2004         * bindings/js/kjs_binding.cpp:
2005         (KJS::ScriptInterpreter::getDOMNodeForDocument):
2006         (KJS::ScriptInterpreter::forgetDOMNodeForDocument):
2007         (KJS::ScriptInterpreter::putDOMNodeForDocument):
2008         (KJS::ScriptInterpreter::markDOMNodesForDocument):
2009         (KJS::ScriptInterpreter::updateDOMNodeDocument):
2010
2011 2007-12-07  Adam Roben  <aroben@apple.com>
2012
2013         Add SoftLinking.h for Windows and use it in a few places
2014
2015         Reviewed by Oliver.
2016
2017         * WebCore.vcproj/WebCore.vcproj: Added new file to project.
2018         * platform/win/PlatformScrollBarSafari.cpp: Use SoftLinking.h.
2019         (WebCore::PlatformScrollbar::PlatformScrollbar): Removed manual
2020         soft-linking calls.
2021         (WebCore::PlatformScrollbar::paintButton): Check for the presence of
2022         the SafariTheme library now that we can't check for the presence of
2023         paintThemePart directly.
2024         (WebCore::PlatformScrollbar::paintTrack): Ditto.
2025         (WebCore::PlatformScrollbar::paintThumb): Ditto.
2026         * platform/win/SoftLinking.h: Copied from WebCore/platform/mac/SoftLinking.h.
2027         * rendering/RenderThemeSafari.cpp: Same basic changes as to
2028         PlatformScrollBarSafari.cpp.
2029         (WebCore::RenderThemeSafari::RenderThemeSafari):
2030         (WebCore::RenderThemeSafari::isControlStyled):
2031         (WebCore::RenderThemeSafari::paintCapsLockIndicator):
2032         * rendering/RenderThemeSafari.h: Removed m_themeDLL member.
2033
2034 2007-12-07  Darin Adler  <darin@apple.com>
2035
2036         Reviewed by Adele.
2037
2038         - fix <rdar://problem/5608795> CrashTracer: 481 crashes in Safari
2039           at WebCore::HTMLSelectElement::saveState const + 152
2040
2041         Test: fast/forms/select-set-inner.html
2042
2043         * dom/ContainerNode.cpp:
2044         (WebCore::ContainerNode::removeChildren): Added a return value, as with other
2045         calls that change children, so we can optimize for the case where it does nothing.
2046         (WebCore::ContainerNode::cloneChildNodes): Changed parameter type to ContainerNode.
2047         * dom/ContainerNode.h: See above.
2048
2049         * html/HTMLOptGroupElement.cpp:
2050         (WebCore::HTMLOptGroupElement::removeChildren): Override removeChildren and call
2051         recalcSelectOptions in that case.
2052         (WebCore::HTMLOptGroupElement::childrenChanged): Override childrenChanged instead of
2053         addChild, for consistency with HTMLSelectElement; no need to override both.
2054         (WebCore::HTMLOptGroupElement::groupLabelText): Made const.
2055         * html/HTMLOptGroupElement.h: See above.
2056
2057         * html/HTMLSelectElement.cpp: Don't override addChild any more, because we already
2058         override childrenChanged, and addChild calls that.
2059         (WebCore::HTMLSelectElement::removeChildren): Override removeChildren and call
2060         recalcSelectOptions in that case.
2061         (WebCore::HTMLSelectElement::recalcListItems): Tightened up the code a little bit
2062         by using a for loop and traverseNextSibling. Also added some new comments and
2063         removed some obsolete ones.
2064         (WebCore::HTMLSelectElement::checkListItems): Added. Debug-only check to make
2065         sure we don't have a stale list items vector.
2066         * html/HTMLSelectElement.h: Changed listItems() to invoke checkListItems().
2067         This will help us catch cases where we have too few calls to setRecalcListItems.
2068
2069 2007-12-07  Dan Bernstein  <mitz@apple.com>
2070
2071         Reviewed by Darin Adler.
2072
2073         - WebCore part of fixing <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
2074
2075         Test: fast/repaint/focus-ring.html
2076
2077         * editing/SelectionController.cpp:
2078         (WebCore::SelectionController::caretRepaintRect): Changed to return just
2079         the caret rect without any padding.
2080         (WebCore::SelectionController::recomputeCaretRect): Changed to repaint
2081         just the caret rect without any padding.
2082         * platform/graphics/GraphicsContext.h: Removed setFocusRingClip() and
2083         clearFocusRingClip().
2084         * platform/graphics/cairo/GraphicsContextCairo.cpp: Ditto.
2085         * platform/graphics/cg/GraphicsContextCG.cpp: Ditto.
2086         * platform/graphics/cg/GraphicsContextPlatformPrivate.h: Removed
2087         m_focusRingClip member.
2088         * platform/graphics/mac/GraphicsContextMac.mm:
2089         (WebCore::GraphicsContext::drawFocusRing): Changed to call
2090         wkDrawFocusRing() once without setting up additional clip. On Leopard,
2091         wkDrawFocusRing() respects the context clip now. On Tiger, a
2092         transparency layer is used to apply clipping to the focus ring.
2093         * platform/graphics/qt/GraphicsContextQt.cpp: Removed focus ring clip
2094         methods and member.
2095         * platform/graphics/wx/GraphicsContextWx.cpp: Ditto.
2096         * platform/mac/WebCoreSystemInterface.h: Removed the clipRect argument
2097         to wkDrawFocusRing().
2098         * platform/mac/WebCoreSystemInterface.mm: Ditto.
2099         * rendering/RenderLayer.cpp:
2100         (WebCore::setClip): Removed call to set the focus ring clip.
2101         (WebCore::restoreClip): Removed call to reset the focus ring clip.
2102
2103 2007-12-07  Darin Adler  <darin@apple.com>
2104
2105         Reviewed by Antti Koivisto and Kevin Decker.
2106
2107         - fix <rdar://problem/5601586> QtKit should be dynamically loaded upon need, not linked at startup
2108
2109         Also did a lot of small tweaks to MediaPlayerPrivateQTKit.
2110
2111         * WebCore.xcodeproj/project.pbxproj: Don't link to QTKit.
2112
2113         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Omit unneeded includes and declarations.
2114         Made a lot more functions const. Made a few more members private and a couple inline.
2115         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Added soft linking machinery for all the
2116         things we currently use in QTKit. It's a little more awkward for classes and other data objects
2117         than it is for functions, but still relatively straightforward, with no changes needed to the
2118         client code. Added using namespace directives. Made a cuePointTimerInterval constant and put
2119         it at the top of the file. Use 0 consistently instead of sometimes 0 and sometimes 0.0f.
2120         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Removed unneeded initialization of RetainPtr
2121         members to nil.
2122         (WebCore::MediaPlayerPrivate::createQTMovie): Use adoptNS instead of autorelease.
2123         (WebCore::MediaPlayerPrivate::createQTMovieView): Ditto. Also use -[NSColor clearColor].
2124         (WebCore::MediaPlayerPrivate::createQTTime): Remove an unneeded type cast that had no effect.
2125         Changed to use long instead of int because that's the type for a QTTime time scale anyway.
2126         (WebCore::MediaPlayerPrivate::duration): Use a static_cast instead of a C-style cast.
2127         (WebCore::MediaPlayerPrivate::currentTime): Ditto. Also merged into a single expression.
2128         (WebCore::MediaPlayerPrivate::cuePointTimerFired): Added code to make a copy of the cue
2129         points set to avoid a potential problem with a set being modified as we iterate it.
2130         (WebCore::MediaPlayerPrivate::bytesLoaded): Removed unneeded null check of m_qtMovie.
2131         (WebCore::MediaPlayerPrivate::updateStates): Instead of comments explaining the numeric
2132         values, used the constants from the headers directly.
2133         (WebCore::MediaPlayerPrivate::getSupportedTypes): Instead of (QTMovieFileTypeOptions)0,
2134         pass the named constant with value 0, QTIncludeCommonTypes. Skipped the intermediate type
2135         of NSString to remove one cast. Replaced C-style cast with reinterpret_cast (arguably
2136         no better). Used RetainPtr instead of explicit CFRelease calls.
2137
2138         * platform/mac/SoftLinking.h: Added macros to do soft linking for classes and for pointers.
2139         It's not quite as automatic as the soft linking we can do for functions, since these define
2140         functions to get the values, so you need to define macros to make what look like variable
2141         accesses turn into function calls. See MediaPlayerPrivateQTKit for the details.
2142
2143         * html/HTMLMediaElement.h:
2144         * html/TimeRanges.h:
2145         * html/VoidCallback.h:
2146         * platform/graphics/MediaPlayer.h:
2147         Use angle brackets for wtf includes. Omit unneeded includes.
2148
2149 2007-12-07  Dan Bernstein  <mitz@apple.com>
2150
2151         Reviewed by Darin Adler.
2152
2153         - fix http://bugs.webkit.org/show_bug.cgi?id=16334
2154           <rdar://problem/5634923> REGRESSION (r28299): Homepage of any DotMac Web Gallery won't load completely
2155
2156         Test: fast/dynamic/subtree-no-common-root-static-y.html
2157
2158         * rendering/RenderObject.cpp:
2159         (WebCore::RenderObject::markContainingBlocksForLayout): Changed the call
2160         to setChildNeedsLayout() to not mark containing blocks and added a
2161         separate call to markContainingBlocksForLayout() that will not schedule
2162         a layout if we are already in the middle of scheduleRelayoutOfSubtree().
2163
2164 2007-12-07  Alexey Proskuryakov  <ap@webkit.org>
2165
2166         Reviewed by Darin.
2167
2168         http://bugs.webkit.org/show_bug.cgi?id=16325
2169         <rdar://problem/5632997> REGRESSION: www.xerox.ru doesn't work
2170         
2171         Test: http/tests/misc/empty-cookie.html
2172
2173         * platform/mac/CookieJar.mm:
2174         (WebCore::setCookies): Don't store empty cookies.
2175         (WebCore::cookies): Filter out empty cookies if we have them, as they could have been set
2176         with an earlier version of Leopard!
2177
2178 2007-12-06  Ada Chan  <adachan@apple.com>
2179
2180         Fixed the if statement (ERROR_SUCCESS is 0 and we were actually
2181         returning true when there's an error).
2182
2183         Reviewed by Steve.
2184
2185         * platform/win/FileSystemWin.cpp:
2186         (WebCore::makeAllDirectories):
2187
2188 2007-12-06  Darin Adler  <darin@apple.com>
2189
2190         - fix broken regression test
2191
2192         * bindings/js/kjs_binding.cpp:
2193         (KJS::setDOMException): Oops, this was just supposed to be PERMISSION_DENIED.
2194
2195 2007-12-06  Darin Adler  <darin@apple.com>
2196
2197         Reviewed by Sam Weinig.
2198
2199         - fix http://bugs.webkit.org/show_bug.cgi?id=16332
2200           ObjC DOM exception object descriptions should include the exception name
2201
2202         * WebCore.pro: Added ExceptionCode.cpp.
2203         * WebCore.vcproj/WebCore.vcproj: Added ExceptionCode.cpp.
2204         * WebCore.xcodeproj/project.pbxproj: Added ExceptionCode.cpp.
2205         * WebCoreSources.bkl: Added ExceptionCode.cpp.
2206
2207         * bindings/js/kjs_binding.cpp: (KJS::setDOMException): Moved the code to decompose an
2208         ExceptionCode into ExceptionCode.h/cpp -- getExceptionCodeDescription. Also removed
2209         the many unneeded includes that were here. Had to keep one special case here, for
2210         SECURITY_ERR.
2211
2212         * bindings/objc/ExceptionHandlers.mm: (WebCore::raiseDOMException): Changed to use the
2213         new getExceptionCodeDescription function so that this shares the exception name
2214         information that was previously only available to JavaScript.
2215
2216         * dom/ExceptionCode.cpp: Copied from bindings/js/kjs_binding.cpp.
2217         (WebCore::getExceptionCodeDescription): Added some assertions, and made the function
2218         handle exception names in a slightly more robust way that is not subject to integer
2219         overflow. (Not a real world issue since we should never receive a bad exception code.)
2220
2221         * dom/ExceptionCode.h: Added the ExceptionCodeDescription struct and the
2222         getExceptionCodeDescription function.
2223
2224         * svg/SVGException.h: Added a missing #include and got rid of some comments. Some of
2225         the comments were mildly helpful, but others were incorrect. This now matches the other
2226         exception-related headers such as RangeException.h.
2227
2228 2007-12-06  Brady Eidson  <beidson@apple.com>
2229
2230         Reviewed by Darin
2231
2232         Fixed a glaring bug that would prevent a statement from getting run a second time
2233
2234         * storage/SQLStatement.cpp:
2235         (WebCore::SQLStatement::execute): Clear failure due to quota *before* we check the error
2236           and return early
2237         (WebCore::SQLStatement::clearFailureDueToQuota): Only clear the error if it was a quota error
2238
2239 2007-12-06  Timothy Hatcher  <timothy@apple.com>
2240
2241         Reviewed by Oliver Hunt.
2242
2243         Use keydown instead of keypress so keyIdentifier can be used.
2244
2245         * page/inspector/ConsolePanel.js: Use keydown instead of keypress.
2246         * page/inspector/DatabasePanel.js: Ditto.
2247         * page/inspector/inspector.js: Ditto. Plus call removeEventListener
2248         before deleting windowLoaded.
2249
2250 2007-12-06  Adam Roben  <aroben@apple.com>
2251
2252         Rename FontsTable.plist to FontsList.plist
2253
2254         Rubberstamped by Hyatt.
2255
2256         * platform/graphics/win/FontDatabase.cpp:
2257
2258 2007-12-06  Brady Eidson  <beidson@apple.com>
2259
2260         Reviewed by Darin
2261
2262         Tweaked a comment and a few assertions from my last checkin
2263
2264         * storage/SQLStatement.cpp:
2265         (WebCore::SQLStatement::execute):
2266         (WebCore::SQLStatement::clearFailureDueToQuota):
2267         (WebCore::SQLStatement::lastExecutionFailedDueToQuota):
2268
2269 2007-12-06  Brady Eidson <beidson@apple.com>
2270
2271         Reviewed by Darin
2272
2273         Finished hooking up UI Delegate for databases - Database operations will now enforce a size quota and
2274         will ask the UI Delegate for more space when that quota is met
2275
2276         * platform/sql/SQLiteDatabase.cpp: Add the new SQLResultFull constant
2277         * platform/sql/SQLiteDatabase.h: Ditto
2278
2279         * storage/Database.cpp:
2280         (WebCore::Database::securityOriginData): Added this accessor, copying for thread safety
2281         (WebCore::Database::stringIdentifier): Ditto
2282         * storage/Database.h:
2283
2284         * storage/SQLStatement.cpp:
2285         (WebCore::SQLStatement::SQLStatement):
2286         (WebCore::SQLStatement::execute): Change to return an enum that represents 3 states - success, error, and quota.
2287           If the result is quota, this statement expects that it might be run again, presumably after the user increases 
2288           the quota
2289         (WebCore::SQLStatement::setFailureDueToQuota): Setup a quota failure, including a flag and the error
2290         (WebCore::SQLStatement::clearFailureDueToQuota): Clear a quota failure, for when the statement is rerun
2291         (WebCore::SQLStatement::lastExecutionFailedDueToQuota):
2292         * storage/SQLStatement.h:
2293
2294         * storage/SQLTransaction.cpp:
2295         (WebCore::SQLTransaction::SQLTransaction):
2296         (WebCore::SQLTransaction::performPendingCallback): Added an acceptable callback pointer
2297         (WebCore::SQLTransaction::openTransactionAndPreflight): Setup the quota in the database that will remain for this 
2298           transaction.  Note that in this patch, the quota being set is wrong - it makes sense to fix that in a follow up patch
2299         (WebCore::SQLTransaction::runStatements): Modified to add the ability to re-run a statement based on the UI delegate
2300           decision and whether the current statement was already run
2301         (WebCore::SQLTransaction::runCurrentStatement): Added another result condition - the Quota result - and handle it
2302         (WebCore::SQLTransaction::handleCurrentStatementError): Statements can now error-out from two places, so the code
2303           that handles a statement error was moved here
2304         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): Added - Consult the UI delegate for more quota, then 
2305           reschedule the current statement on the database thread
2306         * storage/SQLTransaction.h:
2307
2308 2007-12-06  Steve Falkenburg  <sfalken@apple.com>
2309
2310         <rdar://problem/5614257> Crash in timer / hashtable code due to uncaught exception
2311         
2312         Don't use callback-based timers, since these cause Windows to eat Windows crashes
2313         in code the timers call.
2314         
2315         Windows appears to be defending against "shatter" attacks partially by setting
2316         up a structured exception block while dispatching callback-based WM_TIMERs.
2317         
2318         I verified this by adding a divide by zero into some timer callback code.
2319         In the case where the timer was dispatched via a callback, the divide by zero
2320         exception was silently handled and ignored, with execution continuing after
2321         our call to DispatchMessage.  When processed via the WNDPROC, no SEH
2322         block was established by Windows, and our divide by zero generated a real
2323         crash (which is what we wanted).
2324         
2325         Windows handling our crashes for us led us to leave the timer data structures
2326         in an invalid state so the next time a timer was set, we'd crash accessing an
2327         invalid HashMap of timer data.
2328         
2329         Reviewed by Hyatt.
2330
2331         * platform/win/SharedTimerWin.cpp:
2332         (WebCore::TimerWindowWndProc):
2333         (WebCore::setSharedTimerFireTime):
2334
2335 2007-12-06  Adam Roben  <aroben@apple.com>
2336
2337         Fix <rdar://5108390> Feed title is too low in blue banner
2338
2339         Way back in r23069 we started applying the same font ascent hack that
2340         Mac WebKit applies to Helvetica, Times, and Courier. We did this so
2341         that those fonts would match the Mac metrics when we run the
2342         regression tests. However, this hack was applying to Arial on Windows
2343         when a site would specify the Helvetica font face because Windows will
2344         alias the font names. Instead of removing the hack entirely, we
2345         turn it off by default but provide some SPI so that DumpRenderTree can
2346         turn it on.
2347
2348         Reviewed by Hyatt.
2349
2350         All tests pass.
2351
2352         * platform/graphics/FontData.h: Add a new static method to turn on the
2353         hack on Windows only.
2354         * platform/graphics/win/FontDataWin.cpp:
2355         (WebCore::FontData::setShouldApplyMacAscentHack): Added.
2356         (WebCore::FontData::platformInit): Only perform the hack if
2357         shouldApplyMacAscentHack is true.
2358
2359 2007-12-06  Geoffrey Garen  <ggaren@apple.com>
2360
2361         Reviewed by Sam Weinig.
2362
2363         Fixed http://bugs.webkit.org/show_bug.cgi?id=16328
2364         REGRESSION (r28470): Crash expanding a GMail conversation
2365         
2366         * page/Frame.cpp:
2367         (WebCore::Frame::scriptProxy): Only return 0 if JS seems disabled *and*
2368         we haven't created the proxy yet. If we've created the proxy already, a
2369         script may be in the midst of execution, even though we've lost our
2370         settings object. During execution, scripts assume they have free access
2371         to the proxy.
2372
2373 2007-12-06  Adele Peterson  <adele@apple.com>
2374
2375         Reviewed by Oliver.
2376
2377         Fix for <rdar://problem/5631356> Toggling display property on video causes controls to get lost
2378
2379         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attach): Call updateFromElement.
2380         * html/HTMLMediaElement.h:
2381
2382 2007-12-05  Antti Koivisto  <antti@apple.com>
2383
2384         Reviewed by Oliver.
2385
2386         Rename
2387
2388         Movie -> MediaPlayer
2389         MoviePrivate -> MediaPlayerPrivate
2390         
2391         Movie is QuickTime terminology and clashes with its C API.
2392
2393         * WebCore.xcodeproj/project.pbxproj:
2394         * html/HTMLMediaElement.cpp:
2395         (WebCore::HTMLMediaElement::HTMLMediaElement):
2396         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2397         (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
2398         (WebCore::HTMLMediaElement::bufferingRate):
2399         (WebCore::HTMLMediaElement::load):
2400         (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
2401         (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
2402         (WebCore::HTMLMediaElement::setReadyState):
2403         (WebCore::HTMLMediaElement::progressEventTimerFired):
2404         (WebCore::HTMLMediaElement::seek):
2405         (WebCore::HTMLMediaElement::currentTime):
2406         (WebCore::HTMLMediaElement::duration):
2407         (WebCore::HTMLMediaElement::playbackRate):
2408         (WebCore::HTMLMediaElement::setPlaybackRate):
2409         (WebCore::HTMLMediaElement::play):
2410         (WebCore::HTMLMediaElement::pause):
2411         (WebCore::HTMLMediaElement::setVolume):
2412         (WebCore::HTMLMediaElement::setMuted):
2413         (WebCore::HTMLMediaElement::pickMedia):
2414         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
2415         (WebCore::HTMLMediaElement::mediaPlayerVolumeChanged):
2416         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2417         (WebCore::HTMLMediaElement::mediaPlayerCuePointReached):
2418         (WebCore::HTMLMediaElement::addCuePoint):
2419         (WebCore::HTMLMediaElement::buffered):
2420         (WebCore::HTMLMediaElement::seekable):
2421         (WebCore::HTMLMediaElement::effectiveStart):
2422         (WebCore::HTMLMediaElement::effectiveEnd):
2423         (WebCore::HTMLMediaElement::effectiveLoopStart):
2424         (WebCore::HTMLMediaElement::effectiveLoopEnd):
2425         (WebCore::HTMLMediaElement::updateMediaPlayer):
2426         (WebCore::HTMLMediaElement::willSaveToCache):
2427         * html/HTMLMediaElement.h:
2428         (WebCore::HTMLMediaElement::player):
2429         * html/HTMLVideoElement.cpp:
2430         (WebCore::HTMLVideoElement::videoWidth):
2431         (WebCore::HTMLVideoElement::videoHeight):
2432         * platform/MIMETypeRegistry.cpp:
2433         (WebCore::initialiseSupportedMediaMIMETypes):
2434         (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
2435         (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
2436         * platform/MIMETypeRegistry.h:
2437         * platform/graphics/MediaPlayer.cpp: Copied from WebCore/platform/graphics/Movie.cpp.
2438         (WebCore::MediaPlayer::MediaPlayer):
2439         (WebCore::MediaPlayer::~MediaPlayer):
2440         (WebCore::MediaPlayer::load):
2441         (WebCore::MediaPlayer::cancelLoad):
2442         (WebCore::MediaPlayer::play):
2443         (WebCore::MediaPlayer::pause):
2444         (WebCore::MediaPlayer::duration):
2445         (WebCore::MediaPlayer::currentTime):
2446         (WebCore::MediaPlayer::seek):
2447         (WebCore::MediaPlayer::paused):
2448         (WebCore::MediaPlayer::seeking):
2449         (WebCore::MediaPlayer::naturalSize):
2450         (WebCore::MediaPlayer::hasVideo):
2451         (WebCore::MediaPlayer::networkState):
2452         (WebCore::MediaPlayer::readyState):
2453         (WebCore::MediaPlayer::volume):
2454         (WebCore::MediaPlayer::setVolume):
2455         (WebCore::MediaPlayer::rate):
2456         (WebCore::MediaPlayer::setRate):
2457         (WebCore::MediaPlayer::muted):
2458         (WebCore::MediaPlayer::setMuted):
2459         (WebCore::MediaPlayer::dataRate):
2460         (WebCore::MediaPlayer::setEndTime):
2461         (WebCore::MediaPlayer::addCuePoint):
2462         (WebCore::MediaPlayer::removeCuePoint):
2463         (WebCore::MediaPlayer::clearCuePoints):
2464         (WebCore::MediaPlayer::maxTimeBuffered):
2465         (WebCore::MediaPlayer::maxTimeSeekable):
2466         (WebCore::MediaPlayer::bytesLoaded):
2467         (WebCore::MediaPlayer::totalBytesKnown):
2468         (WebCore::MediaPlayer::totalBytes):
2469         (WebCore::MediaPlayer::setRect):
2470         (WebCore::MediaPlayer::visible):
2471         (WebCore::MediaPlayer::setVisible):
2472         (WebCore::MediaPlayer::paint):
2473         (WebCore::MediaPlayer::getSupportedTypes):
2474         (WebCore::MediaPlayer::networkStateChanged):
2475         (WebCore::MediaPlayer::readyStateChanged):
2476         (WebCore::MediaPlayer::volumeChanged):
2477         (WebCore::MediaPlayer::timeChanged):
2478         (WebCore::MediaPlayer::cuePointReached):
2479         * platform/graphics/MediaPlayer.h: Copied from WebCore/platform/graphics/Movie.h.
2480         (WebCore::MediaPlayerClient::~MediaPlayerClient):
2481         (WebCore::MediaPlayerClient::mediaPlayerNetworkStateChanged):
2482         (WebCore::MediaPlayerClient::mediaPlayerReadyStateChanged):
2483         (WebCore::MediaPlayerClient::mediaPlayerVolumeChanged):
2484         (WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
2485         (WebCore::MediaPlayerClient::mediaPlayerCuePointReached):
2486         * platform/graphics/Movie.cpp: Removed.
2487         * platform/graphics/Movie.h: Removed.
2488         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: Copied from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.cpp.
2489         (WebCore::mediaPlayerPrivateErrorCallback):
2490         (WebCore::mediaPlayerPrivateEOSCallback):
2491         (WebCore::mediaPlayerPrivateStateCallback):
2492         (WebCore::mediaPlayerPrivateBufferingCallback):
2493         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2494         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2495         (WebCore::MediaPlayerPrivate::load):
2496         (WebCore::MediaPlayerPrivate::play):
2497         (WebCore::MediaPlayerPrivate::pause):
2498         (WebCore::MediaPlayerPrivate::duration):
2499         (WebCore::MediaPlayerPrivate::currentTime):
2500         (WebCore::MediaPlayerPrivate::seek):
2501         (WebCore::MediaPlayerPrivate::setEndTime):
2502         (WebCore::MediaPlayerPrivate::addCuePoint):
2503         (WebCore::MediaPlayerPrivate::removeCuePoint):
2504         (WebCore::MediaPlayerPrivate::clearCuePoints):
2505         (WebCore::MediaPlayerPrivate::startCuePointTimerIfNeeded):
2506         (WebCore::MediaPlayerPrivate::cancelSeek):
2507         (WebCore::MediaPlayerPrivate::cuePointTimerFired):
2508         (WebCore::MediaPlayerPrivate::paused):
2509         (WebCore::MediaPlayerPrivate::seeking):
2510         (WebCore::MediaPlayerPrivate::naturalSize):
2511         (WebCore::MediaPlayerPrivate::hasVideo):
2512         (WebCore::MediaPlayerPrivate::setVolume):
2513         (WebCore::MediaPlayerPrivate::setMuted):
2514         (WebCore::MediaPlayerPrivate::setRate):
2515         (WebCore::MediaPlayerPrivate::dataRate):
2516         (WebCore::MediaPlayerPrivate::networkState):
2517         (WebCore::MediaPlayerPrivate::readyState):
2518         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
2519         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
2520         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
2521         (WebCore::MediaPlayerPrivate::bytesLoaded):
2522         (WebCore::MediaPlayerPrivate::totalBytesKnown):
2523         (WebCore::MediaPlayerPrivate::totalBytes):
2524         (WebCore::MediaPlayerPrivate::cancelLoad):
2525         (WebCore::MediaPlayerPrivate::updateStates):
2526         (WebCore::MediaPlayerPrivate::loadStateChanged):
2527         (WebCore::MediaPlayerPrivate::rateChanged):
2528         (WebCore::MediaPlayerPrivate::sizeChanged):
2529         (WebCore::MediaPlayerPrivate::timeChanged):
2530         (WebCore::MediaPlayerPrivate::volumeChanged):
2531         (WebCore::MediaPlayerPrivate::didEnd):
2532         (WebCore::MediaPlayerPrivate::loadingFailed):
2533         (WebCore::MediaPlayerPrivate::setRect):
2534         (WebCore::MediaPlayerPrivate::setVisible):
2535         (WebCore::MediaPlayerPrivate::paint):
2536         (WebCore::MediaPlayerPrivate::getSupportedTypes):
2537         (WebCore::MediaPlayerPrivate::createGSTPlayBin):
2538         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h: Copied from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.h.
2539         * platform/graphics/gtk/MoviePrivateGStreamer.cpp: Removed.
2540         * platform/graphics/gtk/MoviePrivateGStreamer.h: Removed.
2541         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Copied from WebCore/platform/graphics/mac/MoviePrivateQTKit.h.
2542         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Copied from WebCore/platform/graphics/mac/MoviePrivateQTKit.mm.
2543         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2544         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2545         (WebCore::MediaPlayerPrivate::createQTMovie):
2546         (WebCore::MediaPlayerPrivate::createQTMovieView):
2547         (WebCore::MediaPlayerPrivate::createQTTime):
2548         (WebCore::MediaPlayerPrivate::load):
2549         (WebCore::MediaPlayerPrivate::play):
2550         (WebCore::MediaPlayerPrivate::pause):
2551         (WebCore::MediaPlayerPrivate::duration):
2552         (WebCore::MediaPlayerPrivate::currentTime):
2553         (WebCore::MediaPlayerPrivate::seek):
2554         (WebCore::MediaPlayerPrivate::doSeek):
2555         (WebCore::MediaPlayerPrivate::cancelSeek):
2556         (WebCore::MediaPlayerPrivate::seekTimerFired):
2557         (WebCore::MediaPlayerPrivate::setEndTime):
2558         (WebCore::MediaPlayerPrivate::addCuePoint):
2559         (WebCore::MediaPlayerPrivate::removeCuePoint):
2560         (WebCore::MediaPlayerPrivate::clearCuePoints):
2561         (WebCore::MediaPlayerPrivate::startCuePointTimerIfNeeded):
2562         (WebCore::MediaPlayerPrivate::cuePointTimerFired):
2563         (WebCore::MediaPlayerPrivate::paused):
2564         (WebCore::MediaPlayerPrivate::seeking):
2565         (WebCore::MediaPlayerPrivate::naturalSize):
2566         (WebCore::MediaPlayerPrivate::hasVideo):
2567         (WebCore::MediaPlayerPrivate::setVolume):
2568         (WebCore::MediaPlayerPrivate::setMuted):
2569         (WebCore::MediaPlayerPrivate::setRate):
2570         (WebCore::MediaPlayerPrivate::dataRate):
2571         (WebCore::MediaPlayerPrivate::networkState):
2572         (WebCore::MediaPlayerPrivate::readyState):
2573         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
2574         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
2575         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
2576         (WebCore::MediaPlayerPrivate::bytesLoaded):
2577         (WebCore::MediaPlayerPrivate::totalBytesKnown):
2578         (WebCore::MediaPlayerPrivate::totalBytes):
2579         (WebCore::MediaPlayerPrivate::cancelLoad):
2580         (WebCore::MediaPlayerPrivate::updateStates):
2581         (WebCore::MediaPlayerPrivate::loadStateChanged):
2582         (WebCore::MediaPlayerPrivate::rateChanged):
2583         (WebCore::MediaPlayerPrivate::sizeChanged):
2584         (WebCore::MediaPlayerPrivate::timeChanged):
2585         (WebCore::MediaPlayerPrivate::volumeChanged):
2586         (WebCore::MediaPlayerPrivate::didEnd):
2587         (WebCore::MediaPlayerPrivate::setRect):
2588         (WebCore::MediaPlayerPrivate::setVisible):
2589         (WebCore::MediaPlayerPrivate::paint):
2590         (WebCore::MediaPlayerPrivate::getSupportedTypes):
2591         (-[WebCoreMovieObserver initWithCallback:WebCore::]):
2592         * platform/graphics/mac/MoviePrivateQTKit.h: Removed.
2593         * platform/graphics/mac/MoviePrivateQTKit.mm: Removed.
2594         * rendering/RenderMedia.cpp:
2595         (WebCore::RenderMedia::player):
2596         * rendering/RenderMedia.h:
2597         * rendering/RenderVideo.cpp:
2598         (WebCore::RenderVideo::RenderVideo):
2599         (WebCore::RenderVideo::~RenderVideo):
2600         (WebCore::RenderVideo::videoSizeChanged):
2601         (WebCore::RenderVideo::paintReplaced):
2602         (WebCore::RenderVideo::layout):
2603         (WebCore::RenderVideo::updateFromElement):
2604         (WebCore::RenderVideo::updatePlayer):
2605         * rendering/RenderVideo.h:
2606
2607 2007-12-06  Geoffrey Garen  <ggaren@apple.com>
2608
2609         Build fix: access global object directly.
2610
2611         * plugins/win/PluginViewWin.cpp:
2612         (WebCore::PluginViewWin::bindingInstance):
2613
2614 2007-12-06  Mark Rowe  <mrowe@apple.com>
2615
2616         Reviewed by Eric.
2617
2618         Fix bug spotted by GCC 4.2.
2619
2620         * bindings/js/kjs_window.cpp:
2621         (KJS::allowPopUp): Remove extraneous semicolon that completely changed the meaning of allowPopUp.
2622
2623 2007-12-06  Holger Hans Peter Freyther <holger.freyther@trolltech.com>
2624
2625         Reviewed by Alp Toker.
2626
2627         http://bugs.webkit.org/show_bug.cgi?id=16173
2628         Licensing change
2629
2630         Change license from BSD to LGPL.
2631
2632         * platform/gtk/FileSystemGtk.cpp:
2633
2634 2007-12-05  Rob Buis  <buis@kde.org>
2635
2636         Reviewed by Mitz.
2637
2638         http://bugs.webkit.org/show_bug.cgi?id=15289
2639         WebKit does not respect clip paths of a 0x0 rect
2640
2641         Make empty clip paths clip the whole referencing graphic.
2642
2643         * svg/SVGClipPathElement.cpp:
2644         (WebCore::SVGClipPathElement::canvasResource):
2645         * svg/graphics/SVGResourceClipper.h:
2646         (WebCore::ClipDataList::isEmpty):
2647
2648 2007-12-05  Darin Adler  <darin@apple.com>
2649
2650         Reviewed by Maciej.
2651
2652         - fix http://bugs.webkit.org/show_bug.cgi?id=16266
2653           <rdar://problem/5625279> REGRESSION: crash loading CNN.com at
2654           Interpreter::createObjectsForGlobalObjectProperties()
2655
2656         I don't know how to reproduce this in a test.
2657
2658         * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::mark):
2659         Call JSEventTargetNode::mark instead of DOMObject::mark. There's no difference
2660         right now, but it's best to call your base class, not your base's base.
2661
2662         * bindings/js/kjs_events.h: Removed unneeded virtual from the
2663         JSUnprotectedEventListener::mark() function; it neither derives from or is
2664         derived from anyone else with a mark() function so there's no need for virtual.
2665
2666         * bindings/js/kjs_window.cpp: (KJS::Window::mark): Call JSGlobalObject::mark,
2667         not JSObject::mark. This is the actual bug fix.
2668
2669 2007-12-05  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
2670
2671         http://bugs.webkit.org/show_bug.cgi?id=16145
2672         [gtk] Implement media support in GTK backend
2673
2674         Reviewed by Alp Toker.
2675
2676         Remove old comments, fix variable names, match WebKit coding style.
2677
2678         * platform/graphics/gtk/MoviePrivateGStreamer.cpp:
2679         (WebCore::moviePrivateEOSCallback):
2680         (WebCore::MoviePrivate::MoviePrivate):
2681         (WebCore::MoviePrivate::load):
2682         (WebCore::MoviePrivate::play):
2683         (WebCore::MoviePrivate::pause):
2684         (WebCore::MoviePrivate::currentTime):
2685         (WebCore::MoviePrivate::seek):
2686         (WebCore::MoviePrivate::cancelSeek):
2687         (WebCore::MoviePrivate::seeking):
2688         (WebCore::MoviePrivate::naturalSize):
2689         (WebCore::MoviePrivate::setVolume):
2690         (WebCore::MoviePrivate::setMuted):
2691         (WebCore::MoviePrivate::maxTimeBuffered):
2692         (WebCore::MoviePrivate::bytesLoaded):
2693         (WebCore::MoviePrivate::totalBytesKnown):
2694         (WebCore::MoviePrivate::totalBytes):
2695         (WebCore::MoviePrivate::updateStates):
2696         (WebCore::MoviePrivate::didEnd):
2697         (WebCore::MoviePrivate::paint):
2698         (WebCore::MoviePrivate::createGSTPlayBin):
2699         * platform/graphics/gtk/MoviePrivateGStreamer.h:
2700
2701 2007-12-05  Mark Rowe  <mrowe@apple.com>
2702
2703         Speculative wx build fix.  Add PlugInInfoStore::pluginNameForMIMEType to the temporary link stubs.
2704
2705         * platform/wx/TemporaryLinkStubs.cpp:
2706
2707 2007-12-05  Alp Toker  <alp@atoker.com>
2708
2709         Rubber stamped by Mark Rowe.
2710
2711         Remove DEPENDPATH on the generated sources directory. This causes
2712         trouble and is no longer necessary following the glib-genmarshal
2713         generator split.
2714
2715         * WebCore.pro:
2716
2717 2007-12-04  Geoffrey Garen  <ggaren@apple.com>
2718
2719         Reviewed by Darin Adler.
2720
2721         Third step in refactoring JSGlobalObject: Moved data members and data
2722         member access from Interpreter to JSGlobalObject. Changed Interpreter
2723         member functions to static functions. Same for the subclass, 
2724         ScriptInterpreter.
2725         
2726         This is a big change, but it's mostly code motion and renaming.
2727         
2728 2007-12-05  Darin Adler  <darin@apple.com>
2729
2730         "Reviewed" by Geoff.
2731
2732         * loader/FrameLoader.cpp:
2733         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Removed assertion.
2734         (WebCore::FrameLoader::dispatchDidCommitLoad): This one too.
2735         The assertions are firing like crazy. Not sure why yet.
2736
2737 2007-12-05  Darin Adler  <darin@apple.com>
2738
2739         Reviewed by Adam Roben.
2740
2741         - fix http://bugs.webkit.org/show_bug.cgi?id=16306
2742           Assertion failed in WebCore/loader/FrameLoader.cpp:4642
2743
2744         * loader/FrameLoader.cpp:
2745         (WebCore::FrameLoader::dispatchDidCommitLoad): Check m_creatingInitialEmptyDocument
2746         and don't deliver the client call in that case.
2747
2748 2007-12-05  Mark Rowe  <mrowe@apple.com>
2749
2750         Reviewed by Kevin Decker.
2751
2752         Fix 64-bit debug build.
2753
2754         * platform/text/mac/TextCodecMac.cpp:
2755         (WebCore::TextCodecMac::decode): OSStatus is a long for 32-bit but int on 64-bit,
2756         so we need to cast it to be able to use a single format specifier on both.
2757
2758 2007-12-05  Kevin Decker  <kdecker@apple.com>
2759
2760         Reviewed by Hyatt.
2761
2762         <rdar://problem/5613106> Acordex: REGRESSION (Tiger-Leopard): plug-ins can no longer take over TIFF images (affects uspto.gov)
2763        
2764         * loader/FrameLoader.cpp:
2765         (WebCore::FrameLoader::shouldUsePlugin): Allow plug-ins (with the exception of QuickTime) to
2766         takeover TIFF once again.
2767         
2768 2007-12-05  Luca Bruno  <lethalman88@gmail.com>
2769
2770         Reviewed by Alp Toker.
2771
2772         http://bugs.webkit.org/show_bug.cgi?id=16290
2773         [GTK] Pasting clipboard in rich text.
2774
2775         * platform/gtk/PasteboardGtk.cpp:
2776         (Pasteboard::documentFragment): Implement rich text paste support.
2777
2778 2007-12-05  Adele Peterson  <adele@apple.com>
2779
2780         Reviewed by Hyatt.
2781
2782         Reverting fix for <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
2783
2784         We need to just fix the underlying focus ring repaint problem.
2785
2786         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setStyle):
2787
2788 2007-12-04  Kevin McCullough  <kmccullough@apple.com>
2789
2790         Reviewed by Darin.
2791
2792         - <rdar://5621435>
2793         - Security Fix. Instead of having it off by default, WebKit now must
2794         explicitly turn off local-resource restriction when needed for backwards
2795         compatibility reasons.
2796
2797         * loader/FrameLoader.cpp:
2798
2799 2007-12-05  Adam Roben  <aroben@apple.com>
2800
2801         Set the menu item identifier for all menu items
2802
2803         This allows WebKit clients to distinguish between submenus in the
2804         context menu.
2805
2806         Reviewed by Darin.
2807
2808         No test possible.
2809
2810         * platform/win/ContextMenuItemWin.cpp:
2811         (WebCore::ContextMenuItem::ContextMenuItem):
2812
2813 2007-12-05  Dan Bernstein  <mitz@apple.com>
2814
2815         Reviewed by Darin Adler.
2816
2817         - WebCore part of fixing <rdar://problem/5111082> Flash popup video ad doesn't close when clicked at http://www.firestonecompleteautocare.com/
2818
2819         * manual-tests/nested-plug-ins.html: Added.
2820         * manual-tests/resources/nested-plug-ins-inner-frame.html: Added.
2821         * manual-tests/resources/nested-plug-ins-outer-frame.html: Added.
2822         * platform/ScrollView.h:
2823         * platform/Widget.h:
2824         (WebCore::Widget::attachToWindow): Added. Tells the widget that it is connected
2825         via visible ScrollViews to the root ScrollView of the WebView.
2826         (WebCore::Widget::detachFromWindow): Added. Tells the widget that it is no longer
2827         connected via visible ScrollViews to the root ScrollView of the WebView.
2828         * platform/win/ScrollViewWin.cpp:
2829         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate): Added
2830         m_visible and m_attachedToWindow members.
2831         (WebCore::ScrollView::attachToWindow): Added. Attaches all children if this
2832         view is visible.
2833         (WebCore::ScrollView::detachFromWindow): Added. Detaches all children if this
2834         view is visible (otherwise they would be detached already).
2835         (WebCore::ScrollView::show): Added. Attaches all children if this view
2836         is attached.
2837         (WebCore::ScrollView::hide): Added. Detaches all children if this view
2838         is attached (otherwise they would be detached already).
2839         (WebCore::ScrollView::isAttachedToWindow): Added.
2840         * platform/win/WidgetWin.cpp:
2841         (WebCore::Widget::setParent): Added calls to attachToWindow() and detachFromWindow()
2842         depending on whether the parent is set and attached or not.
2843         * plugins/win/PluginViewWin.cpp:
2844         (WebCore::PluginViewWin::setFocus):
2845         (WebCore::PluginViewWin::show): Changed to show the plug-in only if
2846         this view is attached.
2847         (WebCore::PluginViewWin::hide): Changed to hide the plug-in only if this
2848         view is attached (otherwise it would be hidden already).
2849         (WebCore::PluginViewWin::attachToWindow): Added. Shows the plug-in if this view
2850         is visible.
2851         (WebCore::PluginViewWin::detachFromWindow): Added. Hides the plug-in if this view
2852         is visible (otherwise it would be hidden already).
2853         (WebCore::PluginViewWin::PluginViewWin):
2854         * plugins/win/PluginViewWin.h: Added m_attachedToWindow member.
2855
2856 2007-12-04  Alp Toker  <alp@atoker.com>
2857
2858         Potential GTK+ build fix for the glib-genmarshal issue.
2859
2860         Split the glib-genmarshal qmake generator in two; one for the source
2861         file, another for the header.
2862
2863         * WebCore.pro:
2864
2865 2007-12-04  Alp Toker  <alp@atoker.com>
2866
2867         GTK+ build fix.
2868
2869         * platform/PlugInInfoStore.h:
2870
2871 2007-12-04  Kevin Decker  <kdecker@apple.com>
2872
2873         Reviewed by Anders.
2874
2875         <rdar://problem/5629125> PluginInfoStore needs the ability to return the name of a plug-in for a given MIME type
2876
2877         * page/mac/WebCoreViewFactory.h: Added pluginNameForMIMEType: method.
2878         * platform/PlugInInfoStore.h:
2879         * platform/gtk/TemporaryLinkStubs.cpp: Added stub version of pluginNameForMIMEType.
2880         (PlugInInfoStore::pluginNameForMIMEType):
2881         * platform/mac/PlugInInfoStoreMac.mm:
2882         (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added.
2883         * platform/qt/PlugInInfoStoreQt.cpp: 
2884         (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added stub version of pluginNameForMIMEType.
2885         * plugins/win/PlugInInfoStoreWin.cpp: 
2886         (WebCore::PlugInInfoStore::pluginNameForMIMEType): Added stub version of pluginNameForMIMEType.
2887
2888 2007-12-04  Adele Peterson  <adele@apple.com>
2889
2890         Reviewed by Darin.
2891
2892         Fix for <rdar://problem/5499918> REGRESSION: insertion point in input field with custom border cuts holes in focus ring interior edges
2893
2894         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setStyle):
2895         Adjust outline-offset so it doesn't extend beyond the border to interfere with typing
2896
2897 2007-12-04  Anders Carlsson  <andersca@apple.com>
2898
2899         Reviewed by Jon.
2900
2901         Always call NPP_NewStream, NPP_DestroyStream and NPP_URLNotify for JavaScript
2902         result streams, even if the JavaScript expression threw an exception or returned undefined.
2903         This matches what Firefox does.
2904         
2905         * plugins/win/PluginStreamWin.cpp:
2906         (WebCore::PluginStreamWin::sendJavaScriptStream):
2907         Handle the result string being null, and set the correct NPReason if it is.
2908         
2909         * plugins/win/PluginViewWin.cpp:
2910         (WebCore::PluginViewWin::performRequest):
2911         Always send the JavaScript stream, regardless of the result could be converted to a string or not.
2912
2913 2007-12-04  Adele Peterson  <adele@apple.com>
2914
2915         Reviewed by Hyatt.
2916
2917         Fix for <rdar://problem/5622464> controls should show up for audio element
2918
2919         * css/html4.css: Added styles for audio controls.  This will need to be refined, since we may want a different look for audio controls.
2920         * html/HTMLMediaElement.cpp:
2921         (WebCore::HTMLMediaElement::attributeChanged): When the controls attribute changes detach and reattach if necessary. 
2922         (WebCore::HTMLMediaElement::rendererIsNeeded): Added.
2923         (WebCore::HTMLMediaElement::createRenderer): Added.  Uses RenderMedia.
2924         * html/HTMLMediaElement.h:
2925         * rendering/RenderMedia.cpp: (WebCore::RenderMedia::RenderMedia): Added constructor that doesn't take intrinsic size.
2926         * rendering/RenderMedia.h:
2927
2928 2007-12-04  Anders Carlsson  <andersca@apple.com>
2929
2930         Reviewed by Sam.
2931
2932         Add isSafeScript(const JSGlobalObject*) so we won't get the JSGlobalObject
2933         implementation, which always returns true(!).
2934         
2935         * bindings/js/kjs_window.cpp:
2936         (KJS::Window::isSafeScript):
2937         Make the static isSafeScript method take two JSGlobalObjects.
2938         
2939         * bindings/js/kjs_window.h:
2940         (KJS::Window::isSafeScript):
2941         Implement isSafeScript and have it call the static method.
2942
2943 2007-11-27  Adam Roben  <aroben@apple.com>
2944
2945         Make the implementation of Frame::setNeedsReapplyStyles cross-platform
2946
2947         Reviewed by Hyatt.
2948
2949         No change in functionality.
2950
2951         * page/Frame.cpp:
2952         (WebCore::Frame::setNeedsReapplyStyles): Added. Invalidates the
2953         FrameView so that FrameView::layout will be called, which ends up
2954         calling reapplyStyles.
2955         (WebCore::Frame::needsReapplyStyles): Added.
2956         (WebCore::Frame::reapplyStyles): Renamed from reparseConfiguration.
2957         (WebCore::FramePrivate::FramePrivate):
2958         * page/Frame.h:
2959         * page/FramePrivate.h: Added new boolean member.
2960         * page/FrameView.cpp:
2961         (WebCore::FrameView::layout): Call Frame::reapplyStyles if needed.
2962         (WebCore::FrameView::needsLayout): Say that we need layout if the
2963         Frame needs styles reapplied.
2964         * page/mac/WebCoreFrameBridge.h: Removed setNeedsReapplyStyles.
2965         * page/mac/WebCoreFrameBridge.mm:
2966         (-[WebCoreFrameBridge reapplyStylesForDeviceType:]): Updated for
2967         rename.
2968
2969         * bridge/win/FrameWin.cpp: Removed Frame::setNeedsReapplyStyles.
2970         * page/gtk/FrameGtk.cpp: Ditto.
2971         * page/mac/FrameMac.mm: Ditto.
2972         * page/qt/FrameQt.cpp: Ditto.
2973         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
2974
2975 2007-12-04  Antti Koivisto  <antti@apple.com>
2976
2977         Reviewed by Adele.
2978
2979         Pass intrinsic size to the base class.
2980
2981         * rendering/RenderMedia.cpp:
2982         (WebCore::RenderMedia::RenderMedia):
2983
2984 2007-12-04  Adele Peterson  <adele@apple.com>
2985
2986         Reviewed by Darin.
2987
2988         Fix for <rdar://problem/5578209> REGRESSION: Crash in WebCore::DeprecatedValueListImpl::Private::copyList when going back on zoomerang.com/survey
2989
2990         * loader/FrameLoader.cpp: (WebCore::FrameLoader::scheduleHistoryNavigation):
2991           When the new url is exactly the same as the old url, don't treat it like a fragment navigation, since its going to cause a reload.
2992
2993 2007-12-04  Darin Adler  <darin@apple.com>
2994
2995         Reviewed by Kevin Decker.
2996
2997         - added an assertion for a situation that leads to a Safari assertion:
2998           a commit that is not followed by a load completion
2999
3000         - removed some unneeded FrameLoader stuff -- maybe some day we'll get this
3001           class cut down to size
3002
3003         * loader/FrameLoader.cpp:
3004         (WebCore::FrameLoader::FrameLoader): Added boolean for assertion.
3005         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Added code to assert
3006         that we already sent a commit before sending a complete.
3007         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): Call
3008         client directly instead of indirecting through a function.
3009         (WebCore::FrameLoader::loadItem): Ditto.
3010         (WebCore::FrameLoader::goToItem): Ditto.
3011         (WebCore::FrameLoader::addHistoryForCurrentLocation): Get the private browsing
3012         state from Settings instead of FrameLoaderClient. Also call client directly
3013         instead of indirecting through a function.
3014         (WebCore::FrameLoader::updateHistoryForReload): Call client directly instead
3015         of indirecting through a function.
3016         (WebCore::FrameLoader::dispatchDidCommitLoad): Added code to assert
3017         that we did not yet send a commit and set the flag that will be used to check
3018         that we don't do this twice in a row without an intervening completion call.
3019
3020         * loader/FrameLoader.h: Added a boolean for the assertion. Removed six
3021         now-unneeded functions.
3022
3023         * loader/FrameLoaderClient.h: Removed now-unneeded privateBrowsingEnabled function.
3024
3025         * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willCacheResponse): Get
3026         the private browsing state from Settings instead of FrameLoaderClient.
3027
3028         * svg/graphics/SVGImageEmptyClients.h: Removed obsolete privateBrowsingEnabled.
3029
3030 2007-12-03  Antti Koivisto  <antti@apple.com>
3031
3032         Reviewed by Adele.
3033         
3034         Fix <rdar://problem/5624802> 
3035         Controller displays outside of <video> element when width and height aren't specified 
3036
3037         - Explicitly adjust size of the controls tree root.
3038         - Switch RenderMedia base class back to RenderReplaced. It is easier to manage the shadow tree
3039           by hand. This also allows better code sharing with other replaced element classes.
3040         - Move duplicated layout and painting code from subclasses up to RenderReplaced.
3041
3042         Test: media/video-controls-rendering.html
3043
3044         * rendering/RenderHTMLCanvas.cpp:
3045         (WebCore::RenderHTMLCanvas::paintReplaced):
3046         * rendering/RenderHTMLCanvas.h:
3047             Share code.
3048         * rendering/RenderImage.cpp:
3049         (WebCore::RenderImage::paintReplaced):
3050         (WebCore::RenderImage::minimumReplacedHeight):
3051         * rendering/RenderImage.h:
3052             Share code.
3053         * rendering/RenderMedia.cpp:
3054         (WebCore::RenderMediaControlShadowRoot::RenderMediaControlShadowRoot):
3055         (WebCore::RenderMediaControlShadowRoot::setParent):
3056             Add a subclass just to get through encapsulation to use setParent().
3057         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement):
3058             Move initialization to the constructor.
3059         (WebCore::RenderMedia::RenderMedia):
3060         (WebCore::RenderMedia::~RenderMedia):
3061         (WebCore::RenderMedia::layout):
3062             Resize and layout the controller root by hand.
3063         (WebCore::RenderMedia::firstChild):
3064         (WebCore::RenderMedia::lastChild):
3065         (WebCore::RenderMedia::removeChild):
3066             Support one child renderer for controls.
3067         (WebCore::RenderMedia::createControlsShadowRoot):
3068         * rendering/RenderMedia.h:
3069         (WebCore::RenderMedia::isMedia):
3070             Switch base class to RenderReplaced, delete the now unnecessary stuff.
3071         * rendering/RenderReplaced.cpp:
3072         (WebCore::RenderReplaced::layout):
3073         (WebCore::RenderReplaced::paint):
3074         * rendering/RenderReplaced.h:
3075         (WebCore::RenderReplaced::minimumReplacedHeight):
3076         (WebCore::RenderReplaced::paintReplaced):
3077             Share code.
3078         * rendering/RenderVideo.cpp:
3079         (WebCore::RenderVideo::videoSizeChanged):
3080             Simplify, just request relayout.
3081         (WebCore::RenderVideo::paintReplaced):
3082         (WebCore::RenderVideo::layout):
3083         * rendering/RenderVideo.h:
3084             Share code.
3085
3086 2007-12-04  Michael Natterer  <mitch@imendio.com>
3087
3088         Reviewed by Alp Toker.
3089
3090         * WebCore.pro: fix build of webkit-marshal by building the
3091         functions into a separate .cpp file instead of including them in
3092         the header. This way we can use the marshallers from more than one
3093         file without using bad hacks.
3094
3095         Add the generated sources directory to DEPENDPATH.
3096
3097 2007-12-04  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
3098
3099         Reviewed by Alp Toker.
3100
3101         http://bugs.webkit.org/show_bug.cgi?id=16145
3102         [gtk] Implement media support in GTK backend
3103
3104         This implements the media tags of HTML5 on the GTK+ port based on the 
3105         Mac port. Media tests pass although some tests required a small modifications: 
3106         As per the HTML5 spec, the loading of the clip should start only after 
3107         all script are done.  But in the case of the tests, the loading starts 
3108         before some callbacks get registered.  This has been discussed with 
3109         Antti Koivisto, and the tests should be updated.
3110
3111         There is only one known issue: one time in 10 tries, loading a buffered 
3112         clip will never end buffering.  The buffering will stall at 97% for no 
3113         apparent reasons.  Reloading the page usually works around the problem.
3114         On the GStreamer side, some codecs don't return correct values, therefore
3115         they make the tests fail.  For instance H.264 will make the video-end 
3116         test fail.  This should be fixed in GStreamer 0.10.15.
3117
3118         This version displays video in a pop up window.  A place holder is drawn
3119         on the page where the video should appear.
3120
3121         By default, it is turned off in WebCore.pro until GStreamer/X
3122         detection issues are sorted out.
3123
3124         * WebCore.pro:
3125         Disable video for now
3126         * platform/Logging.cpp:
3127         (WebCore::):
3128         * platform/Logging.h:
3129         Added a logging level for Media stuff
3130         * platform/graphics/Movie.cpp:
3131         * platform/graphics/gtk/MoviePrivateGStreamer.cpp: Added.
3132         (WebCore::moviePrivateErrorCallback):
3133         (WebCore::moviePrivateEOSCallback):
3134         (WebCore::moviePrivateStateCallback):
3135         (WebCore::moviePrivateBufferingCallback):
3136         (WebCore::moviePrivateWindowIDCallback):
3137         (WebCore::MoviePrivate::MoviePrivate):
3138         (WebCore::MoviePrivate::~MoviePrivate):
3139         (WebCore::MoviePrivate::load):
3140         (WebCore::MoviePrivate::play):
3141         (WebCore::MoviePrivate::pause):
3142         (WebCore::MoviePrivate::duration):
3143         (WebCore::MoviePrivate::currentTime):
3144         (WebCore::MoviePrivate::seek):
3145         (WebCore::MoviePrivate::setEndTime):
3146         (WebCore::MoviePrivate::addCuePoint):
3147         (WebCore::MoviePrivate::removeCuePoint):
3148         (WebCore::MoviePrivate::clearCuePoints):
3149         (WebCore::MoviePrivate::startCuePointTimerIfNeeded):
3150         (WebCore::MoviePrivate::cancelSeek):
3151         (WebCore::MoviePrivate::cuePointTimerFired):
3152         (WebCore::MoviePrivate::paused):
3153         (WebCore::MoviePrivate::seeking):
3154         (WebCore::MoviePrivate::naturalSize):
3155         (WebCore::MoviePrivate::hasVideo):
3156         (WebCore::MoviePrivate::setVolume):
3157         (WebCore::MoviePrivate::setMuted):
3158         (WebCore::MoviePrivate::setRate):
3159         (WebCore::MoviePrivate::dataRate):
3160         (WebCore::MoviePrivate::networkState):
3161         (WebCore::MoviePrivate::readyState):
3162         (WebCore::MoviePrivate::maxTimeBuffered):
3163         (WebCore::MoviePrivate::maxTimeSeekable):
3164         (WebCore::MoviePrivate::maxTimeLoaded):
3165         (WebCore::MoviePrivate::bytesLoaded):
3166         (WebCore::MoviePrivate::totalBytesKnown):
3167         (WebCore::MoviePrivate::totalBytes):
3168         (WebCore::MoviePrivate::cancelLoad):
3169         (WebCore::MoviePrivate::updateStates):
3170         (WebCore::MoviePrivate::loadStateChanged):
3171         (WebCore::MoviePrivate::rateChanged):
3172         (WebCore::MoviePrivate::sizeChanged):
3173         (WebCore::MoviePrivate::timeChanged):
3174         (WebCore::MoviePrivate::volumeChanged):
3175         (WebCore::MoviePrivate::didEnd):
3176         (WebCore::MoviePrivate::loadingFailed):
3177         (WebCore::MoviePrivate::setRect):
3178         (WebCore::MoviePrivate::setVisible):
3179         (WebCore::MoviePrivate::paint):
3180         (WebCore::MoviePrivate::getSupportedTypes):
3181         (WebCore::MoviePrivate::createGSTPlayBin):
3182         * platform/graphics/gtk/MoviePrivateGStreamer.h: Added.
3183
3184 2007-12-04  Holger Hans Peter Freyther <holger.freyther@trolltech.com>
3185
3186         Reviewed by Simon.
3187
3188         * Implement the InspectorClient for the Qt port
3189         * It does not support highlighting of nodes yet
3190         * Use QRC to open the internal page. The important thing is the
3191         '/' in the URL to make WebCore::Document::completeURL behave the
3192         way we want.
3193         * To make the InspectorClient work we will have to mark qrc as secure.
3194
3195         * WebCore.pro:
3196         * loader/FrameLoader.cpp:
3197         (WebCore::localSchemes):
3198         * page/inspector/WebKit.qrc: Added.
3199
3200 2007-12-04  Alp Toker  <alp@atoker.com>
3201
3202         Rubber stamped by Mark Rowe.
3203
3204         Remove two unused variables to silence warnings.
3205
3206         * html/CanvasRenderingContext2D.cpp:
3207         (WebCore::CanvasRenderingContext2D::fill):
3208         (WebCore::CanvasRenderingContext2D::stroke):
3209
3210 2007-12-03  Dan Bernstein  <mitz@apple.com>
3211
3212         Reviewed by Darin Adler.
3213
3214         - fix <rdar://problem/5134044> fast/frames/frame-src-attribute.html fails on Windows
3215
3216         * platform/win/ScrollViewWin.cpp:
3217         (WebCore::ScrollView::visibleWidth): Do not return negative values.
3218         (WebCore::ScrollView::visibleHeight): Ditto.
3219
3220 2007-12-03  Dan Bernstein  <mitz@apple.com>
3221
3222         Reviewed by Dave Hyatt.
3223
3224         - fix <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame
3225
3226         Test: fast/events/resize-subframe.html
3227
3228         * page/FrameView.cpp:
3229         (WebCore::FrameViewPrivate::FrameViewPrivate): Added a timer used when
3230         deferring tasks that need to be done after layout.
3231         (WebCore::FrameViewPrivate::reset):
3232         (WebCore::FrameView::~FrameView):
3233         (WebCore::FrameView::layout): Moved the updating of widget positions,
3234         loading plug-ins and sending events queued up during layout into
3235         performPostLayoutTasks(). performPostLayoutTasks() is called after
3236         layout unless the layout was triggered by a previous layout's post-
3237         layout tasks. In the latter case, performPostLayoutTasks() is scheduled
3238         to run later.
3239         (WebCore::FrameView::performPostLayoutTasks): Performs work that needs
3240         to be done after layout but which can result in arbitrary code
3241         execution and therefore may re-invalidate the layout. This includes
3242         updating widget positions, loading plug-ins, and dispatching layout-
3243         related DOM events (scroll, overflow and resize).
3244         (WebCore::FrameView::postLayoutTimerFired):
3245         (WebCore::FrameView::dispatchScheduledEvents):
3246         * page/FrameView.h:
3247         * page/mac/WebCoreFrameBridge.h:
3248         * page/mac/WebCoreFrameBridge.mm: Removed -sendResizeEvent since this
3249         is handled by FrameView now.
3250
3251 2007-12-03  Rob Buis  <buis@kde.org>
3252
3253         Reviewed by Darin.
3254
3255         http://bugs.webkit.org/show_bug.cgi?id=15767
3256         Text decorations do not respect "visibility" property
3257
3258         Only paint decorations if visibility is "visible".
3259
3260         * rendering/SVGInlineTextBox.cpp:
3261         (WebCore::SVGInlineTextBox::paintDecoration):
3262
3263 2007-12-03  Steve Falkenburg  <sfalken@apple.com>
3264
3265         Fix build.
3266
3267         * WebCore.vcproj/WebCore.vcproj:
3268
3269 2007-12-03  Nikolas Zimmermann  <zimmermann@kde.org>
3270
3271         Reviewed by David.
3272
3273         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15645
3274         Don't allow selectors to interfere with the SVG shadow tree (<use> internal non-exposed tree).
3275
3276         * css/CSSStyleSelector.cpp:
3277         (WebCore::CSSStyleSelector::checkSelector):
3278
3279 2007-12-03  Dan Bernstein  <mitz@apple.com>
3280
3281         Reviewed by Adam Roben.
3282
3283         - fix <rdar://problem/5538651> REGRESSSION: domfuzz: null deref in WebCore::Document::canReplaceChild
3284
3285         Test: fast/dom/Document/replaceChild-null-oldChild.html
3286
3287         * dom/Document.cpp:
3288         (WebCore::Document::canReplaceChild):
3289
3290 2007-12-03  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3291
3292         Reviewed by Simon.
3293
3294         * Avoid crashes by making sure everything is layouted before
3295         we start painting. This avoids a crash in Widget::invalidateRect
3296         because QPainter::begin would fail
3297         * The QWebFrame::layout() methods and calls are left untouched because
3298         this would be an API decision.
3299         
3300
3301         WARNING: NO TEST CASES ADDED OR CHANGED
3302
3303         * page/FrameView.cpp:
3304         (WebCore::FrameView::updateControlTints):
3305         * page/FrameView.h:
3306         * platform/ScrollView.h:
3307         * platform/qt/ScrollViewQt.cpp:
3308         (WebCore::ScrollView::children):
3309
3310 2007-12-03  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3311
3312         Reviewed by Simon.
3313
3314         * Implement GraphicsContext::fillRoundedRect similiar to the
3315         CoreGraphics implementation only addPath is not called this
3316         seems to be only needed for CoreGraphics.
3317         
3318
3319         WARNING: NO TEST CASES ADDED OR CHANGED
3320
3321         * platform/graphics/qt/GraphicsContextQt.cpp:
3322         (WebCore::GraphicsContext::fillRoundedRect):
3323
3324 2007-12-03  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3325
3326         Reviewed by Simon.
3327
3328         * Coding Style fixes
3329         
3330
3331         WARNING: NO TEST CASES ADDED OR CHANGED
3332
3333         * platform/qt/ScrollViewQt.cpp:
3334         (WebCore::ScrollView::addChild):
3335         (WebCore::ScrollView::removeChild):
3336
3337 2007-12-03  Alp Toker  <alp@atoker.com>
3338
3339         Reviewed by Mark Rowe.
3340
3341         Don't delete the decoder if it's already been created. The one we have
3342         is fine.
3343
3344         Cairo image cleanups. Nothing substantial.
3345
3346         Notify ImageObservers where appropriate.
3347
3348         * platform/graphics/cairo/ImageCairo.cpp:
3349         (WebCore::BitmapImage::draw):
3350         (WebCore::Image::drawPattern):
3351         * platform/graphics/cairo/ImageSourceCairo.cpp:
3352         (WebCore::ImageSource::setData):
3353         * platform/graphics/gtk/ImageGtk.cpp:
3354
3355 2007-12-03  Simon Hausmann  <hausmann@webkit.org>
3356
3357         Reviewed by Lars.
3358
3359         Fixed crash when rendering form elements with Qt 4.4
3360
3361         QPainter::device() is not guaranteed to return a QWidget, so do the safe "cast" with the
3362         help of QPaintDevice::devType().
3363         Also fall back to the QApplication::style() if we don't have a widget.
3364
3365         * platform/qt/RenderThemeQt.cpp:
3366         (WebCore::RenderThemeQt::paintButton):
3367         (WebCore::RenderThemeQt::paintTextField):
3368         (WebCore::RenderThemeQt::paintMenuList):
3369         (WebCore::RenderThemeQt::getStylePainterAndWidgetFromPaintInfo):
3370
3371 2007-12-02  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3372
3373         Reviewed by Sam Weinig.
3374
3375         * Add FrameLoader::shouldTreatSchemeAsLocal which is similar to
3376         shouldTreatURLAsLocal.
3377         * Make use of FrameLoader::shouldTreatSchemeAsLocal in SecurityOrigin
3378         and do not hardcode "file". This is needed for the WebKit/qt port to make
3379         the Web Inspector work as it using the qrc protocol instead of file.
3380
3381
3382         * loader/FrameLoader.cpp:
3383         (WebCore::FrameLoader::shouldTreatSchemeAsLocal):
3384         * loader/FrameLoader.h:
3385         * platform/SecurityOrigin.cpp:
3386         (WebCore::SecurityOrigin::isSecureTransitionTo):
3387
3388 2007-12-02  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3389
3390         Rubber stamped by Sam Weinig.
3391
3392         Only add applewebdata to the localSchemes when building for the
3393         mac. This is in preparation of adding qrc for the Qt port there
3394         as well and http://bugs.webkit.org/show_bug.cgi?id=15938.
3395
3396         According to Anders applewebdata is not used on the win port.
3397
3398         * loader/FrameLoader.cpp:
3399         (WebCore::localSchemes):
3400
3401 2007-12-02  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3402
3403         Rubber stamped by Sam Weinig.
3404
3405         Fix a typo. It is contains and not containts
3406
3407         * loader/FrameLoader.cpp:
3408
3409 2007-12-03  Alp Toker  <alp@atoker.com>
3410
3411         Add another missing DEPENDPATH.
3412
3413         Noticed when fixing the build.
3414
3415         * WebCore.pro:
3416
3417 2007-12-03  Adam Roben  <aroben@apple.com>
3418
3419         Speculative Windows build fix
3420
3421         * plugins/win/PluginViewWin.cpp:
3422         (WebCore::getString):
3423
3424 2007-12-03  Geoffrey Garen  <ggaren@apple.com>
3425
3426         Build fix: added symbols to the right .exp file.
3427
3428         * WebCore.base.exp:
3429
3430 2007-12-02  Geoffrey Garen  <ggaren@apple.com>
3431
3432         Reviewed by Eric Seidel.
3433
3434         Updated to match the JavaScriptCore change to move virtual methods from
3435         Interpreter to JSGlobalObject.
3436         
3437         Moved virtual ScriptInterpreter functions to Window.
3438
3439 2007-12-02  Darin Adler  <darin@apple.com>
3440
3441         Reviewed by Mitz.
3442
3443         - fix <rdar://problem/5601995> Hang/crash on http://ebay-uk.custhelp.com/
3444
3445         There were two problems here:
3446
3447             1) Incorrect HTMLCollection behavior led to us trying to insert a
3448                new row inside an existing row instead of next to it. The fix for
3449                this is to make HTMLCollection work better for table-related
3450                collections.
3451
3452             2) HTMLTableRowElement::insertCell would return a bad pointer if
3453                the insertion failed. The code should have failed, but not crashed,
3454                so it's worth fixing that too.
3455
3456         While fixing the HTMLCollection issues, I did some clean-up of that
3457         class and its derived classes.
3458
3459         Test: fast/dom/HTMLTableElement/rows.html
3460         Test: fast/dom/HTMLTableElement/tBodies.html
3461         Test: fast/dom/HTMLTableRowElement/cells.html
3462         Test: fast/dom/HTMLTableRowElement/insertCell.html
3463         Test: fast/dom/HTMLTableSectionElement/rows.html
3464
3465         * bindings/js/JSHTMLCollectionCustom.cpp:
3466         (WebCore::toJS): Updated because collectionType() was renamed to type().
3467
3468         * html/HTMLCollection.cpp:
3469         (WebCore::HTMLCollection::HTMLCollection): Updated for data member name
3470         changes. Also added a protected constructor for use by derived classes
3471         that pass in a CollectionInfo.
3472         (WebCore::HTMLCollection::CollectionInfo::copyCacheMap): Moved out of
3473         the header.
3474         (WebCore::isTableSection): Added.
3475         (WebCore::HTMLCollection::itemAfter): Renamed from traverseNextItem,
3476         because the old name was grammatically incorrect and thus a bit confusing.
3477         Changed to operate on Element* instead of Node*, and use 0 to start
3478         rather than passing in the base node (required since the base node can be
3479         a document, which is not an element). Generalized the code that made
3480         NodeChildren not descend into deeper descendants so it can be used for
3481         TRCells, TSectionRows, TableTBodies, and TableRows. Reformatted the
3482         switch statement and got rid of the "found" boolean since we can just
3483         return when we find something. Got rid of the default case, and instead
3484         listed all the enum values. Also changed to use a for loop for clarity.
3485         (WebCore::HTMLCollection::calcLength): Updated for itemAfter changes.
3486         (WebCore::HTMLCollection::item): Ditto.
3487         (WebCore::HTMLCollection::nextItem): Ditto.
3488         (WebCore::HTMLCollection::checkForNameMatch): Updated to take an Element
3489         instead of a Node pointer.
3490         (WebCore::HTMLCollection::namedItem): More of the same.
3491         (WebCore::HTMLCollection::updateNameCache): Ditto.
3492         (WebCore::HTMLCollection::namedItems): Ditto.
3493         (WebCore::HTMLCollection::nextNamedItem): Ditto.
3494         (WebCore::HTMLCollection::tags): Ditto.
3495
3496         * html/HTMLCollection.h: Added a type FormElements, so that the
3497         HTMLFormCollection would not have a type of DocImages, which is what
3498         it previously did. Changed the base parameter to be a PassRefPtr to
3499         make it clear we take ownership of it. Added a comment explaining
3500         why we should change the name CollectionInfo. Made a lot more members
3501         private instead of protected. Renamed traverseNextItem to itemAfter.
3502         Changed most functions to take Element* instead of Node*.
3503
3504         * html/HTMLFormCollection.cpp:
3505         (WebCore::HTMLFormCollection::formCollectionInfo): Added.
3506         (WebCore::HTMLFormCollection::HTMLFormCollection): Updated to pass
3507         collection info into the base class.
3508         (WebCore::HTMLFormCollection::calcLength): Updated to use base() so we
3509         don't need to get at m_base directly.
3510         (WebCore::HTMLFormCollection::item): Same, but for info().
3511         (WebCore::HTMLFormCollection::getNamedItem): Removed unused first
3512         argument.
3513         (WebCore::HTMLFormCollection::getNamedFormItem): Got rid of unneeded
3514         checks that the base is still an element and still a form, since that's
3515         guaranteed.
3516         (WebCore::HTMLFormCollection::nextItem): Use info().
3517         (WebCore::HTMLFormCollection::nextNamedItemInternal): Node instead of
3518         Element, some name changes.
3519         (WebCore::HTMLFormCollection::namedItem): Update for changes elsewhere.
3520         (WebCore::HTMLFormCollection::nextNamedItem): Ditto, also rewrote loop
3521         to be much simpler.
3522         (WebCore::HTMLFormCollection::updateNameCache): More of the same.
3523
3524         * html/HTMLFormCollection.h: Changed constructor to take an
3525         HTMLFormElement, using a PassRefPtr to communicate transfer of
3526         ownership. Made everything private instead of protected. Removed
3527         unneeded override of firstItem. Made getNamedItem and
3528         nextNamedItemInternal non-virtual. Removed unused first argument of
3529         getNamedItem. Added declaration of formCollectionInfo.
3530
3531         * html/HTMLNameCollection.cpp:
3532         (WebCore::HTMLNameCollection::HTMLNameCollection): Updated to pass
3533         collection info into the base class.
3534         (WebCore::HTMLNameCollection::itemAfter): Reformatted a bit and
3535         changed into a for loop.
3536
3537         * html/HTMLNameCollection.h: Updated for name changes. Made function
3538         private instead of public. Used PassRefPtr in constructor.
3539
3540         * html/HTMLOptionsCollection.cpp:
3541         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): Updated to
3542         pass collection info into the base class.
3543         (WebCore::HTMLOptionsCollection::add): Updated for public/private
3544         changes in the base class.
3545         (WebCore::HTMLOptionsCollection::selectedIndex): Ditto.
3546         (WebCore::HTMLOptionsCollection::setSelectedIndex): Ditto.
3547         (WebCore::HTMLOptionsCollection::setLength): Ditto.
3548
3549         * html/HTMLOptionsCollection.h: Changed constructor parameter to be a
3550         PassRefPtr.
3551
3552         * html/HTMLTableRowElement.cpp:
3553         (WebCore::HTMLTableRowElement::insertCell): Changed code to use RefPtr
3554         and PassRefPtr since this creates a new object. This alone fixed the
3555         crash. Also cleaned up logic a bit to be more readable.
3556
3557         * html/HTMLTableRowElement.h: Changed insertCell to return a PassRefPtr.
3558         Also reordered functions a bit to make things a little more logical and
3559         removed the unused ncols data member.
3560
3561         * html/HTMLTableSectionElement.cpp:
3562         (WebCore::HTMLTableSectionElement::rows): Pass TSectionRows, not
3563         TableRows. This mistake was harmless before because TableRows and
3564         TSectionRows were handled identically inside HTMLCollection, but that is
3565         no longer the case with this fix.
3566
3567         * bindings/scripts/CodeGeneratorJS.pm: Add an include to cope with the
3568         fact that HTMLOptionsCollection no longer includes HTMLOptionElement.
3569         I don't think this really should be a special case -- might be worth
3570         returning later to see if this can be optimized.
3571
3572 2007-12-02  Nikolas Zimmermann  <zimmermann@kde.org>
3573
3574         Reviewed by Adam.
3575
3576         RenderSVGViewportContainer sets wrong width/height.
3577         Share code with RenderSVGContainer in a central calcBounds() function.
3578
3579         Fixes:
3580         - svg/custom/use-css-events.svg (http://bugs.webkit.org/show_bug.cgi?id=15403)
3581         - svg/custom/deep-dynamic-updates.svg
3582         - svg/custom/use-clipped-hit.svg
3583         - svg/custom/image-clipped-hit.svg
3584
3585         * rendering/RenderSVGContainer.cpp:
3586         (WebCore::RenderSVGContainer::layout):
3587         (WebCore::RenderSVGContainer::calcBounds):
3588         * rendering/RenderSVGContainer.h:
3589         * rendering/RenderSVGViewportContainer.cpp:
3590         (WebCore::RenderSVGViewportContainer::layout):
3591
3592 2007-12-02  Brady Eidson <beidson@apple.com>
3593
3594         Reviewed by Darin
3595
3596         databaseChanged notifications were being sent out on the database thread - they need to be on the main thread
3597         like all other notifications we send out!
3598
3599         * platform/SecurityOriginData.cpp:
3600         (WebCore::SecurityOriginData::copy): Add a deep copy method, for when an object thread hops
3601         * platform/SecurityOriginData.h:
3602
3603         * storage/DatabaseTracker.cpp:
3604         (WebCore::notificationMutex):
3605         (WebCore::notificationQueue):
3606         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged): Add the origin/name pair to a queue
3607         (WebCore::DatabaseTracker::scheduleForNotification): Schedule to deliver this queue of notifications
3608           on the main thread
3609         (WebCore::DatabaseTracker::notifyDatabasesChanged): Deliver all notifications in the queue
3610         * storage/DatabaseTracker.h:
3611
3612         * storage/SQLTransaction.cpp:
3613         (WebCore::SQLTransaction::postflightAndCommit): scheduleNotifyDatabaseChanged() instead of "notify now!"
3614         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): Ditto
3615
3616 2007-12-02  Rob Buis  <buis@kde.org>
3617
3618         Reviewed by Darin.
3619
3620         http://bugs.webkit.org/show_bug.cgi?id=16002
3621         Load SVG (and other) UA StyleSheets dynamically when needed
3622
3623         Load svg sheet when needed.
3624
3625         * css/CSSStyleSelector.cpp:
3626         (WebCore::screenEval):
3627         (WebCore::printEval):
3628         (WebCore::CSSStyleSelector::CSSStyleSelector):
3629         (WebCore::CSSStyleSelector::loadDefaultStyle):
3630         (WebCore::CSSStyleSelector::styleForElement):
3631         (WebCore::CSSRuleSet::addRulesFromSheet):
3632
3633 2007-12-02  Mark Rowe  <mrowe@apple.com>
3634
3635         Try and fix the Windows build.
3636
3637         * plugins/win/PluginViewWin.cpp:
3638         (WebCore::PluginViewWin::bindingInstance):
3639
3640 2007-12-02  Nikolas Zimmermann  <zimmermann@kde.org>
3641
3642         Rubber stamped by Eric.
3643
3644         Move platform/graphics/svg to graphics/svg as discussed on webkit-dev.
3645         Updated all project files.
3646
3647         * WebCore.pro:
3648         * WebCore.vcproj/WebCore.vcproj:
3649         * WebCore.xcodeproj/project.pbxproj:
3650         * platform/graphics/svg: Removed.
3651         * platform/graphics/svg/SVGImage.cpp: Removed.
3652         * platform/graphics/svg/SVGImage.h: Removed.
3653         * platform/graphics/svg/SVGImageEmptyClients.h: Removed.
3654         * platform/graphics/svg/SVGPaintServer.cpp: Removed.
3655         * platform/graphics/svg/SVGPaintServer.h: Removed.
3656         * platform/graphics/svg/SVGPaintServerGradient.cpp: Removed.
3657         * platform/graphics/svg/SVGPaintServerGradient.h: Removed.
3658         * platform/graphics/svg/SVGPaintServerLinearGradient.cpp: Removed.
3659         * platform/graphics/svg/SVGPaintServerLinearGradient.h: Removed.
3660         * platform/graphics/svg/SVGPaintServerPattern.cpp: Removed.
3661         * platform/graphics/svg/SVGPaintServerPattern.h: Removed.
3662         * platform/graphics/svg/SVGPaintServerRadialGradient.cpp: Removed.
3663         * platform/graphics/svg/SVGPaintServerRadialGradient.h: Removed.
3664         * platform/graphics/svg/SVGPaintServerSolid.cpp: Removed.
3665         * platform/graphics/svg/SVGPaintServerSolid.h: Removed.
3666         * platform/graphics/svg/SVGResource.cpp: Removed.
3667         * platform/graphics/svg/SVGResource.h: Removed.
3668         * platform/graphics/svg/SVGResourceClipper.cpp: Removed.
3669         * platform/graphics/svg/SVGResourceClipper.h: Removed.
3670         * platform/graphics/svg/SVGResourceFilter.cpp: Removed.
3671         * platform/graphics/svg/SVGResourceFilter.h: Removed.
3672         * platform/graphics/svg/SVGResourceListener.h: Removed.
3673         * platform/graphics/svg/SVGResourceMarker.cpp: Removed.
3674         * platform/graphics/svg/SVGResourceMarker.h: Removed.
3675         * platform/graphics/svg/SVGResourceMasker.cpp: Removed.
3676         * platform/graphics/svg/SVGResourceMasker.h: Removed.
3677         * platform/graphics/svg/cairo: Removed.
3678         * platform/graphics/svg/cairo/RenderPathCairo.cpp: Removed.
3679         * platform/graphics/svg/cairo/SVGPaintServerCairo.cpp: Removed.
3680         * platform/graphics/svg/cairo/SVGPaintServerGradientCairo.cpp: Removed.
3681         * platform/graphics/svg/cairo/SVGPaintServerPatternCairo.cpp: Removed.
3682         * platform/graphics/svg/cairo/SVGPaintServerSolidCairo.cpp: Removed.
3683         * platform/graphics/svg/cairo/SVGResourceClipperCairo.cpp: Removed.
3684         * platform/graphics/svg/cairo/SVGResourceMaskerCairo.cpp: Removed.
3685         * platform/graphics/svg/cg: Removed.
3686         * platform/graphics/svg/cg/CgSupport.cpp: Removed.
3687         * platform/graphics/svg/cg/CgSupport.h: Removed.
3688         * platform/graphics/svg/cg/RenderPathCg.cpp: Removed.
3689         * platform/graphics/svg/cg/SVGPaintServerCg.cpp: Removed.
3690         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp: Removed.
3691         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp: Removed.
3692         * platform/graphics/svg/cg/SVGPaintServerSolidCg.cpp: Removed.
3693         * platform/graphics/svg/cg/SVGResourceClipperCg.cpp: Removed.
3694         * platform/graphics/svg/cg/SVGResourceFilterCg.cpp: Removed.
3695         * platform/graphics/svg/cg/SVGResourceFilterCg.mm: Removed.
3696         * platform/graphics/svg/cg/SVGResourceMaskerCg.cpp: Removed.
3697         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm: Removed.
3698         * platform/graphics/svg/filters: Removed.
3699         * platform/graphics/svg/filters/SVGDistantLightSource.h: Removed.
3700         * platform/graphics/svg/filters/SVGFEBlend.cpp: Removed.
3701         * platform/graphics/svg/filters/SVGFEBlend.h: Removed.
3702         * platform/graphics/svg/filters/SVGFEColorMatrix.cpp: Removed.
3703         * platform/graphics/svg/filters/SVGFEColorMatrix.h: Removed.
3704         * platform/graphics/svg/filters/SVGFEComponentTransfer.cpp: Removed.
3705         * platform/graphics/svg/filters/SVGFEComponentTransfer.h: Removed.
3706         * platform/graphics/svg/filters/SVGFEComposite.cpp: Removed.
3707         * platform/graphics/svg/filters/SVGFEComposite.h: Removed.
3708         * platform/graphics/svg/filters/SVGFEConvolveMatrix.cpp: Removed.
3709         * platform/graphics/svg/filters/SVGFEConvolveMatrix.h: Removed.
3710         * platform/graphics/svg/filters/SVGFEDiffuseLighting.cpp: Removed.
3711         * platform/graphics/svg/filters/SVGFEDiffuseLighting.h: Removed.
3712         * platform/graphics/svg/filters/SVGFEDisplacementMap.cpp: Removed.
3713         * platform/graphics/svg/filters/SVGFEDisplacementMap.h: Removed.
3714         * platform/graphics/svg/filters/SVGFEFlood.cpp: Removed.
3715         * platform/graphics/svg/filters/SVGFEFlood.h: Removed.
3716         * platform/graphics/svg/filters/SVGFEGaussianBlur.cpp: Removed.
3717         * platform/graphics/svg/filters/SVGFEGaussianBlur.h: Removed.
3718         * platform/graphics/svg/filters/SVGFEImage.cpp: Removed.
3719         * platform/graphics/svg/filters/SVGFEImage.h: Removed.
3720         * platform/graphics/svg/filters/SVGFEMerge.cpp: Removed.
3721         * platform/graphics/svg/filters/SVGFEMerge.h: Removed.
3722         * platform/graphics/svg/filters/SVGFEMorphology.cpp: Removed.
3723         * platform/graphics/svg/filters/SVGFEMorphology.h: Removed.
3724         * platform/graphics/svg/filters/SVGFEOffset.cpp: Removed.
3725         * platform/graphics/svg/filters/SVGFEOffset.h: Removed.
3726         * platform/graphics/svg/filters/SVGFESpecularLighting.cpp: Removed.
3727         * platform/graphics/svg/filters/SVGFESpecularLighting.h: Removed.
3728         * platform/graphics/svg/filters/SVGFETile.h: Removed.
3729         * platform/graphics/svg/filters/SVGFETurbulence.cpp: Removed.
3730         * platform/graphics/svg/filters/SVGFETurbulence.h: Removed.
3731         * platform/graphics/svg/filters/SVGFilterEffect.cpp: Removed.
3732         * platform/graphics/svg/filters/SVGFilterEffect.h: Removed.
3733         * platform/graphics/svg/filters/SVGLightSource.cpp: Removed.
3734         * platform/graphics/svg/filters/SVGLightSource.h: Removed.
3735         * platform/graphics/svg/filters/SVGPointLightSource.h: Removed.
3736         * platform/graphics/svg/filters/SVGSpotLightSource.h: Removed.
3737         * platform/graphics/svg/filters/cg: Removed.
3738         * platform/graphics/svg/filters/cg/SVGFEBlendCg.mm: Removed.
3739         * platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm: Removed.
3740         * platform/graphics/svg/filters/cg/SVGFEComponentTransferCg.mm: Removed.
3741         * platform/graphics/svg/filters/cg/SVGFECompositeCg.mm: Removed.
3742         * platform/graphics/svg/filters/cg/SVGFEDiffuseLightingCg.mm: Removed.
3743         * platform/graphics/svg/filters/cg/SVGFEDisplacementMapCg.mm: Removed.
3744         * platform/graphics/svg/filters/cg/SVGFEFloodCg.mm: Removed.
3745         * platform/graphics/svg/filters/cg/SVGFEGaussianBlurCg.mm: Removed.
3746         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h: Removed.
3747         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.mm: Removed.
3748         * platform/graphics/svg/filters/cg/SVGFEImageCg.mm: Removed.
3749         * platform/graphics/svg/filters/cg/SVGFEMergeCg.mm: Removed.
3750         * platform/graphics/svg/filters/cg/SVGFEOffsetCg.mm: Removed.
3751         * platform/graphics/svg/filters/cg/SVGFESpecularLightingCg.mm: Removed.
3752         * platform/graphics/svg/filters/cg/SVGFETileCg.mm: Removed.
3753         * platform/graphics/svg/filters/cg/SVGFilterEffectCg.mm: Removed.
3754         * platform/graphics/svg/filters/cg/WKArithmeticFilter.cikernel: Removed.
3755         * platform/graphics/svg/filters/cg/WKArithmeticFilter.h: Removed.
3756         * platform/graphics/svg/filters/cg/WKArithmeticFilter.m: Removed.
3757         * platform/graphics/svg/filters/cg/WKComponentMergeFilter.cikernel: Removed.
3758         * platform/graphics/svg/filters/cg/WKComponentMergeFilter.h: Removed.
3759         * platform/graphics/svg/filters/cg/WKComponentMergeFilter.m: Removed.
3760         * platform/graphics/svg/filters/cg/WKDiffuseLightingFilter.cikernel: Removed.
3761         * platform/graphics/svg/filters/cg/WKDiffuseLightingFilter.h: Removed.
3762         * platform/graphics/svg/filters/cg/WKDiffuseLightingFilter.m: Removed.
3763         * platform/graphics/svg/filters/cg/WKDiscreteTransferFilter.cikernel: Removed.
3764         * platform/graphics/svg/filters/cg/WKDiscreteTransferFilter.h: Removed.
3765         * platform/graphics/svg/filters/cg/WKDiscreteTransferFilter.m: Removed.
3766         * platform/graphics/svg/filters/cg/WKDisplacementMapFilter.cikernel: Removed.
3767         * platform/graphics/svg/filters/cg/WKDisplacementMapFilter.h: Removed.
3768         * platform/graphics/svg/filters/cg/WKDisplacementMapFilter.m: Removed.
3769         * platform/graphics/svg/filters/cg/WKDistantLightFilter.cikernel: Removed.
3770         * platform/graphics/svg/filters/cg/WKDistantLightFilter.h: Removed.
3771         * platform/graphics/svg/filters/cg/WKDistantLightFilter.m: Removed.
3772         * platform/graphics/svg/filters/cg/WKGammaTransferFilter.cikernel: Removed.
3773         * platform/graphics/svg/filters/cg/WKGammaTransferFilter.h: Removed.
3774         * platform/graphics/svg/filters/cg/WKGammaTransferFilter.m: Removed.
3775         * platform/graphics/svg/filters/cg/WKIdentityTransferFilter.h: Removed.
3776         * platform/graphics/svg/filters/cg/WKIdentityTransferFilter.m: Removed.
3777         * platform/graphics/svg/filters/cg/WKLinearTransferFilter.cikernel: Removed.
3778         * platform/graphics/svg/filters/cg/WKLinearTransferFilter.h: Removed.
3779         * platform/graphics/svg/filters/cg/WKLinearTransferFilter.m: Removed.
3780         * platform/graphics/svg/filters/cg/WKNormalMapFilter.cikernel: Removed.
3781         * platform/graphics/svg/filters/cg/WKNormalMapFilter.h: Removed.
3782         * platform/graphics/svg/filters/cg/WKNormalMapFilter.m: Removed.
3783         * platform/graphics/svg/filters/cg/WKPointLightFilter.cikernel: Removed.
3784         * platform/graphics/svg/filters/cg/WKPointLightFilter.h: Removed.
3785         * platform/graphics/svg/filters/cg/WKPointLightFilter.m: Removed.
3786         * platform/graphics/svg/filters/cg/WKSpecularLightingFilter.cikernel: Removed.
3787         * platform/graphics/svg/filters/cg/WKSpecularLightingFilter.h: Removed.
3788         * platform/graphics/svg/filters/cg/WKSpecularLightingFilter.m: Removed.
3789         * platform/graphics/svg/filters/cg/WKSpotLightFilter.cikernel: Removed.
3790         * platform/graphics/svg/filters/cg/WKSpotLightFilter.h: Removed.
3791         * platform/graphics/svg/filters/cg/WKSpotLightFilter.m: Removed.
3792         * platform/graphics/svg/filters/cg/WKTableTransferFilter.cikernel: Removed.
3793         * platform/graphics/svg/filters/cg/WKTableTransferFilter.h: Removed.
3794         * platform/graphics/svg/filters/cg/WKTableTransferFilter.m: Removed.
3795         * platform/graphics/svg/mac: Removed.
3796         * platform/graphics/svg/mac/SVGResourceFilterPlatformDataMac.h: Removed.
3797         * platform/graphics/svg/mac/SVGResourceFilterPlatformDataMac.mm: Removed.
3798         * platform/graphics/svg/qt: Removed.
3799         * platform/graphics/svg/qt/RenderPathQt.cpp: Removed.
3800         * platform/graphics/svg/qt/SVGPaintServerGradientQt.cpp: Removed.
3801         * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp: Removed.
3802         * platform/graphics/svg/qt/SVGPaintServerPatternQt.cpp: Removed.
3803         * platform/graphics/svg/qt/SVGPaintServerQt.cpp: Removed.
3804         * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp: Removed.
3805         * platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp: Removed.
3806         * platform/graphics/svg/qt/SVGResourceClipperQt.cpp: Removed.
3807         * platform/graphics/svg/qt/SVGResourceFilterQt.cpp: Removed.
3808         * platform/graphics/svg/qt/SVGResourceMaskerQt.cpp: Removed.
3809         * svg/graphics: Copied from platform/graphics/svg.
3810
3811 2007-12-02  Nikolas Zimmermann  <zimmermann@kde.org>
3812
3813         Reviewed by Maciej.
3814
3815         Fix IDL lookup in subdirectories. Missing 'my' prefix for the 'thisDir' variable.
3816         When entering subdirectories the 'thisDir' variable got altered - see snippet:
3817
3818         THISDIR: WebCore/page FOUND FILE: FrameView.h (endCondition: 0)
3819         ..
3820         -> ENTER: WebCore/page/gtk (THIS DIR: WebCore/page)
3821         ...
3822         <- LEAVE: WebCore/page/gtk (THIS DIR: WebCore/page/gtk)
3823         THISDIR: WebCore/page/gtk FOUND FILE: History.cpp (endCondition: 0)
3824
3825         'History.cpp' is located in WebCore/page not WebCore/page/gtk.
3826
3827         * bindings/scripts/CodeGenerator.pm:
3828
3829 2007-12-01  Alp Toker  <alp@atoker.com>
3830
3831         Reviewed by Adam Roben.
3832
3833         Add the newly introduced webkit.h convenience header.
3834
3835         * WebCore.pro:
3836
3837 2007-12-01  Antti Koivisto  <antti@apple.com>
3838
3839         Reviewed by Adam.
3840         
3841         - Fix crash when removing a loading media element from the tree.
3842         - Follow the spec by invoking pause() when element is removed from the tree instead of unloading.
3843
3844         Tests: http/tests/media/remove-while-loading.html
3845                media/remove-from-document.html
3846
3847         * html/HTMLMediaElement.cpp:
3848         (WebCore::HTMLMediaElement::removedFromDocument):
3849
3850 2007-12-01  Geoffrey Garen  <ggaren@apple.com>
3851
3852         Reviewed by Beth Dakin.
3853
3854         Restored the test string in this test.
3855
3856         * manual-tests/window-open-features-parsing.html:
3857
3858 2007-11-30  Geoffrey Garen  <ggaren@apple.com>
3859
3860         Reviewed by Beth Dakin.
3861         
3862         Modified WebCore to follow the new JSGlobalObject/Interpreter ownership
3863         rules in JavaScriptCore.
3864
3865         * bindings/js/kjs_binding.cpp:
3866         * bindings/js/kjs_binding.h: Removed stale, unused 
3867         interpreterForGlobalObject().
3868
3869         * bindings/js/kjs_proxy.cpp: Changed to store a global object, rather
3870         than an interpreter.
3871         (WebCore::KJSProxy::finishedWithEvent): Need to NULL check 
3872         m_globalObject here because we no longer unnecessarily instantiate it.
3873
3874         * bindings/js/kjs_window.cpp:
3875         (KJS::ScheduledAction::execute):
3876         * bindings/js/kjs_window.h: Removed redundant and less efficient 
3877         interpreter() function -- global objects have direct access to their
3878         interpreters now.
3879
3880         Changed these functions to pass around JSGlobalObjects instead of 
3881         Interpreters:
3882
3883         * page/Frame.cpp:
3884         (WebCore::Frame::bindingRootObject):
3885         (WebCore::Frame::createRootObject):
3886         * page/Frame.h:
3887         * page/mac/WebCoreFrameBridge.mm:
3888         (createRootObject):
3889
3890 2007-12-01  Darin Adler  <darin@apple.com>
3891
3892         Reviewed by Mitz.
3893
3894         - fix problem tracked by these bugs:
3895           http://bugs.webkit.org/show_bug.cgi?id=16097
3896           <rdar://problem/5619305> Safari crashes during load of LexisNexis search results
3897           <rdar://problem/5510779> CrashTracer: [USER] 25 crashes in Safari at
3898           WebCore::DocumentLoader::isLoadingMultipartContent const
3899
3900         * loader/ImageDocument.cpp:
3901         (WebCore::ImageDocument::createDocumentStructure): Create an ImageDocumentElement
3902         instead of an HTMLImageElement.
3903         (WebCore::ImageDocument::scale): Added a null check for m_imageElement.
3904         (WebCore::ImageDocument::resizeImageToFit): Ditto.
3905         (WebCore::ImageDocument::restoreImageSize): Ditto.
3906         (WebCore::ImageDocument::imageFitsInWindow): Ditto.
3907         (WebCore::ImageDocument::windowSizeChanged): Ditto.
3908         (WebCore::ImageDocumentElement::~ImageDocumentElement): Call
3909         disconnectImageElement so m_imageElement will be set to 0
3910          if we're still connected to the document.
3911         (WebCore::ImageDocumentElement::willMoveToNewOwnerDocument): Ditto.
3912
3913         * loader/ImageDocument.h: Changed image element type to be
3914         ImageDocumentElement instead of HTMLImageElement. Also added
3915         a disconnectImageElement function that sets m_imageElement to 0.
3916
3917 2007-12-01  Darin Adler  <darin@apple.com>
3918
3919         - remove the empty directories
3920
3921         * ksvg2: Removed.
3922         * ksvg2/css: Removed.
3923         * ksvg2/events: Removed.
3924         * ksvg2/misc: Removed.
3925         * ksvg2/scripts: Removed.
3926
3927 2007-12-01  Julien Chaffraix  <julien.chaffraix@gmail.com>
3928
3929         Bug 16189: XMLHttpRequest::setRequestHeader() should not set certain headers
3930
3931         Reviewed by Darin Adler.
3932
3933         * xml/XMLHttpRequest.cpp:
3934         (WebCore::canSetRequestHeader):
3935
3936         Test: http/tests/xmlhttprequest/set-dangerous-headers.html
3937
3938 2007-12-01  Rahul Abrol  <ra5ul@comcast.net>
3939
3940         Reviewed by Adam Roben.
3941
3942         http://bugs.webkit.org/show_bug.cgi?id=16128
3943         Ignore resizable=no for window.open().
3944
3945         * bindings/js/kjs_window.cpp:
3946         (KJS::setWindowFeature):
3947         (KJS::parseWindowFeatures):
3948         * manual-tests/window-open-features-parsing.html:
3949
3950 2007-12-01  Dan Bernstein  <mitz@apple.com>
3951
3952         Reviewed by Darin Adler.
3953
3954         - fix <rdar://problem/5619240> REGRESSION (Leopard-r28069): Reproducible crash with a Mootools-based calendar picker (jump to null in FrameView::layout)
3955
3956         Test: fast/dynamic/subtree-common-root.html
3957
3958         * page/FrameView.cpp:
3959         (WebCore::FrameView::layoutRoot): Added a parameter to let this method
3960         return the layout root for a pending layout as well.
3961         (WebCore::FrameView::scheduleRelayoutOfSubtree): Pass the new root
3962         to markContainingBlocksForLayout(). Otherwise,
3963         markContainingBlocksForLayout() could mark past the new root, if it had
3964         previously been marked as having a normal child needing layout and then
3965         was reached via a positioned child.
3966         * page/FrameView.h:
3967         * rendering/RenderBox.cpp:
3968         (WebCore::RenderBox::calcWidth):
3969         * rendering/RenderObject.cpp:
3970         (WebCore::RenderObject::~RenderObject): Fixed the ASSERT so that
3971         it would really catch deletion of the layout root.
3972         (WebCore::RenderObject::markContainingBlocksForLayout): Added the
3973         newRoot parameter, which tells this method where to stop marking.
3974         * rendering/RenderObject.h:
3975
3976 2007-12-01  Dan Bernstein  <mitz@apple.com>
3977
3978         Reviewed by Darin Adler.
3979
3980         - fold FontStyle into TextRun
3981
3982         * WebCore.xcodeproj/project.pbxproj:
3983         * platform/graphics/Font.cpp:
3984         (WebCore::WidthIterator::WidthIterator):
3985         (WebCore::WidthIterator::advance):
3986         (WebCore::Font::width):
3987         (WebCore::Font::drawSimpleText):
3988         (WebCore::Font::drawGlyphBuffer):
3989         (WebCore::Font::drawText):
3990         (WebCore::Font::floatWidth):
3991         (WebCore::Font::floatWidthForSimpleText):
3992         (WebCore::Font::selectionRectForText):
3993         (WebCore::Font::selectionRectForSimpleText):
3994         (WebCore::Font::offsetForPosition):
3995         (WebCore::Font::offsetForPositionForSimpleText):
3996         * platform/graphics/Font.h:
3997         (WebCore::TextRun::TextRun):
3998         (WebCore::TextRun::setText):
3999         (WebCore::TextRun::allowTabs):
4000         (WebCore::TextRun::xPos):
4001         (WebCore::TextRun::padding):
4002         (WebCore::TextRun::rtl):
4003         (WebCore::TextRun::ltr):
4004         (WebCore::TextRun::directionalOverride):
4005         (WebCore::TextRun::applyRunRounding):
4006         (WebCore::TextRun::applyWordRounding):
4007         (WebCore::TextRun::spacingDisabled):
4008         (WebCore::TextRun::disableSpacing):
4009         (WebCore::TextRun::disableRoundingHacks):
4010         (WebCore::TextRun::setRTL):
4011         (WebCore::TextRun::setDirectionalOverride):
4012         * platform/graphics/FontStyle.h: Removed.
4013         * platform/graphics/GraphicsContext.cpp:
4014         (WebCore::GraphicsContext::drawText):
4015         (WebCore::GraphicsContext::drawBidiText):
4016         (WebCore::GraphicsContext::drawHighlightForText):
4017         * platform/graphics/GraphicsContext.h:
4018         * platform/graphics/StringTruncator.cpp:
4019         (WebCore::stringWidth):
4020         * platform/graphics/gtk/FontGtk.cpp:
4021         (WebCore::Font::drawComplexText):
4022         (WebCore::Font::floatWidthForComplexText):
4023         (WebCore::Font::offsetForPositionForComplexText):
4024         (WebCore::Font::selectionRectForComplexText):
4025         * platform/graphics/mac/FontMac.mm:
4026         (WebCore::ATSULayoutParameters::ATSULayoutParameters):
4027         (WebCore::addDirectionalOverride):
4028         (WebCore::overrideLayoutOperation):
4029         (WebCore::ATSULayoutParameters::initialize):
4030         (WebCore::Font::selectionRectForComplexText):
4031         (WebCore::Font::drawComplexText):
4032         (WebCore::Font::floatWidthForComplexText):
4033         (WebCore::Font::offsetForPositionForComplexText):
4034         * platform/graphics/qt/FontQt.cpp:
4035         (WebCore::generateComponents):
4036         (WebCore::Font::drawText):
4037         (WebCore::Font::width):
4038         (WebCore::Font::offsetForPosition):
4039         (WebCore::cursorToX):
4040         (WebCore::Font::selectionRectForText):
4041         * platform/graphics/win/FontWin.cpp:
4042         (WebCore::Font::selectionRectForComplexText):
4043         (WebCore::Font::drawComplexText):
4044         (WebCore::Font::floatWidthForComplexText):
4045         (WebCore::Font::offsetForPositionForComplexText):
4046         * platform/graphics/wx/FontWx.cpp:
4047         (WebCore::Font::selectionRectForComplexText):
4048         (WebCore::Font::drawComplexText):
4049         (WebCore::Font::floatWidthForComplexText):
4050         (WebCore::Font::offsetForPositionForComplexText):
4051         * platform/mac/WebCoreTextRenderer.mm:
4052         (WebCoreDrawTextAtPoint):
4053         (WebCoreTextFloatWidth):
4054         * platform/win/PopupMenuWin.cpp:
4055         (WebCore::PopupMenu::paint):
4056         * platform/win/UniscribeController.cpp:
4057         (WebCore::UniscribeController::UniscribeController):
4058         (WebCore::UniscribeController::offsetForPosition):
4059         (WebCore::UniscribeController::advance):
4060         (WebCore::UniscribeController::itemizeShapeAndPlace):
4061         (WebCore::UniscribeController::resetControlAndState):
4062         (WebCore::UniscribeController::shapeAndPlaceItem):
4063         * platform/win/UniscribeController.h:
4064         * platform/win/WebCoreTextRenderer.cpp:
4065         (WebCore::doDrawTextAtPoint):
4066         * rendering/EllipsisBox.cpp:
4067         (WebCore::EllipsisBox::paint):
4068         * rendering/InlineTextBox.cpp:
4069         (WebCore::InlineTextBox::selectionRect):
4070         (WebCore::InlineTextBox::paint):
4071         (WebCore::InlineTextBox::paintSelection):
4072         (WebCore::InlineTextBox::paintCompositionBackground):
4073         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
4074         (WebCore::InlineTextBox::paintTextMatchMarker):
4075         (WebCore::InlineTextBox::offsetForPosition):
4076         (WebCore::InlineTextBox::positionForOffset):
4077         * rendering/RenderFileUploadControl.cpp:
4078         (WebCore::RenderFileUploadControl::paintObject):
4079         (WebCore::RenderFileUploadControl::calcPrefWidths):
4080         * rendering/RenderImage.cpp:
4081         * rendering/RenderListBox.cpp:
4082         (WebCore::RenderListBox::updateFromElement):
4083         (WebCore::RenderListBox::paintItemForeground):
4084         * rendering/RenderMenuList.cpp:
4085         (WebCore::RenderMenuList::updateOptionsWidth):
4086         * rendering/RenderText.cpp:
4087         (WebCore::RenderText::widthFromCache):
4088         (WebCore::RenderText::calcPrefWidths):
4089         (WebCore::RenderText::width):
4090         * rendering/RenderText.h:
4091         (WebCore::RenderText::allowTabs):
4092         * rendering/RenderTextControl.cpp:
4093         (WebCore::RenderTextControl::calcPrefWidths):
4094         * rendering/SVGInlineTextBox.cpp:
4095         (WebCore::SVGInlineTextBox::calculateGlyphWidth):
4096         (WebCore::SVGInlineTextBox::paintCharacters):
4097         (WebCore::SVGInlineTextBox::paintSelection):
4098         * rendering/SVGRootInlineBox.cpp:
4099         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
4100         (WebCore::cummulatedWidthOfInlineBoxCharacterRange):
4101         (WebCore::svgTextRunForInlineTextBox):
4102         * rendering/SVGRootInlineBox.h:
4103
4104 2007-12-01  Adam Treat  <treat@kde.org>
4105
4106         Reviewed by Simon.
4107
4108         * Don't hide symbols when in Debug mode
4109         * On Linux (glibc) provide a backtrace in the test output for debugging purposes
4110
4111         * WebCore.pro:
4112
4113 2007-11-30  Alp Toker  <alp@atoker.com>
4114
4115         Reviewed by Adam Roben.
4116
4117         http://bugs.webkit.org/show_bug.cgi?id=15691
4118         [GTK] Public API does not follow GTK+ conventions
4119
4120         Refactor the WebKit/GTK+ public API. Changes:
4121           WebKitPage -> WebKitWebView
4122           WebKitFrame -> WebKitWebFrame
4123
4124         Public API source and header names have been updated to mirror the API
4125         changes.
4126
4127         The API is now kept in WebKit/gtk/WebView to match other ports in the
4128         same class such as Mac and Win.
4129
4130         * WebCore.pro:
4131
4132 2007-11-30   Anders Carlsson  <andersca@apple.com>
4133
4134         Add platform/text project group.
4135         
4136         * WebCore.vcproj/WebCore.vcproj:
4137
4138 2007-11-30   Anders Carlsson  <andersca@apple.com>
4139
4140         Remove extra </Filter> tag which prevented the vcproj from being parsed correctly.
4141         
4142         * WebCore.vcproj/WebCore.vcproj:
4143
4144 2007-11-30  Nikolas Zimmermann  <zimmermann@kde.org>
4145
4146         Not reviewed. Try to fix qt/gtk build.
4147
4148         * WebCore.pro:
4149
4150 2007-11-30  Nikolas Zimmermann  <zimmermann@kde.org>
4151
4152         Rubber stamped by Eric.