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