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