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