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