8d0c9c607243688052b49a6c8de46b25042e441d
[WebKit-https.git] / WebCore / ChangeLog
1 2007-11-15  Antti Koivisto  <antti@apple.com>
2
3         Reviewed by Adele.
4
5         Fix <rdar://problem/5601598>
6         The movie tag should do initialization on need and not during startup.
7         
8         Initialize Movie MIME type hash on demand
9
10         * platform/MIMETypeRegistry.cpp:
11         (WebCore::initialiseSupportedMovieMIMETypes):
12         (WebCore::initialiseMIMETypeRegistry):
13         (WebCore::MIMETypeRegistry::isSupportedMovieMIMEType):
14         (WebCore::MIMETypeRegistry::getSupportedMovieMIMETypes):
15
16 2007-11-15  Mark Rowe  <mrowe@apple.com>
17
18         Build fix for Qt on Windows.
19
20         * xml/XPathStep.cpp:
21         (WebCore::XPath::Step::nodesInAxis):
22
23 2007-11-15  Timothy Hatcher  <timothy@apple.com>
24
25         Reviewed by Mark Rowe.
26
27         Bug 14761: Web Inspector leaks JS objects and DOM nodes
28         http://bugs.webkit.org/show_bug.cgi?id=14761
29
30         * page/InspectorController.cpp:
31         (WebCore::InspectorController::~InspectorController):
32         Change the tear down order so that inspectorDestroyed() is called before
33         InspectorController private data is set to Zero. The inspectorDestroyed()
34         call ends up closing the WebView and triggering InspectorController::close()
35         which unprotects m_scriptObject. This didn't happen when the private data
36         was cleared before calling inspectorDestroyed().
37
38 2007-11-15  Mark Rowe  <mrowe@apple.com>
39
40         Gtk build fix.
41
42         * WebCore.pro:
43
44 2007-11-15  Alexey Proskuryakov  <ap@webkit.org>
45
46         Reviewed by Darin.
47
48         http://bugs.webkit.org/show_bug.cgi?id=15989
49         XPath queries with predicates incorrectly retains the current node across unions
50
51         Test: fast/xpath/union-context-node.xhtml
52
53         * xml/XPathPath.cpp:
54         (WebCore::XPath::LocationPath::evaluate): Restore context after evaluation.
55         * xml/XPathStep.cpp:
56         (WebCore::XPath::Step::evaluate): Do not backup context, as we can easily re-create it.
57
58 2007-11-15  Alexey Proskuryakov  <ap@webkit.org>
59
60         Reviewed by Darin.
61
62         http://bugs.webkit.org/show_bug.cgi?id=15988
63         REGRESSION: XPath preceding-axis query misses nested elements
64
65         Test: fast/xpath/preceding-axis.xhtml
66
67         * xml/XPathStep.cpp:
68         (WebCore::XPath::Step::nodesInAxis): Hopefully correct this time.
69
70 2007-11-15  Timothy Hatcher  <timothy@apple.com>
71
72         Reviewed by Mark Rowe and Sam.
73
74         This corrects a couple of issues in the Web Inspector where selected search results
75         would not have the right text color when the window is inactive or the results are focused.
76
77         * page/inspector/inspector.css:
78
79 2007-11-15  Timothy Hatcher  <timothy@apple.com>
80
81         Reviewed by Sam.
82
83         Bug 16007: REGRESSION: Disclosure triangle click zone for resource categories is off by 10 pixels
84         http://bugs.webkit.org/show_bug.cgi?id=16007
85
86         Makes the click width an option on TreeElement and make ResourceCategoryTreeElement
87         a true subclass of TreeElement. The click width for ResourceCategoryTreeElement is 
88         20 pixels, and the default is 10 pixels.
89
90         * page/inspector/ResourceCategory.js:
91         * page/inspector/treeoutline.js:
92
93 2007-11-15  Anders Carlsson  <andersca@apple.com>
94
95         Reviewed by Brady.
96
97         Pass a VoidCallback to Database::transaction and Database::changeVersion.
98         This is not yet hooked up to the database machinery.
99         
100         * WebCore.vcproj/WebCore.vcproj:
101         * bindings/js/JSDatabaseCustom.cpp:
102         (WebCore::JSDatabase::changeVersion):
103         (WebCore::JSDatabase::transaction):
104         * storage/Database.cpp:
105         (WebCore::Database::changeVersion):
106         (WebCore::Database::transaction):
107         * storage/Database.h:
108
109 2007-11-15  Timothy Hatcher  <timothy@apple.com>
110
111         Reviewed by Adam.
112
113         Bug 16005: Hovering in the breadcrumbs causes jumpy behavior
114         http://bugs.webkit.org/show_bug.cgi?id=16005
115
116         Hovering over cumbs no longer exposes new crumbs. Clicking on a collapsed
117         crumb will expose as many hidden crumbs as possible to the user. Also crumbs
118         that have ID attributes will compact to the ID over the tag name.
119
120         * page/inspector/DocumentPanel.js:
121
122 2007-11-15  Anders Carlsson  <andersca@apple.com>
123
124         Reviewed by Sam.
125
126         Make the VoidCallback DOM interface behave more like our other DOM interfaces.
127         
128         * bindings/js/JSCustomVoidCallback.h: Added.
129         * bindings/js/JSCustomVoidCallback.cpp: Added.
130         (WebCore::JSCustomVoidCallback::JSCustomVoidCallback):
131         (WebCore::JSCustomVoidCallback::handleEvent):
132         VoidCallback implementation that wraps a JS object.
133         
134         (WebCore::toVoidCallback):
135         New method that creates a VoidCallback implementation given a JS object.
136         
137         * bindings/scripts/CodeGeneratorJS.pm:
138         Specify that VoidCallback can fail conversion and add a custom conversion function.
139         
140         * html/HTMLMediaElement.cpp:
141         (WebCore::HTMLMediaElement::movieCuePointReached):
142         Call handleEvent on the callback.
143         
144         (WebCore::HTMLMediaElement::removeCuePoint):
145         Comment out parts of this method, it has already been removed in the HTML5 spec and it relies
146         on overriding VoidCallback equality.
147         
148         * html/VoidCallback.cpp: Removed.
149         
150         * html/VoidCallback.h:
151         (WebCore::VoidCallback::VoidCallback):
152         (WebCore::VoidCallback::~VoidCallback):
153         Make this an abstract class with a pure virtual handleEvent method.
154         
155 2007-11-15  Adam Roben  <aroben@apple.com>
156
157         Fix <rdar://5485108> Type-select while a <select> menu is open doesn't work
158
159         There were two things broken here:
160            - WebView now requires a WM_CHAR message to be sent before it will
161              create a keyboard event with a charCode, but we were only sending
162              a WM_KEYDOWN event.
163            - The popup menu was not updating its focused index when the
164              <select> element's selectedIndex changed.
165
166         Reviewed by Adele.
167
168         * platform/win/PopupMenuWin.cpp:
169         (WebCore::PopupMenu::updateFromElement): Update the focused index from
170         the client's selected index.
171         (WebCore::PopupWndProc): When we receive a WM_CHAR message for a
172         printable character, manufacture a WM_KEYDOWN message for it and post
173         both that and the current WM_CHAR message to the WebView.
174
175 2007-11-15  Brady Eidson  <beidson@apple.com>
176
177         Build fix
178
179         * storage/DatabaseTracker.cpp:
180         (WebCore::DatabaseTracker::fullPathForDatabase):
181         (WebCore::DatabaseTracker::databaseNamesForOrigin):
182
183 2007-11-15  Brady Eidson  <beidson@apple.com>
184
185         Reviewed by John and Sam
186
187         Stubbing out everything required for a WebKit API for databases
188
189         Biggest change in WebCore is that we passed around SecurityOriginData as the representation
190         of a SecurityOrigin, instead of a String or a SecurityOrigin itself (which is an opaque object
191         that has a different purpose besides just hanging on to the data)
192
193         * WebCore.base.exp:
194         * WebCore.xcodeproj/project.pbxproj:
195
196         * platform/SecurityOrigin.cpp:
197         * platform/SecurityOrigin.h:
198         * platform/SecurityOriginData.h: Added.  Simple object to encapsulate the 3
199           pieces of data in the SecurityOrigin tuple
200         (WebCore::SecurityOriginData::SecurityOriginData):
201         (WebCore::SecurityOriginData::protocol):
202         (WebCore::SecurityOriginData::host):
203         (WebCore::SecurityOriginData::port):
204         (WebCore::SecurityOriginData::toString): Simple concatenation of the 3 components,
205           colon separated
206
207         * storage/Database.cpp:
208         (WebCore::Database::Database): Use SecurityOriginData instead
209
210         * storage/DatabaseTracker.cpp:
211         (WebCore::DatabaseTracker::fullPathForDatabase):
212         (WebCore::DatabaseTracker::databaseNamesForOrigin):
213         (WebCore::DatabaseTracker::deleteDatabasesWithOrigin):
214         (WebCore::DatabaseTracker::deleteDatabase):
215         * storage/DatabaseTracker.h:
216
217         * storage/DatabaseTrackerClient.h: Added.  For dispatching notifications up to WebKit
218         (WebCore::DatabaseTrackerClient::~DatabaseTrackerClient):2007-11-15  Jon Honeycutt  <jhoneycutt@apple.com>
219
220 2007-11-15  Jon Honeycutt  <jhoneycutt@apple.com>
221
222         Reviewed by Anders.
223
224         NP_ASFILEONLY streams should not buffer data in m_deliveryData.
225
226         * plugins/win/PluginStreamWin.cpp:
227         (WebCore::PluginStreamWin::didReceiveData):
228
229 2007-11-15  Justin Garcia  <justin.garcia@apple.com>
230
231         Reviewed by Adele Peterson.
232
233         <rdar://problem/5497643> Crash at Node::isDescendantOf when switching out of Edit HTML Source mode
234         
235         A textarea that contained the selection was removed but the selection wasn't cleared,
236         and we'd crash in code that assumed a valid, in-document selection.
237
238         * editing/SelectionController.cpp:
239         (WebCore::removingNodeRemovesPosition): Clear the selection if the node being removed is the
240         shadowAncestorNode of the node that contains the position, not just if the node being removed
241         contains that shadowAncestorNode.
242
243 2007-11-15  Nikolas Zimmermann  <zimmermann@kde.org>
244
245         Reviewed by Maciej.
246
247         Fix logic error: calculateGlyphBoundaries takes RTL text into account itself, no need to adjust offsets before.
248
249         * rendering/SVGInlineTextBox.cpp:
250         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
251         (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback):
252
253 2007-11-15  Anders Carlsson  <andersca@apple.com>
254
255         Reviewed by Brady.
256
257         <rdar://problem/5562470>
258         openDatabase does not work when the version string is empty
259
260         If the string is empty, pass a real empty string to sqlite3_bind_text16.
261         
262         * platform/sql/SQLiteStatement.cpp:
263         (WebCore::SQLiteStatement::bindText):
264
265 2007-11-15  Anders Carlsson  <andersca@apple.com>
266
267         Reviewed by Brady.
268
269         Get rid of SQLiteStatement::bindText and rename bindText16 to bindText.
270         Remove the copy parameter from bindText and bindBlob and always copy passed in data instead.
271
272         * loader/icon/IconDatabase.cpp:
273         (WebCore::IconDatabase::setIconIDForPageURLInSQLDatabase):
274         (WebCore::IconDatabase::removePageURLFromSQLDatabase):
275         (WebCore::IconDatabase::getIconIDForIconURLFromSQLDatabase):
276         (WebCore::IconDatabase::addIconURLToSQLDatabase):
277         (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
278         (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase):
279         * platform/sql/SQLiteStatement.cpp:
280         (WebCore::SQLiteStatement::prepare):
281         * platform/sql/SQLiteStatement.h:
282         * storage/Database.cpp:
283         (WebCore::setTextValueInDatabase):
284         * storage/DatabaseTracker.cpp:
285         (WebCore::DatabaseTracker::fullPathForDatabase):
286         (WebCore::DatabaseTracker::databaseNamesForOrigin):
287         (WebCore::DatabaseTracker::addDatabase):
288
289 2007-11-14  Brady Eidson <beidson@apple.com>
290
291         Rubberstamped by Sam
292
293         * platform/SecurityOrigin.h: Lets make this an unsigned short and *not* rule out half the possible ports?
294
295 2007-11-14  Alexey Proskuryakov  <ap@webkit.org>
296
297         Reviewed by Justin Garcia.
298
299         http://bugs.webkit.org/show_bug.cgi?id=15781
300         REGRESSION: Ligatures fail to form when typing in Devanagari (because WebKit can't handle
301         a marked range that covers half of a composed character sequence)
302
303         Test: platform/mac/editing/input/devanagari-ligature.html
304
305         This fix is somewhat of a hack, as it asks editing commands to work with invalid selections.
306         However, this is not entirely new for them, as Roman accents are typed in a similar manner.
307
308         In the future, we probably want to make commands work with ranges (or Positions explicitly).
309
310         * editing/Editor.cpp:
311         (WebCore::Editor::selectComposition): Force selection to composition range.
312         * editing/InsertTextCommand.cpp:
313         (WebCore::InsertTextCommand::input): Force ending selection to inserted text range.
314
315 2007-11-14  Beth Dakin  <bdakin@apple.com>
316
317         Reviewed by Hyatt.
318
319         Fix for <rdar://problem/5540855> REGRESSION: Combination of client-
320         side image map and <a> tag is not working properly (15522)
321
322         * html/HTMLMapElement.cpp:
323         (WebCore::HTMLMapElement::checkDTD): Allow <map> to have both block 
324         and inline children rather than just block children. This matches 
325         Firefox. 
326
327 2007-11-14  Justin Garcia  <justin.garcia@apple.com>
328
329         Reviewed by Alexey Proskuryakov.
330
331         <rdar://problem/5546763> CrashTracer: [USER] 362 crashes at WebCore::DeleteSelectionCommand::mergeParagraphs
332
333         * editing/DeleteSelectionCommand.cpp:
334         (WebCore::DeleteSelectionCommand::handleGeneralDelete): 
335         Removed an irrelevant FIXME.
336         (WebCore::DeleteSelectionCommand::mergeParagraphs): If the block that contained the end of the selection
337         hasn't been removed but has been emptied by deletion, we would to try and fail to create a VisiblePosition
338         inside that block, which could lead to a crash.  If that happens, there's no content in the block to move,
339         so just remove the block and return.
340         Preserve m_needPlaceholder during the call to moveParagraphs, since it may change it and since it does
341         its own placeholder insertion when necessary.
342         (WebCore::DeleteSelectionCommand::doApply): No need to check m_needPlaceholder before calling mergeParagraphs,
343         because it handles preserving m_needPlaceholder when it calls moveParagraphs.
344         
345 2007-11-14  Timothy Hatcher  <timothy@apple.com>
346
347         Reviewed by Adam.
348
349         Bug 14380: Long DOM ancestry breadcrumb lists get cut off
350         http://bugs.webkit.org/show_bug.cgi?id=14380
351
352         The breadcumbs will now be compacted and collapsed if there isn't enough room
353         to show everything. The collapsing algorithm always affects the crumbs that
354         are farthest away from the selected or hovered crumb first.
355
356         * page/inspector/DocumentPanel.js:
357         * page/inspector/inspector.css:
358
359 2007-11-14  Anders Carlsson  <andersca@apple.com>
360
361         Use the correct include path.
362         
363         * platform/Cursor.h:
364         * plugins/win/PluginPackageWin.h:
365         * plugins/win/PluginStreamWin.h:
366
367 2007-11-13  Brady Eidson  <beidson@apple.com>
368
369         Reviewed by Adam
370
371         http://bugs.webkit.org/show_bug.cgi?id=15976 - ASSERT/crash when SQLTransactionCallback throws an exception
372
373         * storage/SQLTransaction.cpp:
374         (WebCore::SQLTransaction::deliverTransactionCallback): Make a transaction error for the case where the 
375           SQLTransactionCallback fails
376         (WebCore::SQLTransaction::deliverTransactionErrorCallback): Don't assert on the error callback, but null check it
377           and make the commit/rollback decision accordingly
378
379 2007-11-13  Oliver Hunt  <oliver@apple.com>
380
381         Reviewed by Anders.
382
383         <rdar://problem/5365030> calling dataWithPDFInsideRect on an SVG with a gradient crashes (14780)
384
385         When drawing directly to PDF CG may delay the use of the gradient function until outside our
386         standard drawing path, which in turn could let us invalidate the caches before they were used.
387
388         To work around this we now store the cached stops in a RefCounted object, so that we can ensure
389         that cache exists as long as required.
390         
391         * platform/graphics/svg/SVGPaintServerGradient.cpp:
392         (WebCore::SVGPaintServerGradient::SVGPaintServerGradient):
393         * platform/graphics/svg/SVGPaintServerGradient.h:
394         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
395         (WebCore::cgGradientCallback):
396         (WebCore::CGShadingRefForLinearGradient):
397         (WebCore::CGShadingRefForRadialGradient):
398         (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache):
399
400 2007-11-13  Anders Carlsson  <andersca@apple.com>
401
402         Fix Windows build.
403         
404         * platform/Cursor.h:
405         * plugins/win/PluginPackageWin.h:
406         * plugins/win/PluginStreamWin.h:
407
408 2007-11-13  Geoffrey Garen  <ggaren@apple.com>
409
410         Reviewed by Anders Carlsson.
411
412         Renamed Shared to RefCounted.
413
414         * ForwardingHeaders/wtf/RefCounted.h: Copied from WebCore/ForwardingHeaders/wtf/Shared.h.
415         * ForwardingHeaders/wtf/Shared.h: Removed.
416         * bindings/js/JSSVGPODTypeWrapper.h:
417         * css/CSSFontFace.h:
418         * css/CSSRuleList.h:
419         * css/Counter.h:
420         * css/Pair.h:
421         * css/Rect.h:
422         * css/StyleBase.h:
423         * css/StyleSheetList.h:
424         * dom/Attribute.h:
425         * dom/Clipboard.h:
426         * dom/DOMImplementation.h:
427         * dom/Event.h:
428         * dom/EventListener.h:
429         * dom/NamedNodeMap.h:
430         * dom/NodeFilter.h:
431         * dom/NodeFilterCondition.h:
432         * dom/NodeList.h:
433         * dom/QualifiedName.h:
434         * dom/Range.h:
435         * dom/RangeException.h:
436         * dom/RegisteredEventListener.h:
437         * dom/Traversal.h:
438         * editing/EditCommand.h:
439         * history/BackForwardList.h:
440         * history/CachedPage.h:
441         * history/HistoryItem.cpp:
442         (WebCore::HistoryItem::HistoryItem):
443         * history/HistoryItem.h:
444         * html/CanvasGradient.h:
445         * html/CanvasPattern.h:
446         * html/CanvasRenderingContext2D.h:
447         * html/CanvasStyle.h:
448         * html/HTMLCollection.h:
449         * html/MediaError.h:
450         * html/TimeRanges.h:
451         * html/VoidCallback.h:
452         * ksvg2/css/SVGRenderStyle.cpp:
453         (WebCore::SVGRenderStyle::SVGRenderStyle):
454         * ksvg2/css/SVGRenderStyle.h:
455         * ksvg2/css/SVGRenderStyleDefs.cpp:
456         (StyleFillData::StyleFillData):
457         (StyleStrokeData::StyleStrokeData):
458         (StyleStopData::StyleStopData):
459         (StyleTextData::StyleTextData):
460         (StyleClipData::StyleClipData):
461         (StyleMaskData::StyleMaskData):
462         (StyleMarkerData::StyleMarkerData):
463         (StyleMiscData::StyleMiscData):
464         * ksvg2/css/SVGRenderStyleDefs.h:
465         * ksvg2/svg/SVGAngle.cpp:
466         (WebCore::SVGAngle::SVGAngle):
467         * ksvg2/svg/SVGAngle.h:
468         * ksvg2/svg/SVGAnimatedTemplate.h:
469         * ksvg2/svg/SVGElementInstanceList.h:
470         * ksvg2/svg/SVGException.h:
471         * ksvg2/svg/SVGList.h:
472         * ksvg2/svg/SVGPathSeg.h:
473         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
474         (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
475         * ksvg2/svg/SVGPreserveAspectRatio.h:
476         * ksvg2/svg/SVGRenderingIntent.h:
477         * ksvg2/svg/SVGTransform.h:
478         * ksvg2/svg/SVGUnitTypes.h:
479         * loader/DocumentLoader.h:
480         * loader/FormState.h:
481         * loader/ResourceLoader.h:
482         * loader/TextResourceDecoder.h:
483         * loader/icon/IconRecord.h:
484         * page/BarInfo.h:
485         * page/Console.h:
486         * page/DOMSelection.h:
487         * page/DOMWindow.h:
488         * page/Frame.h:
489         * page/History.h:
490         * page/InspectorController.cpp:
491         * page/Plugin.h:
492         * page/Screen.h:
493         * platform/ArrayImpl.h:
494         * platform/CString.h:
495         * platform/Cursor.h:
496         * platform/DeprecatedValueListImpl.cpp:
497         (WebCore::DeprecatedValueListImpl::Private::Private):
498         * platform/FileChooser.h:
499         * platform/FontFallbackList.h:
500         * platform/FontFamily.cpp:
501         (WebCore::FontFamily::FontFamily):
502         * platform/FontFamily.h:
503         * platform/FontSelector.h:
504         * platform/GlyphPageTreeNode.h:
505         * platform/PopupMenu.h:
506         * platform/RegularExpression.cpp:
507         * platform/ScrollBar.h:
508         * platform/SharedBuffer.h:
509         * platform/StringImpl.h:
510         * platform/graphics/Icon.h:
511         * platform/graphics/svg/SVGResource.h:
512         * platform/network/FormData.cpp:
513         (WebCore::FormData::FormData):
514         * platform/network/FormData.h:
515         * platform/network/ResourceHandle.h:
516         * platform/network/ResourceHandleClient.h:
517         * rendering/RenderStyle.cpp:
518         (WebCore::StyleSurroundData::StyleSurroundData):
519         (WebCore::StyleBoxData::StyleBoxData):
520         (WebCore::StyleVisualData::StyleVisualData):
521         (WebCore::StyleBackgroundData::StyleBackgroundData):
522         (WebCore::StyleMarqueeData::StyleMarqueeData):
523         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
524         (WebCore::StyleMultiColData::StyleMultiColData):
525         (WebCore::StyleTransformData::StyleTransformData):
526         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
527         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
528         (WebCore::StyleInheritedData::StyleInheritedData):
529         * rendering/RenderStyle.h:
530         * rendering/SVGCharacterLayoutInfo.h:
531         (WebCore::SVGCharOnPath::SVGCharOnPath):
532         * storage/SQLResultSetRowList.h:
533         * xml/DOMParser.h:
534         * xml/XMLHttpRequest.h:
535         * xml/XMLSerializer.h:
536         * xml/XPathEvaluator.h:
537         * xml/XPathExpression.h:
538         * xml/XPathNSResolver.h:
539         * xml/XPathResult.h:
540         * xml/XPathValue.h:
541         * xml/XSLTProcessor.h:
542
543 2007-11-13  Brady Eidson  <beidson@apple.com>
544
545         Reviewed by Mark Rowe
546
547         Remove errantly added files, and fix the idl (for reference's sake)
548
549         * storage/JSCustomSQLStatementCallback.h: Removed.
550         * storage/JSCustomSQLStatementErrorCallback.h: Removed.
551         * storage/JSCustomSQLTransactionCallback.h: Removed.
552         * storage/JSCustomSQLTransactionErrorCallback.h: Removed.
553         * storage/SQLStatementCallback.idl:
554
555 2007-11-13  Adam Roben  <aroben@apple.com>
556
557         Fix a bug and improve upon Brady's fix
558
559         Reviewed by Anders.
560
561         * bindings/js/JSSQLTransactionCustom.cpp:
562         (WebCore::JSSQLTransaction::executeSql): Made the code a little
563         clearer and more correct.
564         * loader/icon/IconDatabase.cpp: Put parentheses around the expansion
565         of IS_ICON_SYNC_THREAD() so that ASSERT_NOT_SYNC_THREAD() does the
566         comparison it meant to.
567
568 2007-11-13  Sam Weinig  <sam@webkit.org>
569
570         Fix Qt and Gtk builds.
571
572         * WebCore.pro: Remove non-generated idl files.
573
574 2007-11-13  Mark Rowe  <mrowe@apple.com>
575
576         Remove removed file from the project.
577
578         * WebCore.pro:
579
580 2007-11-13  Brady Eidson  <beidson@apple.com>
581
582         Release build fix
583
584         * bindings/js/JSSQLTransactionCustom.cpp:
585         (WebCore::JSSQLTransaction::executeSql):
586
587 2007-11-13  Adam Roben  <aroben@apple.com>
588
589         Add WindowMessageBroadcaster
590
591         This class is used to listen in on messages sent to HWNDs. Multiple
592         WindowMessageListeners can be notified about messages sent to a single
593         HWND, and one WindowMessageListener can listen to messages from
594         multiple HWNDs.
595
596         Reviewed by Ada.
597
598         * WebCore.vcproj/WebCore.vcproj: Added new files to project.
599         * platform/win/WindowMessageBroadcaster.cpp: Added.
600         (WebCore::instancesMap): Static helper.
601         (WebCore::WindowMessageBroadcaster::addListener): Registers a listener
602         for a particular HWND.
603         (WebCore::WindowMessageBroadcaster::removeListener): Removes a
604         listener for a particular HWND.
605         (WebCore::WindowMessageBroadcaster::WindowMessageBroadcaster):
606         (WebCore::WindowMessageBroadcaster::~WindowMessageBroadcaster):
607         (WebCore::WindowMessageBroadcaster::destroy): Removes this broadcaster
608         from the instancesMap, removes all of its listeners, unsubclasses the
609         window, and deletes the broadcaster.
610         (WebCore::WindowMessageBroadcaster::unsubclassWindow): Unsubclasses
611         the window (which means that SubclassedWndProc won't be called again
612         for this window).
613         (WebCore::WindowMessageBroadcaster::SubclassedWndProc): Notifies all
614         the listeners about every message sent to the HWND
615         * platform/win/WindowMessageBroadcaster.h: Added.
616         (WebCore::WindowMessageBroadcaster::listeners):
617         (WebCore::WindowMessageBroadcaster::originalWndProc):
618         * platform/win/WindowMessageListener.h: Added.
619
620 2007-11-13  Geoffrey Garen  <ggaren@apple.com>
621
622         Reviewed by Sam Weinig.
623
624         Moved Shared.h into wtf so it could be used in more places. Retained 
625         TreeShared, but moved it to its own file, TreeShared.h.
626
627         * ForwardingHeaders/wtf/Shared.h: Added.
628         * WebCore.xcodeproj/project.pbxproj:
629         * bindings/js/JSSVGPODTypeWrapper.h:
630         * css/CSSFontFace.h:
631         * css/CSSRuleList.h:
632         * css/Counter.h:
633         * css/Pair.h:
634         * css/Rect.h:
635         * css/StyleBase.h:
636         * css/StyleSheetList.h:
637         * dom/Clipboard.h:
638         * dom/DOMImplementation.h:
639         * dom/Event.h:
640         * dom/EventListener.h:
641         * dom/NamedNodeMap.h:
642         * dom/NodeFilterCondition.h:
643         * dom/NodeList.h:
644         * dom/Range.h:
645         * dom/RangeException.h:
646         * dom/RegisteredEventListener.h:
647         * dom/Traversal.h:
648         * history/BackForwardList.h:
649         * history/CachedPage.h:
650         * history/HistoryItem.h:
651         * html/CanvasGradient.h:
652         * html/CanvasPattern.h:
653         * html/HTMLCollection.h:
654         * html/MediaError.h:
655         * html/TimeRanges.h:
656         * html/VoidCallback.h:
657         * ksvg2/css/SVGRenderStyleDefs.h:
658         * ksvg2/svg/SVGAnimatedTemplate.h:
659         * ksvg2/svg/SVGElementInstanceList.h:
660         * ksvg2/svg/SVGList.h:
661         * ksvg2/svg/SVGPathSeg.h:
662         * ksvg2/svg/SVGPreserveAspectRatio.h:
663         * ksvg2/svg/SVGRenderingIntent.h:
664         * ksvg2/svg/SVGTransform.h:
665         * ksvg2/svg/SVGUnitTypes.h:
666         * loader/DocumentLoader.h:
667         * loader/FormState.h:
668         * loader/ResourceLoader.h:
669         * loader/TextResourceDecoder.h:
670         * loader/icon/IconRecord.h:
671         * page/BarInfo.h:
672         * page/Console.h:
673         * page/DOMSelection.h:
674         * page/DOMWindow.h:
675         * page/History.h:
676         * page/InspectorController.cpp:
677         * page/Plugin.h:
678         * page/Screen.h:
679         * platform/ArrayImpl.h:
680         * platform/CString.h:
681         * platform/DeprecatedValueListImpl.cpp:
682         * platform/FontFallbackList.h:
683         * platform/FontFamily.h:
684         * platform/FontSelector.h:
685         * platform/GlyphPageTreeNode.h:
686         * platform/PopupMenu.h:
687         * platform/RegularExpression.cpp:
688         * platform/ScrollBar.h:
689         * platform/Shared.h: Removed.
690         * platform/SharedBuffer.h:
691         * platform/StringImpl.h:
692         * platform/graphics/Icon.h:
693         * platform/graphics/svg/SVGResource.h:
694         * platform/network/FormData.h:
695         * platform/network/ResourceHandleClient.h:
696         * rendering/RenderStyle.h:
697         * rendering/SVGCharacterLayoutInfo.h:
698         * storage/SQLResultSetRowList.h:
699         * xml/DOMParser.h:
700         * xml/XMLSerializer.h:
701         * xml/XPathEvaluator.h:
702         * xml/XPathExpression.h:
703         * xml/XPathNSResolver.h:
704         * xml/XPathResult.h:
705
706 2007-11-13  Brady Eidson  <beidson@apple.com>
707
708         JS bindings by Anders, reviewed by Brady
709         WebCore changes by Brady, reviewed by Anders and Tim
710
711         Adapt to the new iteration of the HTML5 client-side storage spec.
712
713         Based largely on implementation feedback we generated in landing our first version of this API and also
714         on the input of others in the community, the database spec went through a large overhaul that addresses
715         many concerns.  Amongst other changes/improvements:
716         - SQLTransaction object is added and all transactions are explicit.  In addition, since the API manages
717           transactions explicitly, transaction-related language in SQL statements is disallowed
718         - executeSql() is now on a transaction object instead of the database object.
719         - Database.changeVersion() now takes place within the context of a transaction.  Therefore the version 
720           change can be atomic along with the statements that modify the DB schema
721
722         Most of the logic now takes place during the "transaction steps," which the specification clearly lays out
723         as a chain of events on the SQLTransaction object where processing is handed off between being processed 
724         asynchronously and calling back up to javascript.  To accomplish this voodoo, SQLTransaction has a series of 
725         methods that roughly match up with the "transaction steps" and it keeps a pointer to the next step.
726
727         * DerivedSources.make:
728         * WebCore.xcodeproj/project.pbxproj:
729
730         * bindings/js/JSDatabaseCustom.cpp:
731         (WebCore::JSDatabase::changeVersion): Adapt to the new API
732         (WebCore::JSDatabase::transaction): Added
733
734         * bindings/js/JSSQLTransactionCustom.cpp: Added.
735         (WebCore::JSSQLTransaction::executeSql): Added
736
737         * page/DOMWindow.cpp:
738         (WebCore::DOMWindow::openDatabase): Add the new arguments
739         * page/DOMWindow.h:
740         * page/DOMWindow.idl:
741
742         * page/inspector/DatabasePanel.js: Use the new API
743
744         * storage/ChangeVersionWrapper.cpp: Added.  Implementation of "SQLTransactionWrapper" that enforces
745           changing the version of the database
746         (WebCore::ChangeVersionWrapper::ChangeVersionWrapper):
747         (WebCore::ChangeVersionWrapper::performPreflight):
748         (WebCore::ChangeVersionWrapper::performPostflight):
749         * storage/ChangeVersionWrapper.h: Added.
750         (WebCore::ChangeVersionWrapper::sqlError):
751
752         * storage/Database.cpp: Removed the "main thread" and "background thread" sqlite handles as all sqlite operations can now
753           happen solely on the background thread - most of these changes result from that change
754         (WebCore::Database::Database): Removed an obsolete FIXME
755         (WebCore::Database::openAndVerifyVersion): 
756         (WebCore::Database::getVersionFromDatabase):
757         (WebCore::Database::setVersionInDatabase):
758         (WebCore::Database::versionMatchesExpected): Atomically guarantee that the current version and expected version are the same
759         (WebCore::Database::performOpenAndVerify):
760         (WebCore::Database::performTransactionStep): Added, as a hook for the DatabaseTransactionTask on the DatabaseThread
761         (WebCore::Database::changeVersion): Changed for the new API from JS
762         (WebCore::Database::transaction): Added, for the new API from JS
763         (WebCore::Database::scheduleTransaction): Add a transaction to this Database's transaction queue
764         (WebCore::Database::scheduleTransactionStep): Schedule the current transaction to be called on the background thread
765         (WebCore::Database::scheduleTransactionCallback): Schedule the current transaction to perform a callback on the main thread
766         (WebCore::Database::performGetTableNames):
767         (WebCore::Database::deliverAllPendingCallbacks):
768         (WebCore::Database::deliverPendingCallback):
769         (WebCore::Database::setExpectedVersion):
770         * storage/Database.h: 
771         * storage/Database.idl:
772
773         * storage/DatabaseTask.cpp:  Changed DatabaseTask to create a mutex on demand, and use the existence of that mutex
774           to replace the m_synchronous flag
775         (WebCore::DatabaseTask::performTask):
776         (WebCore::DatabaseTask::lockForSynchronousScheduling):
777         (WebCore::DatabaseTask::waitForSynchronousCompletion):
778         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
779         * storage/DatabaseTask.h:
780
781         * storage/SQLError.h: New API object
782
783         * storage/SQLResultSet.cpp:
784         (WebCore::SQLResultSet::SQLResultSet): Small changes to the API object
785         * storage/SQLResultSet.h:
786         * storage/SQLResultSet.idl:
787
788         * storage/SQLStatement.cpp: Added.
789         (WebCore::SQLStatement::SQLStatement):
790         (WebCore::SQLStatement::execute): Actually execute the sql statement on the SQLiteDatabase if it's still valid
791         (WebCore::SQLStatement::setVersionMismatchedError): Flag this statement as bad before it even starts in case
792           of an actual version vs. expected version mismatch
793         (WebCore::SQLStatement::performCallback): Call the right callback (SQLStatement or SQLStatementError) for this statement
794         * storage/SQLStatement.h: Added.
795         (WebCore::SQLStatement::hasStatementCallback):
796         (WebCore::SQLStatement::hasStatementErrorCallback):
797         (WebCore::SQLStatement::sqlError): Get the error for this statement, if any
798
799         * storage/SQLTransaction.cpp: Added.
800         (WebCore::SQLTransaction::SQLTransaction):
801         (WebCore::SQLTransaction::executeSQL): Entry point for the API from JS
802         (WebCore::SQLTransaction::enqueueStatement): Add a new statement onto the queue
803         (WebCore::SQLTransaction::performNextStep): Call the method for the next step
804         (WebCore::SQLTransaction::performPendingCallback): Call the method for the pending callback
805         (WebCore::SQLTransaction::openTransactionAndPreflight): Open a transaction to the database and preflight 
806           using the SQLTransactionWrapper, if any
807         (WebCore::SQLTransaction::deliverTransactionCallback): Deliver the transaction callback to the javascript thread
808         (WebCore::SQLTransaction::scheduleToRunStatements): Convinience to schedule this transaction on the database thread 
809           and make runStatements() the next step
810         (WebCore::SQLTransaction::runStatements): Start running the sql statements queued up for this transaction 
811         (WebCore::SQLTransaction::getNextStatement): Bring the next statement off the queue
812         (WebCore::SQLTransaction::runCurrentStatement): Execute the current statement
813         (WebCore::SQLTransaction::deliverStatementCallback): Deliver the SQLStatementCallback for this statement
814         (WebCore::SQLTransaction::postflightAndCommit): Postflight the transaction using SQLTransactionWrapper and commit it
815         (WebCore::SQLTransaction::handleTransactionError): Make the right call for any error that occurred on the Transaction
816         (WebCore::SQLTransaction::deliverTransactionErrorCallback): Deliver the SQLTransactionErrorCallback
817         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): Either do a final commit or rollback to cleanup the
818           transaction after it error'ed out
819         * storage/SQLTransaction.h:
820         (WebCore::SQLTransactionWrapper::~SQLTransactionWrapper): 
821         (WebCore::SQLTransaction::database):
822         * storage/SQLTransaction.idl:
823
824         The following were made obsolete by the new version of the API:
825         * bindings/js/JSCustomSQLCallback.cpp: Removed.
826         * bindings/js/JSCustomSQLCallback.h: Removed.
827         * bindings/js/JSCustomVersionChangeCallback.cpp: Removed.
828         * bindings/js/JSCustomVersionChangeCallback.h: Removed.
829         * storage/DatabaseCallback.cpp: Removed.
830         * storage/DatabaseCallback.h: Removed.
831         * storage/SQLCallback.h: Removed.
832         * storage/SQLCallback.idl: Removed.
833         * storage/VersionChangeCallback.h: Removed.
834         * storage/VersionChangeCallback.idl: Removed.
835
836 2007-11-13  Dan Bernstein  <mitz@apple.com>
837
838         Reviewed by Beth Dakin.
839
840         - fix <rdar://problem/5551163> REGRESSION: Cursor does not change to arrow on "X" button in google maps, making it hard to click
841
842         * css/html4.css: Added a 'cursor: auto' rule for links.
843         * manual-tests/link-cursor-auto.html: Added.
844
845 2007-11-13  Dan Bernstein  <mitz@apple.com>
846
847         Reviewed by Beth Dakin.
848
849         - fix <rdar://problem/5516272> Reproducible crash in RenderObject::setStyle involving going Back from a non-HTML document (Bookmarks view, PDF view)
850
851         The root cause for the crash is that when a non-HTML view enters the
852         frame, the frame's document pointer keeps pointing at the last HTML-type
853         document it contained. This patch does not address the root cause, but
854         makes changes to account for that condition.
855
856         * loader/FrameLoader.cpp:
857         (WebCore::FrameLoader::receivedMainResourceError): Do not change the
858         frame's current document's page cache state here.
859         (WebCore::FrameLoader::invalidateCurrentItemCachedPage): If the frame's
860         current document is in fact the history item being invalidated, then
861         set its page cache state here.
862
863 2007-11-12  Antti Koivisto  <antti@apple.com>
864
865         Reviewed by Adele.
866
867         Fix that 'timeupdate' and 'waiting' events were never dispatched.
868         
869         Add explicit m_paused attribute instead of trying to derive paused state from
870         underlying media. Call updatePlayState() to start/stop media playback
871         when any attribute that affects active playback state changes. This matches 
872         specification text.
873         
874         Test: http/tests/media/video-play-stall.html
875
876         * html/HTMLMediaElement.cpp:
877         (WebCore::HTMLMediaElement::HTMLMediaElement):
878         (WebCore::HTMLMediaElement::setReadyState):
879         (WebCore::HTMLMediaElement::paused):
880         (WebCore::HTMLMediaElement::play):
881         (WebCore::HTMLMediaElement::pause):
882         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
883         (WebCore::HTMLMediaElement::movieDidEnd):
884         (WebCore::HTMLMediaElement::updatePlayState):
885         * html/HTMLMediaElement.h:
886
887 2007-11-13  John Sullivan  <sullivan@apple.com>
888
889         Reviewed by Darin.
890
891         removed recently-added PreferredType concept; we found a better way to do what
892         ths was accomplishing
893
894         * bridge/WindowFeatures.h:
895         (WebCore::WindowFeatures::WindowFeatures):
896         removed definition of PreferredType
897                         
898         * page/ContextMenuController.cpp:
899         (WebCore::openNewWindow):
900         removed use of PreferredType
901
902 2007-11-12  Alexey Proskuryakov  <ap@webkit.org>
903
904         Reviewed by Darin.
905
906         http://bugs.webkit.org/show_bug.cgi?id=15954
907         Move DOM Selection operations out of SelectionController
908
909         No change in functionality.
910
911         * editing/SelectionController.cpp:
912         (WebCore::SelectionController::setSelectedRange):
913         * editing/SelectionController.h:
914         * page/DOMSelection.cpp:
915         (WebCore::DOMSelection::anchorNode):
916         (WebCore::DOMSelection::baseNode):
917         (WebCore::DOMSelection::anchorOffset):
918         (WebCore::DOMSelection::baseOffset):
919         (WebCore::DOMSelection::focusNode):
920         (WebCore::DOMSelection::extentNode):
921         (WebCore::DOMSelection::focusOffset):
922         (WebCore::DOMSelection::extentOffset):
923         (WebCore::DOMSelection::isCollapsed):
924         (WebCore::DOMSelection::type):
925         (WebCore::DOMSelection::rangeCount):
926         (WebCore::DOMSelection::collapse):
927         (WebCore::DOMSelection::collapseToEnd):
928         (WebCore::DOMSelection::collapseToStart):
929         (WebCore::DOMSelection::empty):
930         (WebCore::DOMSelection::setBaseAndExtent):
931         (WebCore::DOMSelection::setPosition):
932         (WebCore::DOMSelection::modify):
933         (WebCore::DOMSelection::extend):
934         (WebCore::DOMSelection::getRangeAt):
935         (WebCore::DOMSelection::removeAllRanges):
936         (WebCore::DOMSelection::addRange):
937         (WebCore::DOMSelection::deleteFromDocument):
938         (WebCore::DOMSelection::containsNode):
939         (WebCore::DOMSelection::selectAllChildren):
940         (WebCore::DOMSelection::toString):
941         * page/DOMSelection.h:
942         Moved all DOM API methods to DOMSelection; changed SelectionController::setSelectedRange()
943         to return its result directly instead of via an ExceptionCode that no caller wanted.
944
945         * editing/Editor.cpp:
946         (WebCore::Editor::deleteRange):
947         (WebCore::Editor::removeFormattingAndStyle):
948         (WebCore::Editor::selectComposition):
949         (WebCore::Editor::setComposition):
950         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
951         Adapted for SelectionController::setSelectedRange() now returning a bool.
952         SelectionController::toString() is no longer avasilable, use plainText() explicitly.
953
954         * WebCore.base.exp: Changed SelectionController::setSelectedRange() signature.
955
956 2007-11-12  Dan Bernstein  <mitz@apple.com>
957
958         Reviewed by Darin Adler.
959
960         - <http://bugs.webkit.org/show_bug.cgi?id=15890>
961           Most of www.aol.com still redraws unnecessarily when headline/photo section changes
962
963         Test: fast/repaint/invisible-objects.html
964
965         Avoid repainting invisible blocks if they are enclosed in a layer that
966         contains no visible objects.
967
968         * rendering/RenderBlock.cpp:
969         (WebCore::RenderBlock::layoutBlock):
970         * rendering/RenderBox.cpp:
971         (WebCore::RenderBox::absoluteClippedOverflowRect):
972
973 2007-11-12  Timothy Hatcher  <timothy@apple.com>
974
975         Reviewed by Mark Rowe.
976
977         Prevent selecting a word in the breadcrumb or the styles section when double
978         clicking on a DOM node in the outline tree.
979
980         * page/inspector/DocumentPanel.js: Call preventDefault() when a mousedown event
981           with a detail of 2 or higher comes in. This prevents the selection.
982         * page/inspector/inspector.css: Mark the breadcrumb as user-select: none.
983
984 2007-11-12  Oliver Hunt  <oliver@apple.com>
985
986         Reviewed by John S.
987
988         <rdar://problem/5537289> REGRESSION: Dragging a link or an image from an IFrame causes the page to not respond to clicks afterwards (15460)
989         
990         EventHandler needs to reset these fields when a drag terminates, otherwise
991         EventHandler is left in an inconsistent state when a drag is initiated on a
992         page with multiple frames.
993
994         * page/EventHandler.cpp:
995         (WebCore::EventHandler::cancelDragAndDrop):
996         (WebCore::EventHandler::performDragAndDrop):
997         (WebCore::EventHandler::clearDragState):
998         * page/EventHandler.h:
999
1000 2007-11-12  Oliver Hunt  <oliver@apple.com>
1001
1002         Reviewed by Darin and Antti.
1003
1004         Return behaviour for 0 sized pattern back to what it was prior to r27704
1005
1006         This change in behaviour broke two layout tests in DRT, so correcting it
1007         corrects existing tests.
1008
1009         * platform/graphics/cg/ImageBufferCG.cpp:
1010
1011 2007-11-12  Timothy Hatcher  <timothy@apple.com>
1012
1013         Reviewed by John.
1014
1015         <rdar://problem/5268311> REGRESSION (Safari 2-3): Exception thrown when calling -[WebDataSource subresources]
1016
1017         * page/mac/WebCoreFrameBridge.mm:
1018         (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
1019         If the SharedBuffer is null insert an empty NSData instead of nil.
1020
1021 2007-11-12  Darin Adler  <darin@apple.com>
1022
1023         Reviewed by Tim.
1024
1025         - http://bugs.webkit.org/show_bug.cgi?id=15947
1026           speed up page loading a bit by inlining
1027
1028         * loader/FrameLoader.cpp: (WebCore::FrameLoader::isLocationChange):
1029         Factored out the slow case of isScheduledLocationChangePending into this.
1030
1031         * loader/FrameLoader.h:
1032         (WebCore::FrameLoader::isScheduledLocationChangePending): Added an
1033         inline check of the far and away most common case, where m_scheduledRedirection
1034         is 0; the rest is in the isLocationChange function.
1035
1036 2007-11-12  George Staikos  <staikos@kde.org>
1037
1038         Reviewed by Tim.
1039
1040         Extract the text match marker highlight color into RenderTheme instead
1041         of the hardcoded yellow.
1042
1043         * rendering/InlineTextBox.cpp:
1044         (WebCore::InlineTextBox::paintTextMatchMarker):
1045         * rendering/RenderTheme.cpp:
1046         (WebCore::RenderTheme::platformTextSearchHighlightColor):
1047         * rendering/RenderTheme.h:
1048
1049 2007-11-12  Mark Rowe  <mrowe@apple.com>
1050
1051         Fix deadlock on launch on the Mac.
1052
1053         * loader/icon/IconDatabase.cpp:
1054         (WebCore::IconDatabase::open): Restore unlock that was mistakenly removed in r27717.
1055
1056 2007-11-12  Justin Haygood  <jhaygood@reaktix.com>
1057
1058         Reviewed by Brady.
1059
1060         http://bugs.webkit.org/show_bug.cgi?id=15955
1061         Reimplement threading functions in IconDatabase and SQLiteDatabase in terms of the threading abstractions
1062
1063         * loader/icon/IconDatabase.cpp:
1064         (WebCore::IconDatabase::open):
1065         (WebCore::IconDatabase::close):
1066         * loader/icon/IconDatabase.h:
1067         * platform/sql/SQLiteDatabase.cpp:
1068         (WebCore::SQLiteDatabase::SQLiteDatabase):
1069         (WebCore::SQLiteDatabase::open):
1070         (WebCore::SQLiteDatabase::close):
1071         * platform/sql/SQLiteDatabase.h:
1072
1073 2007-11-12  Adam Roben  <aroben@apple.com>
1074
1075         Windows build fix
1076
1077         * config.h: Touch because VS apparently can't figure out which files
1078         depend on ResourceResponse.h.
1079         * WebCore.vcproj/WebCore.vcproj: Add ResourceResponseBase files to
1080         project and remove old ResourceResponse files.
1081
1082 2007-11-12  Julien Chaffraix  <julien.chaffraix@gmail.com>
1083
1084         Reviewed by Darin.
1085
1086         http://bugs.webkit.org/show_bug.cgi?id=15334
1087         Split ResourceResponse into platform specific files
1088
1089         * WebCore.base.exp:
1090         * WebCore.pro:
1091         * WebCore.vcproj/WebCore.vcproj:
1092         * WebCore.xcodeproj/project.pbxproj:
1093         * platform/network/ResourceResponse.cpp: Removed.
1094         * platform/network/ResourceResponse.h: Removed.
1095         * platform/network/ResourceResponseBase.cpp: Copied from platform/network/ResourceResponse.cpp.
1096         (WebCore::ResourceResponseBase::asResourceResponse):
1097         (WebCore::ResourceResponseBase::isHTTP):
1098         (WebCore::ResourceResponseBase::url):
1099         (WebCore::ResourceResponseBase::setUrl):
1100         (WebCore::ResourceResponseBase::mimeType):
1101         (WebCore::ResourceResponseBase::setMimeType):
1102         (WebCore::ResourceResponseBase::expectedContentLength):
1103         (WebCore::ResourceResponseBase::setExpectedContentLength):
1104         (WebCore::ResourceResponseBase::textEncodingName):
1105         (WebCore::ResourceResponseBase::setTextEncodingName):
1106         (WebCore::ResourceResponseBase::suggestedFilename):
1107         (WebCore::ResourceResponseBase::setSuggestedFilename):
1108         (WebCore::ResourceResponseBase::httpStatusCode):
1109         (WebCore::ResourceResponseBase::setHTTPStatusCode):
1110         (WebCore::ResourceResponseBase::httpStatusText):
1111         (WebCore::ResourceResponseBase::setHTTPStatusText):
1112         (WebCore::ResourceResponseBase::httpHeaderField):
1113         (WebCore::ResourceResponseBase::setHTTPHeaderField):
1114         (WebCore::ResourceResponseBase::httpHeaderFields):
1115         (WebCore::ResourceResponseBase::isAttachment):
1116         (WebCore::ResourceResponseBase::setExpirationDate):
1117         (WebCore::ResourceResponseBase::expirationDate):
1118         (WebCore::ResourceResponseBase::setLastModifiedDate):
1119         (WebCore::ResourceResponseBase::lastModifiedDate):
1120         (WebCore::ResourceResponseBase::updateResourceResponse):
1121         * platform/network/ResourceResponseBase.h: Copied from platform/network/ResourceResponse.h.
1122         (WebCore::ResourceResponseBase::ResourceResponseBase):
1123         * platform/network/cf/ResourceResponse.h: Added.
1124         (WebCore::ResourceResponse::ResourceResponse):
1125         * platform/network/curl/ResourceResponse.h: Added.
1126         (WebCore::ResourceResponse::ResourceResponse):
1127         (WebCore::ResourceResponse::doUpdateResourceResponse):
1128         * platform/network/mac/ResourceResponse.h: Added.
1129         (WebCore::ResourceResponse::ResourceResponse):
1130         * platform/network/qt/ResourceResponse.h: Added.
1131         (WebCore::ResourceResponse::ResourceResponse):
1132         (WebCore::ResourceResponse::doUpdateResourceResponse):
1133
1134 2007-11-11  Justin Haygood  <jhaygood@reaktix.com>
1135
1136         Reviewed by Adam Roben.
1137
1138         http://bugs.webkit.org/show_bug.cgi?id=15939
1139         Adds a currentThread API for use by SQLiteDatabase, etc.
1140
1141         * platform/Threading.h:
1142         * platform/ThreadingNone.cpp:
1143         (WebCore::currentThread):
1144         * platform/gtk/ThreadingGtk.cpp:
1145         (WebCore::identifierByGthreadHandle):
1146         (WebCore::):
1147         * platform/pthreads/ThreadingPthreads.cpp:
1148         (WebCore::identifierByPthreadHandle):
1149         (WebCore::currentThread):
1150
1151 2007-11-11  Dan Bernstein  <mitz@apple.com>
1152
1153         Reviewed by Adam Roben.
1154
1155         - fix http://bugs.webkit.org/show_bug.cgi?id=15942
1156           REGRESSION: Selecting "Edit Html" tab in Blogger causes crash (Assertion failed: isRange())
1157
1158         Test: editing/selection/cleared-by-relayout.html
1159
1160         * editing/Selection.cpp:
1161         (WebCore::Selection::toRange): Check if the selection has been cleared
1162         by updating layout.
1163
1164 2007-11-11  Darin Adler  <darin@apple.com>
1165
1166         Reviewed by Mark Rowe.
1167
1168         - fix line numbers that were off since my recent patch
1169
1170         * platform/SegmentedString.h:
1171         (WebCore::SegmentedSubstring::SegmentedSubstring): Reversed the sense of m_excludeLineNumbers
1172         and rename it to m_doNotExcludeLineNumbers.
1173         (WebCore::SegmentedSubstring::excludeLineNumbers): Updated.
1174         (WebCore::SegmentedSubstring::doNotExcludeLineNumbers): Added.
1175         (WebCore::SegmentedSubstring::setExcludeLineNumbers): Updated.
1176         (WebCore::SegmentedString::advance): Use doNotExcludeLineNumbers to reverse the sense and fix
1177         the regression, but keep the speediness. I accidentally had removed a ! here.
1178
1179         * platform/SegmentedString.cpp:
1180         (WebCore::SegmentedString::advanceSlowCase): Use doNotExcludeLineNumbers.
1181
1182 2007-11-11  Oliver Hunt  <oliver@apple.com>
1183
1184         Reviewed by Darin.
1185
1186         Fix for <rdar://problem/5585334> numfuzz: integer overflows opening
1187         malformed SVG file in WebCore::ImageBuffer::create. Add protection
1188         against a potential overflow.
1189
1190         * platform/graphics/cg/ImageBufferCG.cpp:
1191
1192 2007-11-11  Antti Koivisto  <antti@apple.com>
1193
1194         Reviewed by Darin.
1195
1196         Fix a bunch of cases where the exception code is checked by the function but is not zeroed first.
1197
1198         * bindings/js/kjs_binding.cpp:
1199         (KJS::setDOMException):
1200         * dom/Attr.cpp:
1201         (WebCore::Attr::setPrefix):
1202         * dom/Document.cpp:
1203         (WebCore::Document::createElement):
1204         * dom/Element.cpp:
1205         (WebCore::Element::setPrefix):
1206         * dom/Range.cpp:
1207         (WebCore::Range::setStart):
1208         (WebCore::Range::setEnd):
1209         (WebCore::Range::isPointInRange):
1210         (WebCore::Range::comparePoint):
1211         (WebCore::Range::compareBoundaryPoints):
1212         (WebCore::Range::deleteContents):
1213         (WebCore::Range::processContents):
1214         (WebCore::Range::extractContents):
1215         (WebCore::Range::insertNode):
1216         (WebCore::Range::setStartAfter):
1217         (WebCore::Range::setEndBefore):
1218         (WebCore::Range::setEndAfter):
1219         (WebCore::Range::selectNode):
1220         (WebCore::Range::surroundContents):
1221         (WebCore::Range::setStartBefore):
1222         * editing/TextIterator.cpp:
1223         (WebCore::TextIterator::TextIterator):
1224         * html/CanvasRenderingContext2D.cpp:
1225         (WebCore::CanvasRenderingContext2D::createPattern):
1226         * html/HTMLMediaElement.cpp:
1227         (WebCore::HTMLMediaElement::play):
1228         (WebCore::HTMLMediaElement::pause):
1229         * html/HTMLSelectElement.cpp:
1230         (WebCore::HTMLSelectElement::add):
1231         (WebCore::HTMLSelectElement::setOption):
1232         * xml/XPathEvaluator.cpp:
1233         (WebCore::XPathEvaluator::evaluate):
1234
1235 2007-11-11  Darin Adler  <darin@apple.com>
1236
1237         Reviewed by Mitz.
1238
1239         - http://bugs.webkit.org/show_bug.cgi?id=15945
1240           speed up GraphicsContextCG typical case by skipping roundToDevicePixels
1241
1242         * platform/graphics/cg/GraphicsContextCG.cpp:
1243         (WebCore::GraphicsContext::restorePlatformState): Clear the flag since we no
1244         longer know if the transform is identity or not.
1245         (WebCore::GraphicsContext::strokeArc): Removed an extra set of redundant
1246         CGContextSave/RestoreGState.
1247         (WebCore::GraphicsContext::beginTransparencyLayer): Clear the flag since we no
1248         longer know if the transform is identity or not.
1249         (WebCore::GraphicsContext::endTransparencyLayer): Ditto.
1250         (WebCore::GraphicsContext::scale): Ditto.
1251         (WebCore::GraphicsContext::rotate): Ditto.
1252         (WebCore::GraphicsContext::translate): Ditto.
1253         (WebCore::GraphicsContext::concatCTM): Ditto.
1254         (WebCore::GraphicsContext::roundToDevicePixels): Return quickly if the transform
1255         is known to be identity, and record that fact when we discover it otherwise.
1256
1257         * platform/graphics/cg/GraphicsContextPlatformPrivate.h:
1258         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1259         Added a m_userToDeviceTransformKnownToBeIdentity flag, initialized to false.
1260
1261 2007-11-11  Darin Adler  <darin@apple.com>
1262
1263         Reviewed by Mitz.
1264
1265         - http://bugs.webkit.org/show_bug.cgi?id=15944
1266           streamline SegmentedString to speed up parsing
1267
1268         I measured a speed-up of the page load test while developing this patch. I don't
1269         have a precise figure, though.
1270
1271         * html/HTMLTokenizer.h: Removed unneeded lineNumberPtr() function. Also renamed
1272         lineno to m_lineNumber.
1273         * html/HTMLTokenizer.cpp:
1274         (WebCore::HTMLTokenizer::processListing): Don't pass 0 to the advance function
1275         since we don't want to update a line number.
1276         (WebCore::HTMLTokenizer::parseSpecial): Ditto.
1277         (WebCore::HTMLTokenizer::parseComment): Pass the line number data member directly
1278         instead of lineNumberPtr() since the advance function now takes a reference.
1279         (WebCore::HTMLTokenizer::parseServer): Ditto.
1280         (WebCore::HTMLTokenizer::parseProcessingInstruction): Ditto.
1281         (WebCore::HTMLTokenizer::parseText): Ditto.
1282         (WebCore::HTMLTokenizer::parseEntity): Ditto.
1283         (WebCore::HTMLTokenizer::parseTag): Ditto.
1284         (WebCore::HTMLTokenizer::write): Ditto.
1285
1286         * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryTokenizer::write):
1287         * loader/TextDocument.cpp: (WebCore::TextTokenizer::write):
1288         Don't pass 0 to the advance function.
1289
1290         * platform/SegmentedString.h: (WebCore::SegmentedString::advance): Streamlined
1291         the most common case, and pushed less common cases into a separate function
1292         that is not inlined. Also got rid of a branch by separating the case with a
1293         line number from the case without one.
1294
1295         * platform/SegmentedString.cpp: (WebCore::SegmentedString::advanceSlowCase):
1296         Added. The aforementioned less common cases are here.
1297
1298 2007-11-11  Antti Koivisto  <antti@apple.com>
1299
1300         Forgot to do this review change (and test HTTP commit).
1301
1302         * html/HTMLMediaElement.cpp:
1303         (WebCore::HTMLMediaElement::play):
1304
1305 2007-11-11  Antti Koivisto  <antti@apple.com>
1306
1307         Reviewed by Darin.
1308         
1309         - Update play() and pause() to match current HTML5 draft
1310             - send events asynchronously
1311             - add timeupdate event to pause
1312             - rethrow load() exception, not others
1313         - Use list for async events to get ordering right
1314
1315         Tests: media/video-pause-empty-events.html
1316                media/video-play-empty-events.html
1317                media/video-play-pause-events.html
1318                media/video-play-pause-exception.html
1319
1320         * html/HTMLMediaElement.cpp:
1321         (WebCore::HTMLMediaElement::dispatchEventAsync): 
1322         (WebCore::HTMLMediaElement::asyncEventTimerFired):
1323         (WebCore::HTMLMediaElement::play):
1324         (WebCore::HTMLMediaElement::pause):
1325         * html/HTMLMediaElement.h:
1326
1327 2007-11-11  Nikolas Zimmermann  <zimmermann@kde.org>
1328
1329         Reviewed by Eric.
1330
1331         Fixes: http://bugs.webkit.org/show_bug.cgi?id=6424 (<text>, <tspan> dominant-baseline attribute is not respected)
1332
1333         Add (basic) support for dominant-baseline / alignment-baseline text properties.
1334         Note: there are no official testcases, and no-one implemented it before. Only ASV3
1335               supported dominant-baseline, but not correct it seems.
1336
1337         * rendering/SVGRootInlineBox.cpp:
1338         (WebCore::dominantBaselineToShift):
1339         (WebCore::alignmentBaselineToShift):
1340         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
1341
1342 2007-11-11  Adam Roben  <aroben@apple.com>
1343
1344         Add wrappers around CoCreateInstance to COMPtr
1345
1346         I followed the example of the Query constructor and query method by
1347         adding a Create constructor and create method.
1348
1349         Reviewed by Darin.
1350
1351         * platform/win/COMPtr.h:
1352         (COMPtr::COMPtr): Added a new constructor that calls
1353         CoCreateInstance.
1354         (COMPtr::create): Added.
1355         (COMPtr::createInstance): Added.
1356
1357 2007-11-11  Alexey Proskuryakov  <ap@nypop.com>
1358
1359         Reviewed by Darin.
1360
1361         http://bugs.webkit.org/show_bug.cgi?id=15896
1362         More editing cleanup
1363
1364         No functionality changes.
1365
1366         * dom/Node.h: Moved several editing-related methods elsewhere.
1367         * dom/Node.cpp: (WebCore::Node::maxCharacterOffset): Renamed from maxOffset()
1368         to highlight that it is a match to offsetInCharacters(), and much different from other
1369         offset-related methods. Added ASSERT_NOT_REACHED(), as callers are supposed to check
1370         offsetInCharacters() before calling this.
1371
1372         * dom/CharacterData.cpp: (WebCore::CharacterData::maxCharacterOffset):
1373         * dom/CharacterData.h: (WebCore::CharacterData::isCharacterDataNode):
1374         Updated for above renamings.
1375
1376         * dom/Comment.{h,cpp}: Removed an override for offsetInCharacters(), which is already present in CharacterData.
1377
1378         * dom/Document.{h,cpp}: Folded updateSelection() into Frame::selectionLayoutChanged().
1379
1380         * dom/Position.h:
1381         * dom/Position.cpp:
1382         (WebCore::Position::uncheckedPreviousOffset): Moved from Node::previousOffset().
1383         (WebCore::Position::uncheckedNextOffset): Moved from Node::NextOffset().
1384         (WebCore::Position::previous): Adapted to the above move.
1385         (WebCore::Position::next): Ditto.
1386         (WebCore::Position::upstream): Removed an isBR() check, since a non-BR element cannot have a BR renderer (I think),
1387         and BR elements are covered by editingIgnoresContent().
1388         (WebCore::Position::downstream): Ditto.
1389         (WebCore::caretMaxRenderedOffset): Moved from Node::caretMaxRenderedOffset().
1390         (WebCore::Position::rendersInDifferentPosition): Updated for the above moves.
1391
1392         * dom/PositionIterator.h: Added a comment describing this class from the original check-in.
1393         * dom/PositionIterator.cpp:
1394         (WebCore::PositionIterator::increment): Updated for the above moves.
1395         (WebCore::PositionIterator::decrement): Ditto.
1396
1397         * dom/ProcessingInstruction.h:
1398         * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::maxCharacterOffset):
1399         ProcessingInstruction was already returning true from offsetInCharacters(), but didn't override maxCharacterOffset().
1400         I think that implementing it has no actual effect, as PIs are not rendered, but it looks cleaner this way.
1401
1402         * dom/Range.cpp:
1403         (WebCore::Range::selectNodeContents):
1404         * editing/ApplyStyleCommand.cpp:
1405         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1406         (WebCore::ApplyStyleCommand::applyInlineStyle):
1407         (WebCore::maxRangeOffset):
1408         (WebCore::ApplyStyleCommand::removeInlineStyle):
1409         (WebCore::ApplyStyleCommand::splitTextAtStartIfNeeded):
1410         (WebCore::ApplyStyleCommand::splitTextAtEndIfNeeded):
1411         (WebCore::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
1412         (WebCore::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
1413         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
1414         * editing/CompositeEditCommand.cpp:
1415         (WebCore::CompositeEditCommand::insertNodeAt):
1416         (WebCore::CompositeEditCommand::positionOutsideTabSpan):
1417         * editing/DeleteSelectionCommand.cpp:
1418         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1419         * editing/InsertLineBreakCommand.cpp:
1420         (WebCore::InsertLineBreakCommand::doApply):
1421         * editing/InsertParagraphSeparatorCommand.cpp:
1422         (WebCore::InsertParagraphSeparatorCommand::doApply):
1423         * editing/InsertTextCommand.cpp:
1424         (WebCore::InsertTextCommand::insertTab):
1425         * editing/visible_units.cpp:
1426         (WebCore::previousLinePosition):
1427         (WebCore::nextLinePosition):
1428         Updated for the above moves.
1429
1430         * editing/Editor.cpp:
1431         (WebCore::Editor::advanceToNextMisspelling): Added a missing rangeCompliantEquivalent() call.
1432
1433         * editing/TextIterator.cpp:
1434         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): Changed the condition to obviously
1435         match a maxCharacterOffset() call made after it; hopefully, this doesn't break any border cases.
1436         (WebCore::SimplifiedBackwardsTextIterator::advance): Updated for the above moves.
1437
1438         * editing/htmlediting.h:
1439         * editing/htmlediting.cpp:
1440         (WebCore::canHaveChildrenForEditing): Removed a bogus comment: I don't thin BRs have a special ability to accept
1441         child nodes, other than via DOM manipulation, which is not specific to BRs.
1442         (WebCore::rangeCompliantEquivalent): Removed a check for BR, which is already covered by editingIgnoresContent().
1443         (WebCore::maxDeepOffset): Ditto.
1444         (WebCore::caretMinOffset): Moved from Node. Changed some runtime checks that seemingly cannot fail into assertions.
1445         (WebCore::caretMaxOffset): Ditto.
1446
1447         * page/EventHandler.cpp:
1448         (WebCore::EventHandler::handleMousePressEventSingleClick): Pass 0 to VisiblePosition constructor instead of
1449         caretMinOffset. I didn't want to include htmlediting.h here, and I think that VisiblePosition constructor
1450         will take care of adjusting the offset.
1451
1452         * page/Frame.cpp: (WebCore::Frame::selectionLayoutChanged): Folded Document::updateSelection() here.
1453         * page/mac/WebCoreFrameBridge.mm:
1454         (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]): Added missing rangeCompliantEquivalent() calls.
1455         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForRenderer): Changed to not round-trip via editing.
1456         Changed some runtime checks that seemingly cannot fail into assertions.
1457
1458 2007-11-11  Darin Adler  <darin@apple.com>
1459
1460         Reviewed by Sam.
1461
1462         - updated for JSRegExp function changes
1463
1464         * platform/RegularExpression.cpp:
1465         (WebCore::RegularExpression::Private::compile):
1466         (WebCore::RegularExpression::match):
1467
1468 2007-11-10  Mark Rowe  <mrowe@apple.com>
1469
1470         Qt Linux build fix.
1471
1472         * platform/UnicodeRange.h:
1473
1474 2007-11-10  Mark Rowe  <mrowe@apple.com>
1475
1476         Qt Windows build fix.
1477
1478         * platform/UnicodeRange.h:
1479
1480 2007-11-10  Nikolas Zimmermann  <zimmermann@kde.org>
1481
1482         Reviewed by Eric.
1483
1484         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15937 (Add glyph-orientation-horizontal/vertical support)
1485         Fixes: http://bugs.webkit.org/show_bug.cgi?id=13971 (text-anchor support on vertical text seems slightly off)
1486
1487         Add glyph-orientation-* support for text & textPath. (90/180/270 and 'auto')
1488         Also fix all vertical text handling - for text & textPath! (especially latin1 characters auto orientation in vertical writing modes)
1489
1490         * WebCore.pro: Add platform/UnicodeRange.cpp to build
1491         * WebCore.xcodeproj/project.pbxproj: Dito.
1492         * rendering/SVGCharacterLayoutInfo.cpp: Respect orientationShiftX/Y & angle in characterTransform()
1493         (WebCore::SVGChar::characterTransform):
1494         * rendering/SVGCharacterLayoutInfo.h: New variables.
1495         (WebCore::SVGCharOnPath::SVGCharOnPath):
1496         (WebCore::SVGChar::SVGChar):
1497         * rendering/SVGRootInlineBox.cpp: Added glyph-orientation-* handling.
1498         (WebCore::glyphOrientationToAngle):
1499         (WebCore::glyphOrientationIsMultiplyOf180Degrees):
1500         (WebCore::calculateGlyphAdvanceAndShiftRespectingOrientation):
1501         (WebCore::cummulatedHeightOfInlineBoxCharacterRange):
1502         (WebCore::cummulatedWidthOrHeightOfTextChunk):
1503         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
1504
1505 2007-11-10  Timothy Hatcher  <timothy@apple.com>
1506
1507         Reviewed by Sam Weinig.
1508
1509         * page/inspector/StylesSidebarPane.js: Fix the wording of a comment
1510           and switch over to use getUniqueProperties in another place.
1511
1512 2007-11-10  John Sullivan  <sullivan@apple.com>
1513
1514         Reviewed by Sam Weinig
1515
1516         Rest of fix for 5394877
1517
1518         * bindings/js/kjs_window.cpp:
1519         (KJS::Window::isSafeScript):
1520         Don't log unsafe JavaScript attempts in the other version of isSafeScript() if in
1521         private browsing mode either.
1522
1523 2007-11-10  Nikolas Zimmermann  <zimmermann@kde.org>
1524
1525         Reviewed by Oliver.
1526
1527         Fix function name difference - header said 'unicodeRangeForCharacter', actually
1528         implemented function is 'findCharUnicodeRange'. They are not compiled yet.
1529
1530         * platform/UnicodeRange.h:
1531
1532 2007-11-10  Dan Bernstein  <mitz@apple.com>
1533
1534         Reviewed by Darin Adler.
1535
1536         - fix <rdar://problem/5450655> Control-clicking text in a link can surprisingly select only part of the link, should select entire link
1537
1538         No test because context menu events cannot be tested in DumpRenderTree.
1539
1540         * page/EventHandler.cpp:
1541         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Added.
1542         If the click occurred in an active link, selects the entire link
1543         element. Otherwise selects the closest word.
1544         (WebCore::EventHandler::sendContextMenuEvent): Call
1545         selectClosestWordOrLinkFromMouseEvent().
1546         * page/EventHandler.h:
1547
1548 2007-11-10  John Sullivan  <sullivan@apple.com>
1549
1550         Reviewed by Tim Hatcher
1551
1552         - fixed <rdar://problem/5394877> Safari should not log unsafe JavaScript attempts when 
1553           in private browsing mode (only an issue if Log JavaScript Exceptions is turned on)
1554
1555         * bindings/js/kjs_window.cpp:
1556         (KJS::Window::isSafeScript):
1557         Don't log unsafe JavaScript attempts to console or chromeClient if in private browsing mode
1558
1559 2007-11-10  Alexey Proskuryakov  <ap@webkit.org>
1560
1561         Reviewed by Darin.
1562
1563         http://bugs.webkit.org/show_bug.cgi?id=15922
1564         Implement more of Mozilla Selection API
1565
1566         Tests: editing/selection/containsNode.html
1567                editing/selection/deleteFromDocument.html
1568                editing/selection/extend.html
1569                editing/selection/selectAllChildren.html
1570
1571         * editing/SelectionController.cpp:
1572         (WebCore::SelectionController::deleteFromDocument):
1573         (WebCore::SelectionController::containsNode):
1574         (WebCore::SelectionController::selectAllChildren):
1575         (WebCore::SelectionController::extend):
1576         * editing/SelectionController.h:
1577         Added deleteFromDocument(), containsNode(), and selectAllChildren(). Reimplemented extend(),
1578         which existed, but didn't match Firefox behavior and wasn't exposed via bindings.
1579         Removed a comment mentioning removeRange(), as this method makes no sense without multiple
1580         selection range support.
1581
1582         * page/DOMSelection.cpp:
1583         (WebCore::DOMSelection::extend):
1584         (WebCore::DOMSelection::deleteFromDocument):
1585         (WebCore::DOMSelection::containsNode):
1586         (WebCore::DOMSelection::selectAllChildren):
1587         * page/DOMSelection.h:
1588         * page/DOMSelection.idl:
1589         Exposed the new methods.
1590
1591 2007-11-10  Alexey Proskuryakov  <ap@webkit.org>
1592
1593         Reviewed by Darin.
1594
1595         http://bugs.webkit.org/show_bug.cgi?id=15892
1596         DOM Range operations are not implemented for ProcessingInstruction nodes
1597
1598         Test: fast/dom/Range/range-processing-instructions.html
1599
1600         * dom/Range.cpp:
1601         (WebCore::Range::processContents): Implemented ProcessingInstruction cases.
1602         (WebCore::Range::checkNodeWOffset): Removed a FIXME - yes, I think that we are supposed
1603         to use ProcessingInstruction.data.
1604
1605 2007-11-09  Timothy Hatcher  <timothy@apple.com>
1606
1607         Reviewed by Mark Rowe.
1608
1609         Bug 12054: Ability to serialize an element subtree (into clipboard?) from the DOM inspector
1610         http://bugs.webkit.org/show_bug.cgi?id=12054
1611
1612         - Add support code for routing copy events to the focused element.
1613         - Implement copying the currently selected DOM node. The node
1614           and it's subtree is copied to the clipboard. If the node has no
1615           outerHTML, the nodeValue is copied (text nodes, etc.)
1616         - Implement copy for the resource sidebar. The URL is copied for the
1617           currently selected resource.
1618
1619         * page/inspector/DocumentPanel.js:
1620         * page/inspector/inspector.js:
1621
1622 2007-11-09  Antti Koivisto  <antti@apple.com>
1623
1624         Reviewed by Adele.
1625
1626         Fix occasional blank video with poster attribute.
1627
1628         * ChangeLog:
1629         * html/HTMLMediaElement.cpp:
1630         (WebCore::HTMLMediaElement::load):
1631         (WebCore::HTMLMediaElement::didRestoreFromCache):
1632         Just calling updateFromElement() does the right thing for both poster image and video.
1633
1634 2007-11-04  Sam Weinig  <sam@webkit.org>
1635
1636         Reviewed by Adam Roben.
1637
1638         <rdar://problem/5435940>
1639         The COM bindings for the DOM should be autogenerated like the other DOM bindings
1640
1641         Initial commit of the autogeneration of the COM DOM Bindings.  No behavior change
1642         is being introduced in this patch and to insure that no conflicts arise, a temporary
1643         prefix of "GEN_" has been used for all the new classes.
1644
1645         The build architecture for these bindings differs slightly from the other autogenerated
1646         bindings.  Instead of building in WebCore and migrating the resuting code to WebKit (as
1647         is done for the Objective-C bindigs currently), the IDLs and generation scripts are
1648         migrated to WebKit and built there.  This is done with a series of scripts and Makefiles.
1649
1650         This commit includes:
1651             - Hand rolled root class/Interface GEN_DOMObject used to facilated object creation
1652               and ref-counting.
1653             - Generating all of the Core DOM and most of HTML and CSS
1654             - Generating Event, EventTarget, and EventListener
1655
1656         * WebCore.vcproj/MigrateIDLAndScripts.make: Added.
1657         * WebCore.vcproj/WebCore.vcproj:
1658         * WebCore.vcproj/migrate-idls.sh: Added.
1659         * bindings/scripts/CodeGenerator.pm:
1660         * bindings/scripts/CodeGeneratorCOM.pm: Added.
1661         * dom/EventListener.h: Make the isWindowEvent parameter default to false
1662         to allow autogeneration based on the IDL.
1663
1664 2007-11-09  Tristan O'Tierney  <tristan@apple.com>
1665
1666         Reviewed by Timothy Hatcher.
1667         
1668         This patch is for the WebKit side of <rdar://problem/5591115>.
1669         We need a way to tell context menu navigations, such as "Open in New Window"
1670         to override any sort of browser preference for tab based navigation.
1671
1672         * bridge/WindowFeatures.h:
1673         (WebCore::WindowFeatures::WindowFeatures):
1674         Added a new struct member var, preferredType
1675         and an accompanying enum type PreferredType
1676         to send a window type recommendation up to the Chrome. 
1677         
1678         * page/ContextMenuController.cpp:
1679         (WebCore::openNewWindow):
1680         Set the window features to recommend a new Window for
1681         "Open in New Window" context menu action.
1682
1683 2007-11-08  Adam Roben  <aroben@apple.com>
1684
1685         Fix <rdar://5483519> Pressing Enter on selected buttons should fire onclick
1686
1687         We now match the behavior of Firefox and IE, which is to always just
1688         send a click event to the focused button when the Enter key is pressed
1689         (previously we were submitting forms directly in some cases).
1690
1691         Reviewed by Adele.
1692
1693         Test: fast/forms/enter-clicks-buttons.html
1694
1695         * html/HTMLButtonElement.cpp:
1696         (WebCore::HTMLButtonElement::defaultEventHandler): Don't do anything
1697         fancy when Enter is pressed on a <button type=button> -- just send a
1698         click event like we do for other button types.
1699         * html/HTMLInputElement.cpp:
1700         (WebCore::HTMLInputElement::defaultEventHandler): Treat type=button
1701         the same way we treat type=submit and type=reset: just send a click
1702         event when Enter is pressed.
1703
1704 2007-11-09  Dan Bernstein  <mitz@apple.com>
1705
1706         Reviewed by Antti Koivisto.
1707
1708         - fix a bug in invisible layer culling: dynamically changing a 
1709           descendant of an invisible layer to be visible did not work
1710
1711         Test: fast/layers/layer-content-visibility-change.html
1712
1713         * rendering/RenderLayer.cpp:
1714         (WebCore::RenderLayer::setHasVisibleContent): If we got visible content,
1715         make sure that our stacking context rebuilds its z-order lists to
1716         include us.
1717
1718 2007-11-09  David Hyatt  <hyatt@apple.com>
1719
1720         Clean up matrix() parsing.  Make sure the first four arguments can be lengths or numbers.  The last two
1721         args can be lengths or numbers or percents.
1722
1723         Reviewed by Beth
1724
1725         * WebCore.xcodeproj/project.pbxproj:
1726         * css/CSSParser.cpp:
1727         (WebCore::TransformOperationInfo::TransformOperationInfo):
1728         (WebCore::CSSParser::parseTransform):
1729         * rendering/RenderStyle.h:
1730         (WebCore::MatrixTransformOperation::apply):
1731
1732 2007-11-09  Beth Dakin  <bdakin@apple.com>
1733
1734         Reviewed by Oliver.
1735
1736         Fix for <rdar://problem/5586370> CSS Transform - incorrect matrix 
1737         math leads to crazy problems
1738
1739         Transform matrices accept the first four parameters as CSS lengths. 
1740         CSS lengths get mapped into WebCore::Lengths as percents by 
1741         WebCore::convertToLength(). Percent lengths cannot call value(). It 
1742         does not yield a correct result and it asserts on Debug builds. 
1743
1744         * rendering/RenderStyle.h:
1745         (WebCore::MatrixTransformOperation::apply): Instead of calling 
1746         value() on the lengths, call calcValue. This fixes the assert and 
1747         the bad rendering. 
1748
1749 2007-11-09  Simon Hausmann  <hausmann@kde.org>
1750
1751         Reviewed by nobody, build/link fix for Qt/Windows.
1752
1753         userIdleTime() is stubbed in win/SystemTimeWin.cpp, so don't
1754         define it twice.
1755
1756         * platform/qt/TemporaryLinkStubs.cpp:
1757
1758 2007-11-09  Simon Hausmann  <hausmann@kde.org>
1759
1760         Reviewed by Holger.
1761
1762         Fix ContextMenu allocation in the Qt port.
1763
1764         Store all items and submenus value based in ContextMenu and ContextMenuItem.
1765         That fixes the crashes when the context menu was populated with sub-menus because
1766         of the use of temporary ContextMenu objects like this:
1767
1768         ContextMenu subMenu(...);
1769         subMenu.appendItem(...);
1770         subMenu.appendItem(...);
1771
1772         subMenuItem.setSubMenu(&subMenu); // temporary pointer, need to _copy_ contents
1773
1774         * platform/ContextMenu.h:
1775         * platform/ContextMenuItem.h:
1776         * platform/PlatformMenuDescription.h:
1777         * platform/qt/ContextMenuItemQt.cpp:
1778         (WebCore::ContextMenuItem::ContextMenuItem):
1779         (WebCore::ContextMenuItem::platformSubMenu):
1780         * platform/qt/ContextMenuQt.cpp:
1781         (WebCore::ContextMenu::ContextMenu):
1782         (WebCore::ContextMenu::~ContextMenu):
1783         (WebCore::ContextMenu::appendItem):
1784         (WebCore::ContextMenu::itemCount):
1785
1786 2007-11-09  Peter Kasting  <zerodpx@gmail.com>
1787
1788         Reviewed by Mark Rowe.
1789
1790         http://bugs.webkit.org/show_bug.cgi?id=15909
1791         Malformed GIFs should not result in memory corruption.
1792
1793         * platform/image-decoders/gif/GIFImageDecoder.cpp:
1794         (WebCore::GIFImageDecoder::haveDecodedRow):
1795
1796 2007-11-08  Timothy Hatcher  <timothy@apple.com>
1797
1798         Reviewed by Sam Weinig.
1799
1800         Some Web Inspector CSS editing changes.
1801         - Only delete the property if all the text is delete or the new user input correctly parses.
1802           This prevents deleting the existing property if the new text is invalid.
1803         - Intercept the Escape key and cancel editing, not saving any changes.
1804
1805         * page/inspector/StylesSidebarPane.js:
1806
1807 2007-11-08  Kevin Ollivier  <kevino@theolliviers.com>
1808
1809         Bakefiles for building WebCore, needed by wx port.
1810
1811         Reviewed by Mark Rowe.
1812
1813         * WebCoreSources.bkl: Added.
1814         * webcore-base.bkl: Added.
1815         * webcore-wx.bkl: Added.
1816
1817 2007-11-08  Justin Haygood  <jhaygood@reaktix.com>
1818
1819         Reviewed by Mark Rowe.
1820
1821         http://bugs.webkit.org/show_bug.cgi?id=15905
1822
1823         Fix builds with HTML 5 Storage support disabled.
1824         ENABLE(DATABASE) needs to be added in a few places.
1825
1826         * page/InspectorController.cpp:
1827         * storage/Database.h:
1828
1829 2007-11-08  Steve Falkenburg  <sfalken@apple.com>
1830
1831         <rdar://problem/5524082> Allow images to be dragged out directly into other apps
1832         
1833         We weren't including CF_HDROP in our image drops.  This broke drag of
1834         images out of the browser window directly into other apps (examples
1835         include notepad, mspaint, msword).
1836         
1837         Reviewed by Oliver, Ada.
1838
1839         * platform/win/ClipboardWin.cpp:
1840         (WebCore::createGlobalImageFileContent): Removed unused variable.
1841         (WebCore::createGlobalHDropContent): Added
1842         (WebCore::writeFileToDataObject): Write HDROP data if available.
1843         (WebCore::writeImageToDataObject): Write HDROP for dragged images.
1844         (WebCore::ClipboardWin::writeURL): Don't write HDROP for dragged URLs.
1845
1846 2007-11-08  Xan Lopez  <xan@gnome.org>
1847
1848         Reviewed by Alp.
1849
1850         http://bugs.webkit.org/show_bug.cgi?id=15908
1851         Use g_object_ref_sink when available
1852
1853         * platform/gtk/PopupMenuGtk.cpp:
1854         (WebCore::PopupMenu::show):
1855         * platform/gtk/ScrollViewGtk.cpp:
1856         (WebCore::ScrollView::setGtkAdjustments):
1857
1858 2007-11-08  Dan Bernstein  <mitz@apple.com>
1859
1860         Reviewed by Beth Dakin.
1861
1862         - fix <rdar://problem/5491922> REGRESSION (Safari 2-3): Flash-based "Cash Optimizer" on etrade.com does not draw completely
1863
1864         Test: fast/dom/length-attribute-mapping.html
1865
1866         * dom/StyledElement.cpp:
1867         (WebCore::StyledElement::addCSSLength): Changed the garbage-stripping
1868         logic to stop after the first "%" or "*" in the string. This allows for
1869         "100%25" to be mapped to "100%" like it is in Firefox and WinIE.
1870
1871 2007-11-08  Kevin McCullough  <kmccullough@apple.com>
1872
1873         - Build fix.
1874
1875         * loader/FrameLoaderClient.h:
1876         * platform/graphics/svg/SVGImageEmptyClients.h:
1877         (WebCore::SVGEmptyFrameLoaderClient::windowObjectCleared):
1878
1879 2007-11-08  Kevin McCullough  <kmccullough@apple.com>
1880
1881         Reviewed by Sam.
1882
1883         - windowObjectCleared() is no longer const.  It needs to setup the
1884         script debugger and cannot be const to do so.
1885
1886         * loader/FrameLoaderClient.h:
1887         * platform/graphics/svg/SVGImageEmptyClients.h:
1888         (WebCore::SVGEmptyFrameLoaderClient::windowObjectCleared):
1889
1890 2007-11-08  Adam Roben  <aroben@apple.com>
1891
1892         Hopeful Windows build fix
1893
1894         * rendering/RenderObject.cpp: Touch this file to make it recompile.
1895
1896 2007-11-08  Sam Weinig  <sam@webkit.org>
1897
1898         Reviewed by Darin.
1899
1900         Convert JavaScript internal function objects to use one class per
1901         function.  This avoids a switch statement inside what used to be
1902         the shared function classes and will allow Shark to better analyze
1903         the code.
1904
1905         To make this switch, the value property of the HashEntry was changed
1906         to a union of an intptr_t (which is used to continue handle valueGetters)
1907         and function pointer which points to a static constructor for the
1908         individual new function objects.
1909
1910         SunSpider claims this is a 1.0% speedup.
1911
1912         - On the WebCore side, I updated CodeGeneratorJS.pm to generate the
1913           new classes and hand updated the remain non-generated (groan) classes.
1914
1915         * bindings/js/JSDOMWindowCustom.cpp:
1916         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1917         * bindings/js/JSEventTargetNode.cpp:
1918         (WebCore::JSEventTargetNodePrototypeFunctionAddEventListener::callAsFunction):
1919         (WebCore::JSEventTargetNodePrototypeFunctionRemoveEventListener::callAsFunction):
1920         (WebCore::JSEventTargetNodePrototypeFunctionDispatchEvent::callAsFunction):
1921         * bindings/js/JSEventTargetNode.h:
1922         * bindings/js/JSHTMLInputElementBase.cpp:
1923         (WebCore::JSHTMLInputElementBaseFunctionSetSelectionRange::callAsFunction):
1924         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
1925         * bindings/js/JSHTMLInputElementBase.h:
1926         (WebCore::JSHTMLInputElementBase::):
1927         * bindings/js/JSXMLHttpRequest.cpp:
1928         (KJS::JSXMLHttpRequestPrototypeFunctionAbort::callAsFunction):
1929         (KJS::JSXMLHttpRequestPrototypeFunctionGetAllResponseHeaders::callAsFunction):
1930         (KJS::JSXMLHttpRequestPrototypeFunctionGetResponseHeader::callAsFunction):
1931         (KJS::JSXMLHttpRequestPrototypeFunctionOpen::callAsFunction):
1932         (KJS::JSXMLHttpRequestPrototypeFunctionSend::callAsFunction):
1933         (KJS::JSXMLHttpRequestPrototypeFunctionSetRequestHeader::callAsFunction):
1934         (KJS::JSXMLHttpRequestPrototypeFunctionOverrideMIMEType::callAsFunction):
1935         (KJS::JSXMLHttpRequestPrototypeFunctionAddEventListener::callAsFunction):
1936         (KJS::JSXMLHttpRequestPrototypeFunctionRemoveEventListener::callAsFunction):
1937         (KJS::JSXMLHttpRequestPrototypeFunctionDispatchEvent::callAsFunction):
1938         * bindings/js/JSXMLHttpRequest.h:
1939         (KJS::JSXMLHttpRequest::impl):
1940         * bindings/js/JSXSLTProcessor.cpp:
1941         (KJS::JSXSLTProcessorPrototypeFunctionImportStylesheet::callAsFunction):
1942         (KJS::JSXSLTProcessorPrototypeFunctionTransformToFragment::callAsFunction):
1943         (KJS::JSXSLTProcessorPrototypeFunctionTransformToDocument::callAsFunction):
1944         (KJS::JSXSLTProcessorPrototypeFunctionSetParameter::callAsFunction):
1945         (KJS::JSXSLTProcessorPrototypeFunctionGetParameter::callAsFunction):
1946         (KJS::JSXSLTProcessorPrototypeFunctionRemoveParameter::callAsFunction):
1947         (KJS::JSXSLTProcessorPrototypeFunctionClearParameters::callAsFunction):
1948         (KJS::JSXSLTProcessorPrototypeFunctionReset::callAsFunction):
1949         * bindings/js/JSXSLTProcessor.h:
1950         * bindings/js/kjs_events.cpp:
1951         (WebCore::JSClipboardPrototypeFunctionClearData::callAsFunction):
1952         (WebCore::JSClipboardPrototypeFunctionGetData::callAsFunction):
1953         (WebCore::JSClipboardPrototypeFunctionSetData::callAsFunction):
1954         (WebCore::JSClipboardPrototypeFunctionSetDragImage::callAsFunction):
1955         * bindings/js/kjs_events.h:
1956         * bindings/js/kjs_navigator.cpp:
1957         (KJS::Plugins::):
1958         (KJS::Navigator::getOwnPropertySlot):
1959         (KJS::Plugins::getOwnPropertySlot):
1960         (KJS::PluginsFunctionRefresh::callAsFunction):
1961         (KJS::NavigatorProtoFuncJavaEnabled::callAsFunction):
1962         * bindings/js/kjs_navigator.h:
1963         (KJS::Navigator::):
1964         * bindings/js/kjs_window.cpp:
1965         (KJS::Window::getOwnPropertySlot):
1966         (KJS::Window::put):
1967         (KJS::WindowProtoFuncAToB::callAsFunction):
1968         (KJS::WindowProtoFuncBToA::callAsFunction):
1969         (KJS::WindowProtoFuncOpen::callAsFunction):
1970         (KJS::WindowProtoFuncScrollBy::callAsFunction):
1971         (KJS::WindowProtoFuncScrollTo::callAsFunction):
1972         (KJS::WindowProtoFuncMoveBy::callAsFunction):
1973         (KJS::WindowProtoFuncMoveTo::callAsFunction):
1974         (KJS::WindowProtoFuncResizeBy::callAsFunction):
1975         (KJS::WindowProtoFuncResizeTo::callAsFunction):
1976         (KJS::WindowProtoFuncSetTimeout::callAsFunction):
1977         (KJS::WindowProtoFuncClearTimeout::callAsFunction):
1978         (KJS::WindowProtoFuncSetInterval::callAsFunction):
1979         (KJS::WindowProtoFuncAddEventListener::callAsFunction):
1980         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
1981         (KJS::WindowProtoFuncShowModalDialog::callAsFunction):
1982         (KJS::WindowProtoFuncNotImplemented::callAsFunction):
1983         (KJS::Location::getOwnPropertySlot):
1984         (KJS::Location::put):
1985         (KJS::LocationProtoFuncReplace::callAsFunction):
1986         (KJS::LocationProtoFuncReload::callAsFunction):
1987         (KJS::LocationProtoFuncAssign::callAsFunction):
1988         (KJS::LocationProtoFuncToString::callAsFunction):
1989         * bindings/js/kjs_window.h:
1990         (KJS::Window::):
1991         * bindings/scripts/CodeGeneratorJS.pm:
1992
1993 2007-11-08  Mark Rowe  <mrowe@apple.com>
1994
1995         Fix the Gtk, Qt and Wx builds.
1996
1997         * platform/gtk/TemporaryLinkStubs.cpp:
1998         * platform/qt/TemporaryLinkStubs.cpp:
1999         * platform/wx/TemporaryLinkStubs.cpp:
2000
2001 2007-11-08  Mark Rowe  <mrowe@apple.com>
2002
2003         Not reviewed.  Fix two instances of includes using the wrong case in the filename.
2004
2005         * platform/graphics/mac/MoviePrivateQTKit.mm:
2006         * platform/wx/MimeTypeRegistryWx.cpp:
2007
2008 2007-11-08  Darin Adler  <darin@apple.com>
2009
2010         Reviewed by Adam.
2011
2012         - fix <rdar://problem/5552943> accesskey does not focus <button> elements
2013
2014         Test: fast/forms/access-key.html
2015
2016         * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::accessKeyAction):
2017         Added a call to focus.
2018
2019 2007-11-07  Darin Adler  <darin@apple.com>
2020
2021         Reviewed by Steve.
2022
2023         - cut down on notImplemented() functions on Windows
2024
2025         * bridge/AXObjectCache.h: Put #if around the accessibility
2026         global.
2027
2028         * bridge/win/FrameWin.cpp: (WebCore::Frame::setNeedsReapplyStyles):
2029         Moved here from TemporaryLinkStubs.
2030
2031         * dom/Document.cpp: (WebCore::Document::lastModified): Re-implemented
2032         using the ResourceResponse that's now available from the DocumentLoader.
2033
2034         * editing/JSEditor.cpp: (execTranspose): Changed to call transpose() on
2035         the Editor instead of the obsolete one on the Frame.
2036
2037         * loader/DocumentLoader.h: Removed getResponseModifiedHeader.
2038         * loader/FrameLoader.h: Removed overrideMediaType.
2039
2040         * loader/gtk/DocumentLoaderGtk.cpp: Removed.
2041         * loader/mac/DocumentLoaderMac.mm: Removed.
2042         * loader/qt/DocumentLoaderQt.cpp: Removed.
2043
2044         * page/Frame.cpp: Removed transpose.
2045         * page/Frame.h: Ditto.
2046         * page/FrameView.h: Removed updateBorder.
2047         * page/gtk/FrameGtk.cpp: Removed issueTransposeCommand.
2048         * page/mac/FrameMac.mm: Ditto.
2049         * page/mac/WebCoreFrameBridge.h: Removed issueTransposeCommand and
2050         overrideMediaType.
2051         * page/qt/FrameQt.cpp: Removed issueTransposeCommand.
2052
2053         * platform/gtk/TemporaryLinkStubs.cpp: Removed gAccessibilityEnabled.
2054         * platform/qt/TemporaryLinkStubs.cpp: Ditto.
2055         * platform/win/TemporaryLinkStubs.cpp: Removed or moved all but 3 of the stubs.
2056         * platform/wx/TemporaryLinkStubs.cpp: Removed gAccessibilityEnabled,
2057         issueTransposeCommand, and overrideMediaType.
2058
2059         * platform/network/cf/ResourceHandleCFNet.cpp:
2060         (WebCore::ResourceHandle::loadsBlocked): Moved here from TemporaryLinkStubs.
2061         (WebCore::ResourceHandle::willLoadFromCache): Ditto.
2062         * platform/win/GraphicsContextWin.cpp:
2063         (WebCore::GraphicsContextPlatformPrivate::clip): Ditto.
2064         * platform/win/ScrollViewWin.cpp: (WebCore::ScrollView::inWindow): Ditto.
2065         * platform/win/SystemTimeWin.cpp: (WebCore::userIdleTime): Ditto.
2066         * platform/win/WidgetWin.cpp: (WebCore::Widget::setIsSelected): Ditto.
2067
2068         * WebCore.pro: Updated for removed files.
2069         * WebCore.xcodeproj/project.pbxproj: Updated for removed file.
2070
2071 2007-11-08  Mark Rowe  <mrowe@apple.com>
2072
2073        Build fix for case-sensitive file systems.  Fix case of file names
2074        in #include's.
2075
2076         * html/HTMLMediaElement.cpp:
2077         * platform/graphics/Movie.cpp:
2078
2079 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2080
2081         Reviewed by Lars Knoll <lars@trolltech.com>.
2082
2083         Remove some warnings about not implemented methods.
2084
2085         * ResourceHandle::loadsBlocked and ResourceHandle::supportsBufferedData are
2086         specific to the NS API and won't be implemented on Qt.
2087         * ResourceHandle::bufferedData can not be reached as we return false in
2088         ResourceHandle::supportsBufferedData.
2089
2090
2091         * platform/network/qt/ResourceHandleQt.cpp:
2092         (WebCore::ResourceHandle::supportsBufferedData):
2093
2094 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2095
2096         Reviewed by Lars Knoll <lars@trolltech.com>.
2097
2098         Cleanup checking for the request method.
2099
2100         * Check the request method only in QWebNetworkManager::add.
2101         * Currently HEAD, GET, POST are allowed and for everything else
2102         QWebNetworkManager::add returns false.
2103         * Returning false is compatible with ResourceHandle::start and it
2104         can be used in ResourceHandle::loadResourceSynchronously to generate
2105         a ResourceError
2106
2107
2108         * platform/network/qt/ResourceHandleQt.cpp:
2109         (WebCore::ResourceHandle::start):
2110         (WebCore::ResourceHandle::loadResourceSynchronously):
2111
2112 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2113
2114         Reviewed by Lars Knoll <lars@trolltech.com>.
2115
2116         Implement WebCore::callOnMainThread
2117
2118         Implemented using a global QObject, that is moved to the main thread
2119         and then sending a custom event to it.
2120         Picked a number below QEvent::User but above any other documented value.
2121
2122
2123         * platform/qt/ThreadingQt.cpp:
2124         (WebCore::PerformFunctionEvent::PerformFunctionEvent):
2125         (WebCore::MainThreadInvoker::MainThreadInvoker):
2126         (WebCore::MainThreadInvoker::event):
2127         (WebCore::callOnMainThread):
2128
2129 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2130
2131         Reviewed by Lars Knoll <lars@trolltech.com>.
2132
2133         Avoid problems with calling QPainter::begin() on an already active paintdevice
2134
2135         * Partial pick from 6200e04c3e0a77873c3b3f3969b65bc701020326 to avoid getting
2136         crashes on Qt/Mac 4.4 with QPainter::begin to fail because we already draw.
2137         * If we are in a layout or need one do not paint. This can happen for the PlatformScrollBar
2138         used by the ScrollView on a layout triggered by QWebPage::paintEvent.
2139
2140
2141         * platform/qt/WidgetQt.cpp:
2142         (WebCore::Widget::invalidateRect):
2143
2144 2007-11-08  Eric Seidel  <eric@webkit.org>
2145
2146         No review.
2147
2148         * ksvg2/svg/SVGPathElement.h: remove old comment
2149
2150 2007-11-07  Antti Koivisto  <antti@apple.com>
2151
2152         Reviewed by Ollie.
2153
2154         Ensure video renderer has correct size if video has already been loaded
2155         when it is constructed.
2156
2157         * rendering/RenderVideo.cpp:
2158         (WebCore::RenderVideo::RenderVideo):
2159
2160 2007-11-07  Antti Koivisto  <antti@apple.com>
2161
2162         Reviewed by Ollie.
2163
2164         Ensure video is visible when it should be.
2165
2166         * rendering/RenderVideo.cpp:
2167         (WebCore::RenderVideo::updateMovie):
2168
2169 2007-11-07  Dan Bernstein  <mitz@apple.com>
2170
2171         Reviewed by Darin Adler.
2172
2173         - fix <rdar://problem/5523503> Safari crashes clicking scroll bar in FaceBook 'Trips'
2174
2175         Layers and listboxes are two kinds of ScrollBarClient that can be
2176         removed while the scrollbar is tracking the mouse. The scrollbar is not
2177         destroyed until later, and meanwhile it can try to call the client,
2178         which results in a crash.
2179
2180         * manual-tests/stale-scrollbar-client-crash.html: Added.
2181         * platform/ScrollBar.h:
2182         (WebCore::Scrollbar::setClient): Added.
2183         * rendering/RenderLayer.cpp:
2184         (WebCore::RenderLayer::destroyScrollbar): Call Scrollbar::setClient().
2185         * rendering/RenderListBox.cpp:
2186         (WebCore::RenderListBox::~RenderListBox): Ditto.
2187
2188 2007-11-07  Adam Roben  <aroben@apple.com>
2189
2190         Fix <rdar://5569268> Crash when opening any FTP site in second tab/window
2191
2192         Reviewed by Sam.
2193
2194         No test possible.
2195
2196         * platform/win/SharedBufferWin.cpp:
2197         (WebCore::SharedBuffer::createWithContentsOfFile): Bail if we get an
2198         empty path, because _wfopen_s will crash if we pass it a null pointer.
2199
2200 2007-11-07  David Kilzer  <ddkilzer@apple.com>
2201
2202         WebKit confuses width/height for Media Queries device-aspect-ratio evaluation
2203         <http://bugs.webkit.org/show_bug.cgi?id=14893>
2204         <rdar://problem/5380295>
2205
2206         Reviewed by Darin.
2207
2208         Tests: fast/css/device-aspect-ratio.html
2209                fast/css/max-device-aspect-ratio.html
2210                fast/css/min-device-aspect-ratio.html
2211
2212         * css/MediaQueryEvaluator.cpp:
2213         (WebCore::parseAspectRatio): Renamed method parameters from a/b to h/v.
2214         (WebCore::device_aspect_ratioMediaFeatureEval): Renamed local variables from
2215         a/b to h/v.  Switched first two arguments of the call to cmpvalue() to fix
2216         the bug.
2217
2218 2007-11-07  Dan Bernstein  <mitz@apple.com>
2219
2220         Reviewed by Dave Hyatt.
2221
2222         - fix http://bugs.webkit.org/show_bug.cgi?id=15887
2223           REGRESSION (r27576): Crash in RenderStyle::affectedByHoverRules clicking link on Digg
2224
2225         Test: fast/css/display-none-inline-style-change-crash.html
2226
2227         * dom/Element.cpp:
2228         (WebCore::Element::recalcStyle): Fixed the crash by null-checking
2229         the current style and removed other checks that are not strictly
2230         necessary.
2231
2232 2007-11-07  Brady Eidson  <beidson@apple.com>
2233
2234         Rubberstamped by Sam
2235
2236         Remove FrameLoaderClient methods from SVG that were pruned awhile ago
2237
2238         * platform/graphics/svg/SVGImageEmptyClients.h:
2239
2240 2007-11-07  Dan Bernstein  <mitz@apple.com>
2241
2242         Reviewed by Darin Adler.
2243
2244         - fix a bug where CSS rules with :hover in the ancestor chain stopped
2245           working after changing the inline style declaration of the ancestor
2246
2247         Test: fast/css/affected-by-hover-after-style-change.html
2248
2249         * dom/Element.cpp:
2250         (WebCore::Element::recalcStyle): If we are not forcing style
2251         recalculation for all descendants, preserve any "affected by
2252         {hover|active|drag} bits that we may have acquired from them.
2253         Also renamed _style to currentStyle.
2254
2255 2007-11-06  Timothy Hatcher  <timothy@apple.com>
2256
2257         Reviewed by Adam.
2258
2259         Bug 11920: Web Inspector should have Firebug-like CSS editing
2260         http://bugs.webkit.org/show_bug.cgi?id=11920
2261
2262         * css/CSSComputedStyleDeclaration.h:
2263           (WebCore::CSSComputedStyleDeclaration::isPropertyImplicit): Return false. I'm not sure why
2264           this was true, but computed style has no concept of implicit. So false makes more sense
2265           and makes the code simpler in the inspector. This function was added for the inspector,
2266           so this isn't a compatibility change.
2267         * page/inspector/PropertiesSection.js: Add a getter/setter to reset populated status.
2268         * page/inspector/StylesSidebarPane.js: Some refactoring along with the main support for
2269           style editing.
2270         * page/inspector/inspector.css: Style changes for propery editing and focus correctness.
2271         * page/inspector/inspector.js: Look for a handleKeyEvent function of the focus element before
2272           trying to call a function based on the element's id. Call focused and blurred on the focused
2273           element when currentFocusElement is changed. Use the new listItemElement getter instead of
2274           the private property.
2275         * page/inspector/treeoutline.js: No longer expand on double click if ondblclick is implemented.
2276           Shrink the toggle zone to 10px to better match the size of the arrow. Add an onattach call
2277           to allow generation of the title using the DOM element. Add listItemElement and
2278           childrenListElement getters.
2279         * page/inspector/utilities.js: Add new helper prototype methods on CSSStyleDeclaration.
2280         * page/inspector/DocumentPanel.js: Use the new listItemElement getter instead of the private
2281           property. Also expand the DOM node on double click now that the TreeOutline dosen't do it.
2282         * page/inspector/Resource.js: Use the new listItemElement and childrenListElement getters
2283           instead of the private properties.
2284
2285 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2286
2287         Reviewed by Alexey Proskuryakov.
2288
2289         Coding style fix, don't use inline explicitly.
2290
2291         * bridge/WindowFeatures.h:
2292
2293 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2294
2295         Reviewed by Maciej.
2296
2297         For safety provide a default constructor for WindowFeatures().
2298         ContextMenuController.cpp: createNewWindow as well as QWebPage need to
2299         create a default initialized WindowFeatures object on the fly.
2300
2301         * bridge/WindowFeatures.h:
2302         (WebCore::WindowFeatures::WindowFeatures):
2303
2304 2007-11-07  Simon Hausmann  <shausman@trolltech.com>
2305
2306         Reviewed by Lars.
2307
2308         Fix "nmake clean" for the Qt/Windows build by replacing tmp/ with a variable that ends with the correct type of slash/backslash depending on the choice of compiler/make tool.
2309
2310         * WebCore.pro:
2311
2312 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2313
2314         Reviewed by Lars.
2315
2316         Made the QWebSettings::webGraphic functions static. The implementation was using QWebSettings::global() anyway.
2317
2318         * platform/graphics/qt/ImageQt.cpp:
2319         (loadResourcePixmap):
2320
2321 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2322
2323         Reviewed by Lars.
2324
2325         Moved the WebCore::Image specific function loadResourcePixmap from qwebsettings.cpp to ImageQt.cpp and made it static.
2326
2327         * platform/graphics/qt/ImageQt.cpp:
2328         (loadResourcePixmap):
2329
2330 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2331
2332         Reviewed by Lars.
2333
2334         Restructure the context menu classes for the Qt port. ContextMenu and ContextMenuItem don't store
2335         QActions/QMenus anymore but just store the action type, tag, title and optionally submenu as created
2336         in ContextMenu::populate().
2337         For the actual Qt context menu we traverse this structure after sendContextMenuEvent and create a QMenu
2338         out of it. That menu is currently not functional anymore though.
2339
2340         * platform/ContextMenu.h:
2341         * platform/ContextMenuItem.h:
2342         (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
2343         * platform/PlatformMenuDescription.h:
2344         * platform/qt/ContextMenuItemQt.cpp:
2345         (WebCore::ContextMenuItem::ContextMenuItem):
2346         (WebCore::ContextMenuItem::type):
2347         (WebCore::ContextMenuItem::setType):
2348         (WebCore::ContextMenuItem::action):
2349         (WebCore::ContextMenuItem::setAction):
2350         (WebCore::ContextMenuItem::title):
2351         (WebCore::ContextMenuItem::setTitle):
2352         (WebCore::ContextMenuItem::platformSubMenu):
2353         (WebCore::ContextMenuItem::setSubMenu):
2354         (WebCore::ContextMenuItem::setChecked):
2355         (WebCore::ContextMenuItem::setEnabled):
2356         * platform/qt/ContextMenuQt.cpp:
2357         (WebCore::ContextMenu::ContextMenu):
2358         (WebCore::ContextMenu::~ContextMenu):
2359         (WebCore::ContextMenu::appendItem):
2360         (WebCore::ContextMenu::itemCount):
2361         (WebCore::ContextMenu::insertItem):
2362         (WebCore::ContextMenu::setPlatformDescription):
2363         (WebCore::ContextMenu::platformDescription):
2364
2365 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2366
2367         Reviewed by Lars.
2368
2369         Changed ContextMenu::setPlatformDescription for the Qt port to not show the qmenu right away
2370         but instead just behave as a normal setter that takes ownership of the platform menu description (the qmenu).
2371         Instead now QWebPage::contextMenuEvent() retrieves the QMenu after calling sendContextMenuEvent and calls exec()
2372         on it.
2373
2374         * platform/qt/ContextMenuQt.cpp:
2375
2376 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2377
2378         Reviewed by Lars.
2379
2380         Changed to PlatformMouseEvent constructor to allow construction from a QContextMenuEvent.
2381         Call sendContextMenuEvent on the event handler from a QWidget::contextMenuEvent re-implementation instead of in mousePressEvent.
2382
2383         * platform/PlatformMouseEvent.h:
2384         * platform/qt/PlatformMouseEventQt.cpp:
2385         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2386
2387 2007-11-07  Lars Knoll  <lars@trolltech.com>
2388
2389         Reviewed by Simon.
2390
2391         don't put nbsp's into the plan text paste
2392         
2393         Fix both ClipboardQt and PasteboardQt to replace
2394         nbsp's with spaces before putting the text onto the
2395         native clipboard. This is consistent with Mac and Win
2396         and fixes at least editing/pasteboard/4076267-3.html
2397
2398         * platform/qt/ClipboardQt.cpp:
2399         (WebCore::ClipboardQt::writeRange):
2400         * platform/qt/PasteboardQt.cpp:
2401         (WebCore::Pasteboard::writeSelection):
2402
2403 2007-11-07  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2404
2405         Reviewed by Lars Knoll <lars@trolltech.com>.
2406
2407         Implement Pasteboard::writeImage()
2408         
2409         * Pasteboard is now fully implemented. Copying of Images into the Clipboard
2410         is now supported.
2411         * As with URLs we only copy into the Clipboard (and not additionally to the
2412         Selection)
2413         
2414
2415         WARNING: NO TEST CASES ADDED OR CHANGED
2416
2417         * platform/qt/PasteboardQt.cpp:
2418         (WebCore::Pasteboard::writeImage):
2419
2420 2007-11-07  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2421
2422         Reviewed by Lars Knoll <lars@trolltech.com>.
2423
2424         Apple CodingStyle fixes
2425         
2426
2427         WARNING: NO TEST CASES ADDED OR CHANGED
2428
2429         * platform/qt/PasteboardQt.cpp:
2430         (WebCore::Pasteboard::documentFragment):
2431
2432 2007-11-07  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2433
2434         Reviewed by Lars Knoll <lars@trolltech.com>.
2435
2436         Implement Pasteboard::writeURL()
2437         * The URL currently gets written as text/plain and text/uri-list.
2438         The win and mac port have some more types which we currently do
2439         not support. When supporting them we can use the 'titleString'
2440         as well.
2441         * As with writeSelection we only copy into the Clipboard. We could
2442         consider copying into the Selection as well.
2443         
2444
2445         WARNING: NO TEST CASES ADDED OR CHANGED
2446
2447         * platform/qt/PasteboardQt.cpp:
2448         (WebCore::Pasteboard::writeURL):
2449
2450 2007-11-07  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2451
2452         Reviewed by Lars Knoll <lars@trolltech.com>.
2453
2454         Kill whitespace
2455         
2456
2457         WARNING: NO TEST CASES ADDED OR CHANGED
2458
2459         * platform/qt/PasteboardQt.cpp:
2460         (WebCore::Pasteboard::documentFragment):
2461
2462 2007-11-07  Lars Knoll  <lars@trolltech.com>
2463
2464         Reviewed by Simon.
2465
2466         Use the correct function calls to convert a selection to
2467         HTML or plain text.
2468
2469         WARNING: NO TEST CASES ADDED OR CHANGED
2470
2471         * platform/qt/ClipboardQt.cpp:
2472         (WebCore::ClipboardQt::setData):
2473         (WebCore::ClipboardQt::writeRange):
2474         * platform/qt/PasteboardQt.cpp:
2475         (WebCore::Pasteboard::writeSelection):
2476
2477 2007-11-07  Lars Knoll  <lars@trolltech.com>
2478
2479         Reviewed by Simon.
2480
2481         Some more clipboard fixes.
2482         
2483         We have to set things immediately on the QClipBoard if the
2484         Clipboard object is not for dragging.
2485         
2486         This is due to the fact that the Clipboard object might be
2487         rather long lived if accessed through javascript (it'll only
2488         get deleted by JS garbage collection). We have to transfer
2489         the data over to the QClipboard before that to make things work.
2490         
2491         Fixes editing/execCommand/copy-without-selection.html
2492
2493         * platform/qt/ClipboardQt.cpp:
2494         (WebCore::ClipboardQt::ClipboardQt):
2495         (WebCore::ClipboardQt::~ClipboardQt):
2496         (WebCore::ClipboardQt::clearData):
2497         (WebCore::ClipboardQt::clearAllData):
2498         (WebCore::ClipboardQt::getData):
2499         (WebCore::ClipboardQt::setData):
2500         (WebCore::ClipboardQt::declareAndWriteDragImage):
2501         (WebCore::ClipboardQt::writeURL):
2502         (WebCore::ClipboardQt::writeRange):
2503
2504 2007-11-07  Simon Hausmann  <hausmann@kde.org>
2505
2506         Reviewed by Mark.
2507
2508         Fix compilation on Windows with non-cygwin perl. open FILE, "|-" is
2509         not supported due to implicit forks, use IPC::Open2 instead.
2510
2511         * bindings/scripts/IDLParser.pm:
2512
2513 2007-11-07  Dan Bernstein  <mitz@apple.com>
2514
2515         Reviewed by Brady Eidson.
2516
2517         - fix http://bugs.webkit.org/show_bug.cgi?id=15877
2518           REGRESSION: r27486 caused a layout regression at my bank's website
2519
2520         Test: fast/block/float/overhanging-after-height-decrease-offsets.html
2521
2522         * rendering/RenderBlock.cpp:
2523         (WebCore::RenderBlock::layoutBlock):
2524
2525 2007-11-06  Beth Dakin  <bdakin@apple.com>
2526
2527         Reviewed by Sam.
2528
2529         <rdar://problem/5575812> REGRESSION:When using absolute positioning 
2530         with overflow:auto div, WebKit seems to add an additional 15px
2531
2532         * rendering/RenderBox.cpp:
2533         (WebCore::RenderBox::containingBlockWidthForPositioned): We need to 
2534         subtract off the vertical scrollbar width too.
2535
2536 2007-11-06  Justin Garcia  <justin.garcia@apple.com>
2537
2538         Reviewed by Dan Bernstein.
2539         
2540         <rdar://problem/5583387> ASSERTION FAILED: !refChild->hasTagName(bodyTag) when pasting newline in plain text into rich text Mail
2541         <rdar://problem/5583362> REGRESSION (5523.10.3-TOT): Newlines stripped when pasting plain text in Mail
2542
2543         * editing/markup.cpp:
2544         (WebCore::createFragmentFromText): Put paragraphs of text into clones of the block
2545         that encloses the input context, unless that block is the body, which shouldn't
2546         be cloned.  In that case, use regular divs, as we did before r27369.
2547
2548 2007-11-06  Christian Dywan  <christian@twotoasts.de>
2549
2550         Reviewed by Darin.
2551
2552         Fix http://bugs.webkit.org/show_bug.cgi?id=15828
2553         Bug 15828: WebKit GTK include and lib directory is installed in qt4-named directory
2554
2555         * WebCore.pro: Use sane default install paths for the gtk port.
2556
2557 2007-11-06  Justin Garcia  <justin.garcia@apple.com>
2558
2559         Reviewed by Darin Adler.
2560         
2561         <rdar://problem/5576619> 
2562         REGRESSION: Caret disappears after deleting the last character in inline hole (15714)
2563
2564         * editing/TypingCommand.cpp:
2565         (WebCore::TypingCommand::deleteSelection): Like the other TypingCommands, including
2566         both of the other deletion commands, call typingAddedToOpenCommand(), which takes 
2567         the command's endingSelection and sets it as selection.
2568
2569 2007-11-06  Dan Bernstein  <mitz@apple.com>
2570
2571         Reviewed by Antti Koivisto and Dave Hyatt.
2572
2573         - fix <rdar://problem/5582961> Incorrect layout and floating object list corruption when CSS decreases a block's height
2574
2575         Test: fast/block/float/overhanging-after-height-decrease.html
2576
2577         * rendering/RenderBlock.cpp:
2578         (WebCore::RenderBlock::layoutBlock): If after calculating the height
2579         it turns out that there are overhanging floats that were not overhanging
2580         before, rescan children with overhanging floats and add them. 
2581         (WebCore::RenderBlock::layoutBlockChildren): Added a parameter that
2582         returns the lowest float bottom of any of the children.
2583         (WebCore::RenderBlock::addOverhangingFloats): Changed to return the
2584         lowest float bottom.
2585         * rendering/RenderBlock.h:
2586
2587 2007-11-06  Adele Peterson  <adele@apple.com>
2588
2589         Reviewed by Darin.
2590
2591         Switched all uses of HTMLImageLoader to use OwnPtrs.
2592
2593         * html/HTMLInputElement.h:
2594         * html/HTMLInputElement.cpp:
2595         (WebCore::HTMLInputElement::init):
2596         (WebCore::HTMLInputElement::~HTMLInputElement):
2597         (WebCore::HTMLInputElement::setInputType):
2598         (WebCore::HTMLInputElement::parseMappedAttribute):
2599         (WebCore::HTMLInputElement::attach):
2600         * html/HTMLObjectElement.h:
2601         * html/HTMLObjectElement.cpp:
2602         (WebCore::HTMLObjectElement::HTMLObjectElement):
2603         (WebCore::HTMLObjectElement::~HTMLObjectElement):
2604         (WebCore::HTMLObjectElement::parseMappedAttribute):
2605         (WebCore::HTMLObjectElement::attach):
2606         * html/HTMLVideoElement.h:
2607         * html/HTMLVideoElement.cpp:
2608         (WebCore::HTMLVideoElement::HTMLVideoElement):
2609         (WebCore::HTMLVideoElement::attach):
2610         (WebCore::HTMLVideoElement::detach):
2611         (WebCore::HTMLVideoElement::parseMappedAttribute):
2612
2613 2007-11-06  Antti Koivisto  <antti@apple.com>
2614
2615         Reviewed by Darin.
2616         
2617         Trigger media load on on src attribute changes as specified in new HTML5 draft.
2618
2619         Tests: media/video-src-change.html
2620                media/video-src-remove.html
2621                media/video-src-set.html
2622
2623         * html/HTMLMediaElement.cpp:
2624         (WebCore::HTMLMediaElement::attributeChanged):
2625         * html/HTMLMediaElement.h:
2626
2627 2007-11-06  Dan Bernstein  <mitz@apple.com>
2628
2629         Reviewed by Darin Adler.
2630
2631         - fix http://bugs.webkit.org/show_bug.cgi?id=15838
2632           Incomplete repaint toggling "How you know this person" on Facebook
2633
2634         Test: fast/repaint/make-children-non-inline.html
2635
2636         * rendering/RenderBlock.cpp:
2637         (WebCore::RenderBlock::makeChildrenNonInline): Repaint the block. This
2638         is needed because the inline children may be repositioned as they move
2639         into new anonymous blocks, but those blocks have no knowledge of where
2640         their children used to be, so they cannot invalidate those areas.
2641
2642 2007-11-06  Alexey Proskuryakov  <ap@webkit.org>
2643
2644         Reviewed by Darin.
2645
2646         http://bugs.webkit.org/show_bug.cgi?id=15847
2647         Some editing cleanup
2648
2649         No change in functionality.
2650
2651         * editing/TextIterator.cpp:
2652         (WebCore::plainText):
2653         * editing/TextIterator.h:
2654         Made WebCore::plainText() return String instead of DeprecatedString.
2655
2656         * bridge/mac/WebCoreAXObject.mm:
2657         (-[WebCoreAXObject textUnderElement]):
2658         (-[WebCoreAXObject value]):
2659         (-[WebCoreAXObject doAXBoundsForTextMarkerRange:]):
2660         (-[WebCoreAXObject doAXNextSentenceEndTextMarkerForTextMarker:]):
2661         (-[WebCoreAXObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
2662         Updated for the above change. There is no need to explicitly convert to NSString now.
2663
2664         * editing/EditCommand.cpp:
2665         (WebCore::EditCommand::EditCommand): m_startingSelection and m_endingSelection are actually
2666         initialized in constructor body, so the work done in initializer list was wasted.
2667
2668         (WebCore::EditCommand::apply): Moved some stars.
2669         (WebCore::EditCommand::unapply): Ditto.
2670         (WebCore::EditCommand::reapply): Ditto.
2671         (WebCore::EditCommand::setStartingSelection): The loop exit condition was evaluated twice,
2672         removed one of the checks.
2673
2674         * editing/SelectionController.cpp:
2675         (WebCore::SelectionController::toString): plainText() result type now matches what we need here.
2676
2677         * page/mac/WebCoreFrameBridge.h:
2678         * page/mac/WebCoreFrameBridge.mm:
2679         Removed unused -[WebCoreFrameBridge deleteKeyPressedWithSmartDelete:granularity:] and
2680         -[WebCoreFrameBridge forwardDeleteKeyPressedWithSmartDelete:granularity:].
2681
2682 2007-11-05  Mark Rowe  <mrowe@apple.com>
2683
2684         Mac build fix.
2685
2686         * bindings/js/JSHTMLDocumentCustom.cpp:
2687         (WebCore::writeHelper):
2688
2689 2007-11-05  Adam Roben  <aroben@apple.com>
2690
2691         Don't crash if SafariTheme can't be loaded
2692
2693         PlatformScrollBarSafari and RenderThemeSafari were not checking
2694         whether SafariTheme was successfully loaded. All other uses of
2695         SafariTheme already check this.
2696
2697         Reviewed by Steve.
2698
2699         * platform/win/PlatformScrollBarSafari.cpp: Don't paint if SafariTheme
2700         couldn't be loaded.
2701         (WebCore::PlatformScrollbar::paintButton):
2702         (WebCore::PlatformScrollbar::paintTrack):
2703         (WebCore::PlatformScrollbar::paintThumb):
2704         * rendering/RenderThemeSafari.cpp:
2705         (WebCore::RenderThemeSafari::isControlStyled): Always return true if
2706         we couldn't load SafariTheme. This way we should never try to paint
2707         themed controls (and we assert as such in the paint functions).
2708         (WebCore::RenderThemeSafari::paintCheckbox):
2709         (WebCore::RenderThemeSafari::paintRadio):
2710         (WebCore::RenderThemeSafari::paintButton):
2711         (WebCore::RenderThemeSafari::paintTextField):
2712         (WebCore::RenderThemeSafari::paintCapsLockIndicator):
2713         (WebCore::RenderThemeSafari::paintTextArea):
2714         (WebCore::RenderThemeSafari::paintMenuList):
2715         (WebCore::RenderThemeSafari::paintSliderThumb):
2716         (WebCore::RenderThemeSafari::paintSearchField):
2717         (WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
2718         (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration):
2719         (WebCore::RenderThemeSafari::paintSearchFieldResultsButton):
2720
2721 2007-11-05  Kevin Ollivier  <kevino@theolliviers.com>
2722
2723         Adding the rest of wx port's graphics impl. 
2724
2725         Rubber-stamped by Maciej Stachowiak.
2726
2727         * platform/graphics/wx/AffineTransformWx.cpp: Added.
2728         * platform/graphics/wx/GraphicsContextWx.cpp: Added.
2729         * platform/graphics/wx/ImageBufferWx.cpp: Added.
2730         * platform/graphics/wx/ImageSourceWx.cpp: Added.
2731         * platform/graphics/wx/ImageWx.cpp: Added.
2732         * platform/graphics/wx/PathWx.cpp: Added.
2733
2734 2007-11-05  Kevin Ollivier  <kevino@theolliviers.com>
2735
2736         wx port bug fixes and new files to get platform/wx building on trunk.
2737
2738         Rubber-stamped by Maciej Stachowiak.
2739
2740         * platform/wx/CursorWx.cpp:
2741         * platform/wx/FileSystemWx.cpp: Added.
2742         * platform/wx/FontCacheWx.cpp:
2743         * platform/wx/FontPlatformDataWx.cpp:
2744         * platform/wx/FontWx.cpp:
2745         * platform/wx/KeyboardEventWx.cpp:
2746         * platform/wx/LocalizedStringsWx.cpp: Added.
2747         * platform/wx/LoggingWx.cpp: Added.
2748         * platform/wx/RenderThemeWx.cpp:
2749         * platform/wx/ScrollViewWx.cpp:
2750         * platform/wx/SharedTimerWx.cpp:
2751         * platform/wx/StringWx.cpp:
2752         * platform/wx/ThreadingWx.cpp: Added.
2753         * platform/wx/WidgetWx.cpp:
2754
2755 2007-11-05  Adele Peterson  <adele@apple.com>
2756
2757         Reviewed by Maciej.
2758
2759         Fix for <rdar://problem/5579999> Add poster attribute for video element
2760
2761         * html/HTMLAttributeNames.in: Added poster attribute.
2762
2763         * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::updateFromElement):
2764           Calls imageSourceAttributeName instead of having special cases for the different kinds of elements. 
2765         * dom/Element.cpp: (WebCore::Element::imageSourceAttributeName): Added.
2766         * dom/Element.h:
2767         * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::imageSourceAttributeName): Added.
2768         * html/HTMLObjectElement.h:
2769
2770         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::movieNetworkStateChanged):
2771           Calls updatePosterImage when the network state is empty and when the first frame has been loaded.
2772         * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::rendererIsNeeded): Made this inline.  HTMLVideoElement now also implements this.
2773
2774         * html/HTMLVideoElement.idl: Added case for poster attribute.
2775         * html/HTMLVideoElement.h: Added image loader and flag to keep track of whether or not the poster image should be shown.
2776         * html/HTMLVideoElement.cpp:
2777         (WebCore::HTMLVideoElement::HTMLVideoElement): Initialize m_imageLoader and m_shouldShowPosterImage.
2778         (WebCore::HTMLVideoElement::rendererIsNeeded): Calls HTMLElement::rendererIsNeeded since HTMLMediaElements have renderer by default.
2779         (WebCore::HTMLVideoElement::createRenderer): Create a RenderImage or RenderVideo depending on whether or not the poster image should be shown.
2780         (WebCore::HTMLVideoElement::attach): Set up image loader and RenderImage if necessary.
2781         (WebCore::HTMLVideoElement::detach): Delete image loader if its no longer needed.
2782         (WebCore::HTMLVideoElement::parseMappedAttribute): Added case to process poster attribute.
2783         (WebCore::HTMLVideoElement::poster): Added getter for poster attribute.
2784         (WebCore::HTMLVideoElement::setPoster): Added setter for poster attribute.
2785         (WebCore::HTMLVideoElement::isURLAttribute): Added.
2786         (WebCore::HTMLVideoElement::imageSourceAttributeName): Added.
2787         (WebCore::HTMLVideoElement::updatePosterImage): Added.  Updates m_shouldShowPosterImage and if its changed, detaches and attaches so the renderer is correct.
2788
2789 2007-11-05  Adam Roben  <aroben@apple.com>
2790
2791         Fix <rdar://5563572> SVG image support is turned off
2792
2793         Turned on SVG images for all platforms.
2794
2795         Reviewed by Eric.
2796
2797         * WebCore.vcproj/WebCore.vcproj: Added SVGImage.{cpp,h}
2798         * loader/CachedImage.cpp:
2799         (WebCore::CachedImage::createImage): Removed platform checks for
2800         SVGImage.
2801
2802 2007-11-05  Antti Koivisto  <antti@apple.com>
2803
2804         Reviewed by Darin.
2805
2806         QTMovieView can generate callbacks during paint. This can lead to crashes.
2807         
2808         Delay callbacks so they get handled after painting is completed. No test case,
2809         I don't know how to reliably reproduce this.
2810
2811         * platform/graphics/mac/MoviePrivateQTKit.mm:
2812         (WebCore::MoviePrivate::MoviePrivate):
2813         (WebCore::MoviePrivate::~MoviePrivate):
2814         (WebCore::MoviePrivate::paint):
2815         (-[WebCoreMovieObserver initWithCallback:WebCore::]):
2816         (-[WebCoreMovieObserver disconnect]):
2817         (-[WebCoreMovieObserver loadStateChanged:]):
2818         (-[WebCoreMovieObserver rateChanged:]):
2819         (-[WebCoreMovieObserver sizeChanged:]):
2820         (-[WebCoreMovieObserver timeChanged:]):
2821         (-[WebCoreMovieObserver volumeChanged:]):
2822         (-[WebCoreMovieObserver didEnd:]):
2823         (-[WebCoreMovieObserver setDelayCallbacks:]):
2824
2825 2007-11-05  Antti Koivisto  <antti@apple.com>
2826
2827         Reviewed by Adam.
2828
2829         Add some missing WebCore* prefixes to ObjC classes
2830
2831         * platform/mac/FileChooserMac.mm:
2832         (WebCore::FileChooser::FileChooser):
2833         * platform/mac/SharedBufferMac.mm:
2834         (WebCore::SharedBuffer::createNSData):
2835         (WebCore::SharedBuffer::createCFData):
2836         * platform/mac/SharedTimerMac.cpp:
2837         (WebCore::setSharedTimerFireTime):
2838
2839 2007-11-05  Ada Chan  <adachan@apple.com>
2840
2841         <rdar://problem/5579772> Regression: AltGr does not work
2842         We now store the system key event info in PlatforkKeyboardEvent().
2843
2844         Reviewed by Oliver.
2845
2846         * platform/PlatformKeyboardEvent.h:
2847         (WebCore::PlatformKeyboardEvent::isSystemKey):
2848         * platform/win/KeyEventWin.cpp:
2849         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2850
2851 2007-11-02  Tristan O'Tierney  <tristan@apple.com>
2852
2853         Reviewed by Darin Adler.
2854
2855         * WebCore.xcodeproj/project.pbxproj:
2856         Set WindowFeatures.h as a Private header.
2857         
2858         * loader/FrameLoader.cpp:
2859         (WebCore::FrameLoader::createWindow):
2860         Revised to use a single createWindow function instead of
2861         two createWindow functions and one createModalDialog function.
2862         The logic for this is now addressed in WebKit in an effort
2863         to make this easier to follow.
2864         
2865         * page/Chrome.cpp:
2866         (WebCore::Chrome::createWindow):
2867         * page/Chrome.h:
2868         * page/ChromeClient.h:
2869         * page/ContextMenuController.cpp:
2870         (WebCore::openNewWindow):
2871         * platform/graphics/svg/SVGImageEmptyClients.h:
2872         (WebCore::SVGEmptyChromeClient::createWindow):
2873         Revised to take new additional windowFeatures parameter.
2874
2875 2007-11-04  Geoffrey Garen  <ggaren@apple.com>
2876
2877         Reviewed by Darin Adler.
2878         
2879         http://bugs.webkit.org/show_bug.cgi?id=15835
2880
2881         Small adaptations to new KJS::List class.
2882
2883         * bindings/js/kjs_window.cpp:
2884         (KJS::WindowFunc::callAsFunction):
2885         (KJS::ScheduledAction::ScheduledAction):
2886
2887 2007-11-05  Adam Roben  <aroben@apple.com>
2888
2889         Allow passing a base class pointer to COMPtr::copyRefTo
2890
2891         Reviewed by Sam.
2892
2893         * platform/win/COMPtr.h:
2894
2895 2007-11-05  Dan Bernstein  <mitz@apple.com>
2896
2897         Reviewed by Oliver Hunt.
2898
2899         - fix ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key) when a class attribute is all-whitespace
2900
2901         Test: fast/dom/class-all-whitespace.html
2902
2903         * dom/StyledElement.cpp:
2904         (WebCore::StyledElement::parseMappedAttribute): Check if there is any
2905         non-whitespace character in the class attribute.
2906
2907 2007-11-05  Brady Eidson  <beidson@apple.com>
2908
2909         Reviewed by Sam
2910
2911         Add transaction blocking to the DatabaseAuthorizer in preparation for the new version
2912         of the sql storage API
2913
2914         * storage/DatabaseAuthorizer.cpp:
2915         (WebCore::DatabaseAuthorizer::allowTransaction):
2916         * storage/DatabaseAuthorizer.h:
2917
2918 2007-11-05  Mark Rowe  <mrowe@apple.com>
2919
2920         Reviewed by Alp Toker.
2921
2922         Have getMIMETypeForExtension return a null string when no MIME type is known
2923         for the extension rather than returning "text/plain".  This prevents plugin data
2924         being dumped into object elements when plugins are disabled.
2925
2926         * platform/gtk/MIMETypeRegistryGtk.cpp:
2927         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2928
2929 2007-11-04  Sam Weinig  <sam@webkit.org>
2930
2931         Rubber-stamped by Adam Roben.
2932
2933         Rename SecurityOrigin::allowsAccessFrom to SecurityOrigin::canAccess to 
2934         clear up ambiguity.
2935
2936         * bindings/js/kjs_window.cpp:
2937         (KJS::Window::isSafeScript):
2938         * platform/SecurityOrigin.cpp:
2939         (WebCore::SecurityOrigin::canAccess):
2940         * platform/SecurityOrigin.h:
2941
2942 2007-11-04  Timothy Hatcher  <timothy@apple.com>
2943
2944         Reviewed by Adam.
2945
2946         Bug 15834: There are many subtle bugs in the Styles pane of the Web Inspector
2947         http://bugs.webkit.org/show_bug.cgi?id=15834
2948
2949         - Broke up DocumentPanel and added three SidebarPane sub-classes.
2950         - Fixed many Style pane bugs, including:
2951           * Poor handling of duplicate properties in the same rule. Some of this can't be
2952             fixed since we can't only get the "winning" value for duplicate properties.
2953             So we should only show one entry per unique property name.
2954           * Computed style does not show font shorthand sub-properties if 'font' was used.
2955           * Property priority was broken, the wrong properties were crossed out.
2956           * The 'border' shorthand shows null for the shorthand value.
2957           * Shorthands didn't show their priority (e.g. !important).
2958           * HSL and HTML hex colors didn't have preview swatch blocks.
2959           * Code refactoring, making it easier to reuse for console.log later.
2960
2961         * page/inspector/DocumentPanel.js: Move sidebar pane code to three seperate
2962           classes in new files.
2963         * page/inspector/MetricsSidebarPane.js: Added.
2964         * page/inspector/Panel.js: Remove an InspectorController.log() call.
2965         * page/inspector/PropertiesSection.js: Add the section to the TreeOutline.
2966           So TreeElements can access properties on their section.
2967         * page/inspector/PropertiesSidebarPane.js: Added.
2968         * page/inspector/SidebarPane.js: Remove the explicit asignment of the
2969           onexpand and oncollapse to null. These were hiding prototypes.
2970         * page/inspector/StylesSidebarPane.js: Added.
2971         * page/inspector/inspector.html: Include the new script files.
2972         * page/inspector/treeoutline.js: If a null representedObject is passed
2973           in just use a empty object.
2974
2975 2007-11-04  David D. Kilzer  <ddkilzer@webkit.org>
2976
2977         Fix build when spaces appear in the WebKit source path.
2978
2979         Reviewed by Mark Rowe.
2980
2981         * bindings/scripts/IDLParser.pm: Use safer open() method which lists
2982         arguments individually and prevents the need to work around spaces
2983         in the path.
2984
2985 2007-11-04  Alp Toker  <alp@atoker.com>
2986
2987         Reviewed by Alexey Proskuryakov.
2988
2989         Fix a crash when no clipboard text is available
2990
2991         * platform/gtk/PasteboardGtk.cpp:
2992         (WebCore::Pasteboard::plainText):
2993
2994 2007-11-03  Darin Adler  <darin@apple.com>
2995
2996         Reviewed by Maciej.
2997
2998         - WebCore part of http://bugs.webkit.org/show_bug.cgi?id=15821
2999           remove unused PCRE features for speed
3000
3001         * page/Frame.cpp: (WebCore::Frame::matchLabelsAgainstElement):
3002         * page/mac/FrameMac.mm: (WebCore::Frame::matchLabelsAgainstElement):
3003         Remove use of "[[:digit:]]" syntax. This hasn't worked for some time.
3004         Use "\d" instead.
3005
3006         * platform/RegularExpression.h: Remove the unused cap function. We can
3007         add it back later if we find we need it.
3008         * platform/RegularExpression.cpp:
3009         (WebCore::RegularExpression::Private::compile): Update for JavaScriptCore
3010         regular expression entry point changes.
3011         (WebCore::RegularExpression::Private::~Private): Ditto.
3012         (WebCore::RegularExpression::match): Remove the code to set PCRE_NOTBOL.
3013         This means that regular expressions with metacharactesr like ^ in them
3014         won't work any more with non-whole-string searches, but we don't use
3015         any regular expressions like that.
3016
3017 2007-11-03  Kevin Ollivier  <kevino@theolliviers.com>
3018
3019         Update the link stubs to match the current build,
3020         and fix coding style issues.
3021
3022         Reviewed by Mark Rowe.
3023
3024         * platform/wx/TemporaryLinkStubs.cpp:
3025         (loadResourceIntoArray):
3026         (findNextSentenceFromIndex):
3027         (findSentenceBoundary):
3028         (Frame::dashboardRegionsChanged):
3029         (WebCore::historyContains):
3030         (CachedPage::close):
3031         (Editor::showStylesPanel):
3032         (EventHandler::passSubframeEventToSubframe):
3033         (EventHandler::passWheelEventToWidget):
3034         (WebCore::currentTextBreakLocaleID):
3035
3036 2007-11-03  Kevin Ollivier  <kevino@theolliviers.com>
3037
3038         wx <-> WebKit conversions for IntPoint, IntRect and FloatRect
3039
3040         Reviewed by Mark Rowe.
3041
3042         * platform/graphics/wx/FloatRectWx.cpp: Added.
3043         * platform/graphics/wx/IntPointWx.cpp: Added.
3044         * platform/graphics/wx/IntRectWx.cpp: Added.
3045
3046 2007-11-03  Kevin Ollivier  <kevino@theolliviers.com>
3047
3048         wx <-> WebKit data type conversions for Pen and Color.
3049
3050         Reviewed by Darin Adler.
3051
3052         * platform/graphics/wx: Added.
3053         * platform/graphics/wx/ColorWx.cpp: Added.
3054         * platform/graphics/wx/PenWx.cpp: Added.
3055
3056 2007-11-03  Sam Weinig  <sam@webkit.org>
3057
3058         Reviewed by Oliver.
3059
3060         Remove dummy variable from ClassInfo reducing the size of the struct by 1 word.
3061         The variable had been kept around for binary compatibility, but since nothing
3062         else is there is no point in continuing to keep it around.
3063
3064         * bindings/js/JSDOMExceptionConstructor.cpp:
3065         (WebCore::):
3066         * bindings/js/JSHTMLInputElementBase.cpp:
3067         (WebCore::):
3068         * bindings/js/JSNamedNodesCollection.cpp:
3069         (WebCore::):
3070         * bindings/js/JSXMLHttpRequest.cpp:
3071         (KJS::):
3072         * bindings/js/JSXSLTProcessor.cpp:
3073         (KJS::):
3074         * bindings/js/kjs_css.cpp:
3075         (WebCore::):
3076         * bindings/js/kjs_events.cpp:
3077         (WebCore::):
3078         * bindings/js/kjs_navigator.cpp:
3079         (KJS::):
3080         * bindings/js/kjs_window.cpp:
3081         (KJS::):
3082         * bindings/scripts/CodeGeneratorJS.pm:
3083
3084 2007-11-03  Kevin Ollivier  <kevino@theolliviers.com>
3085
3086         Build fixes to get wx impls. building on trunk.
3087
3088         Reviewed by Mark Rowe.
3089
3090         * platform/wx/DragDataWx.cpp:
3091         (WebCore::DragData::containsFiles):
3092         (WebCore::DragData::asFilenames):
3093         * platform/wx/DragImageWx.cpp:
3094         (WebCore::scaleDragImage):
3095         * platform/wx/MimeTypeRegistryWx.cpp:
3096         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
3097         * platform/wx/MouseEventWx.cpp:
3098         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3099         * platform/wx/MouseWheelEventWx.cpp:
3100         * platform/wx/PasteboardWx.cpp:
3101         (WebCore::Pasteboard::writeImage):
3102         * platform/wx/WidgetWx.cpp:
3103         (WebCore::Widget::setCursor):
3104
3105 2007-11-03  David D. Kilzer  <ddkilzer@webkit.org>
3106
3107         Sort files(...); sections of Xcode project files.
3108
3109         Rubber-stamped by Darin.
3110
3111         * WebCore.xcodeproj/project.pbxproj:
3112         * manual-tests/NPN_Invoke/NPN_Invoke.xcodeproj/project.pbxproj:
3113
3114 2007-11-03  Kevin Ollivier  <kevino@theolliviers.com>
3115
3116         Coding style fixes for platform/wx files.
3117
3118         Reviewed by Mark Rowe.
3119
3120         * platform/wx/ClipboardWx.cpp:
3121         * platform/wx/GlyphMapWx.cpp:
3122         * platform/wx/ScreenWx.cpp:
3123
3124 2007-11-03  Alp Toker  <alp@atoker.com>
3125
3126         Reviewed by Mark Rowe.
3127
3128         Implement platform scrollbar static width/height getters
3129
3130         * platform/gtk/PlatformScrollBar.h:
3131         * platform/gtk/PlatformScrollBarGtk.cpp:
3132         (scrollbarSize):
3133         (PlatformScrollbar::horizontalScrollbarHeight):
3134
3135 2007-11-03  Alp Toker  <alp@atoker.com>
3136
3137         Reviewed by Mark Rowe.
3138
3139         Cast function pointers to gpointer.
3140
3141         * platform/gtk/PlatformScrollBarGtk.cpp:
3142         (PlatformScrollbar::~PlatformScrollbar):
3143
3144 2007-11-03  Alp Toker  <alp@atoker.com>
3145
3146         Reviewed by Adam Roben.
3147
3148         RenderThemeGtk implementation based on Mozilla's GTK+ style code
3149
3150         There is still work needed to complete this feature.
3151
3152         * WebCore.pro:
3153         * platform/gtk/RenderThemeGtk.cpp:
3154         (WebCore::theme):
3155         (WebCore::RenderThemeGtk::RenderThemeGtk):
3156         (WebCore::supportsFocus):
3157         (WebCore::RenderThemeGtk::supportsFocusRing):
3158         (WebCore::RenderThemeGtk::controlSupportsTints):
3159         (WebCore::RenderThemeGtk::baselinePosition):
3160         (WebCore::adjustMozStyle):
3161         (WebCore::setMozState):
3162         (WebCore::paintMozWidget):
3163         (WebCore::setButtonPadding):
3164         (WebCore::setToggleSize):
3165         (WebCore::RenderThemeGtk::setCheckboxSize):
3166         (WebCore::RenderThemeGtk::paintCheckbox):
3167         (WebCore::RenderThemeGtk::setRadioSize):
3168         (WebCore::RenderThemeGtk::paintRadio):
3169         (WebCore::RenderThemeGtk::adjustButtonStyle):
3170         (WebCore::RenderThemeGtk::paintButton):
3171         (WebCore::RenderThemeGtk::adjustMenuListStyle):
3172         (WebCore::RenderThemeGtk::paintMenuList):
3173         (WebCore::RenderThemeGtk::adjustTextFieldStyle):
3174         (WebCore::RenderThemeGtk::paintTextField):
3175         (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
3176         (WebCore::RenderThemeGtk::paintSearchFieldResultsButton):
3177         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationStyle):
3178         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
3179         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
3180         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
3181         (WebCore::RenderThemeGtk::adjustSearchFieldStyle):
3182         (WebCore::RenderThemeGtk::paintSearchField):
3183         (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
3184         (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
3185         (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
3186         (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
3187         (WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor):
3188         (WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor):
3189         (WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor):
3190         (WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor):
3191         (WebCore::RenderThemeGtk::caretBlinkFrequency):
3192         (WebCore::RenderThemeGtk::systemFont):
3193         (WebCore::gtkStyleSetCallback):
3194         (WebCore::RenderThemeGtk::gtkContainer):
3195         (WebCore::RenderThemeGtk::gtkEntry):
3196         (WebCore::RenderThemeGtk::gtkTreeView):
3197         * platform/gtk/RenderThemeGtk.h:
3198         * platform/gtk/gtk2drawing.c: Added.
3199         (moz_gtk_enable_style_props):
3200         (ensure_window_widget):
3201         (setup_widget_prototype):
3202         (ensure_button_widget):
3203         (ensure_checkbox_widget):
3204         (ensure_radiobutton_widget):
3205         (ensure_scrollbar_widget):
3206         (ensure_spin_widget):
3207         (ensure_scale_widget):
3208         (ensure_entry_widget):
3209         (ensure_option_menu_widget):
3210         (ensure_arrow_widget):
3211         (ensure_handlebox_widget):
3212         (ensure_toolbar_widget):
3213         (ensure_tooltip_widget):
3214         (ensure_tab_widget):
3215         (ensure_progress_widget):
3216         (ensure_frame_widget):
3217         (ensure_menu_bar_widget):
3218         (ensure_menu_bar_item_widget):
3219         (ensure_menu_popup_widget):
3220         (ensure_menu_item_widget):
3221         (ensure_check_menu_item_widget):
3222         (ConvertGtkState):
3223         (TSOffsetStyleGCArray):
3224         (TSOffsetStyleGCs):
3225         (moz_gtk_button_paint):
3226         (moz_gtk_init):
3227         (moz_gtk_checkbox_get_metrics):
3228         (moz_gtk_radio_get_metrics):
3229         (moz_gtk_checkbox_get_focus):
3230         (moz_gtk_radio_get_focus):
3231         (moz_gtk_button_get_focus):
3232         (moz_gtk_option_menu_get_metrics):
3233         (moz_gtk_toggle_paint):
3234         (calculate_arrow_dimensions):
3235         (moz_gtk_scrollbar_button_paint):
3236         (moz_gtk_scrollbar_trough_paint):
3237         (moz_gtk_scrollbar_thumb_paint):
3238         (moz_gtk_spin_paint):
3239         (moz_gtk_scale_paint):
3240         (moz_gtk_scale_thumb_paint):
3241         (moz_gtk_gripper_paint):
3242         (moz_gtk_entry_paint):
3243         (moz_gtk_option_menu_paint):
3244         (moz_gtk_dropdown_arrow_paint):
3245         (moz_gtk_container_paint):
3246         (moz_gtk_toggle_label_paint):
3247         (moz_gtk_toolbar_paint):
3248         (moz_gtk_tooltip_paint):
3249         (moz_gtk_frame_paint):
3250         (moz_gtk_progressbar_paint):
3251         (moz_gtk_progress_chunk_paint):
3252         (moz_gtk_tab_paint):
3253         (moz_gtk_tabpanels_paint):
3254         (moz_gtk_menu_bar_paint):
3255         (moz_gtk_menu_popup_paint):
3256         (moz_gtk_menu_item_paint):
3257         (moz_gtk_check_menu_item_paint):
3258         (moz_gtk_window_paint):
3259         (moz_gtk_get_widget_border):
3260         (moz_gtk_get_dropdown_arrow_size):
3261         (moz_gtk_get_scalethumb_metrics):
3262         (moz_gtk_get_scrollbar_metrics):
3263         (moz_gtk_widget_paint):
3264         (moz_gtk_get_scrollbar_widget):
3265         (moz_gtk_shutdown):
3266         * platform/gtk/gtkdrawing.h: Added.
3267
3268 2007-11-03  Alp Toker  <alp@atoker.com>
3269
3270         Reviewed by Mark Rowe.
3271
3272         Do not allow scrollbars to handle wheel events
3273         
3274         We bubble the wheel event up so the parent can handle it instead.
3275
3276         * platform/gtk/PlatformScrollBarGtk.cpp:
3277         (gtkScrollEventCallback):
3278         (PlatformScrollbar::PlatformScrollbar):
3279         (PlatformScrollbar::~PlatformScrollbar):
3280
3281 2007-11-03  Alp Toker  <alp@atoker.com>
3282
3283         Reviewed by Mark Rowe.
3284
3285         Frame scrolling and invalidation fixes
3286
3287         Make upward scroll events have a positive delta to match other ports.
3288
3289         Fix the invalidation rect offset for frames so that scrolling works properly.
3290
3291         Avoid allocating negative sizes to widgets to avoid GTK+ warnings.
3292
3293         Allow tabbing to all widgets and links.
3294
3295         Fix event returns, improving the focus situation and correcting scroll wheel
3296         behavior.
3297
3298         * page/gtk/EventHandlerGtk.cpp:
3299         (WebCore::EventHandler::tabsToAllControls):
3300         (WebCore::EventHandler::passWheelEventToWidget):
3301         * platform/gtk/ScrollViewGtk.cpp:
3302         (WebCore::ScrollViewScrollbar::geometryChanged):
3303         (WebCore::ScrollView::updateContents):
3304         (WebCore::ScrollView::update):
3305         (WebCore::ScrollView::wheelEvent):
3306         (WebCore::ScrollView::updateScrollbars):
3307         * platform/gtk/WheelEventGtk.cpp:
3308         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3309
3310 2007-11-03  David D. Kilzer  <ddkilzer@webkit.org>
3311
3312         LGPL'ed files contain incorrect FSF address
3313         <http://bugs.webkit.org/show_bug.cgi?id=14885>
3314
3315         Reviewed by NOBODY (follow-up fix).
3316
3317         * bindings/js/JSSVGTransformListCustom.cpp:
3318         * ksvg2/svg/SVGException.idl:
3319         * ksvg2/svg/SVGTextPathElement.cpp:
3320         * ksvg2/svg/SVGTextPathElement.h:
3321         * ksvg2/svg/SVGViewSpec.cpp:
3322         * ksvg2/svg/SVGViewSpec.h:
3323         * platform/mac/FontCustomPlatformData.cpp:
3324         * platform/mac/FontCustomPlatformData.h:
3325         * platform/mac/FontPlatformDataMac.mm:
3326         * platform/win/FontCustomPlatformData.cpp:
3327         * platform/win/FontCustomPlatformData.h:
3328         * rendering/RenderSVGRoot.cpp:
3329         * rendering/RenderSVGRoot.h:
3330         * rendering/RenderSVGTextPath.cpp:
3331         * rendering/RenderSVGTextPath.h:
3332         * rendering/RenderSVGTransformableContainer.h:
3333         * rendering/RenderSVGViewportContainer.cpp:
3334         * rendering/RenderSVGViewportContainer.h:
3335         * rendering/SVGCharacterLayoutInfo.cpp:
3336         * rendering/SVGCharacterLayoutInfo.h:
3337         * rendering/SVGRenderSupport.cpp:
3338         * rendering/SVGRenderSupport.h:
3339
3340 2007-11-02  Antti Koivisto  <antti@apple.com>
3341
3342         Reviewed by Adam.
3343         
3344         Add video width/height DOM and content attributes from latest HTML5 draft.
3345
3346         Test: media/video-width-height.html
3347
3348         * html/HTMLVideoElement.cpp:
3349         (WebCore::HTMLVideoElement::parseMappedAttribute):
3350         (WebCore::HTMLVideoElement::width):
3351         (WebCore::HTMLVideoElement::setWidth):
3352         (WebCore::HTMLVideoElement::height):
3353         (WebCore::HTMLVideoElement::setHeight):
3354         * html/HTMLVideoElement.h:
3355         * html/HTMLVideoElement.idl:
3356
3357 2007-11-02  Darin Adler  <darin@apple.com>
3358
3359         Reviewed by Maciej.
3360
3361         * DerivedSources.make: Remove a few explicit filenames from some rules by using
3362         make variables a little more.
3363         * WebCore.LP64.exp: Fix typo, grammar.
3364
3365 2007-11-02  Darin Adler  <darin@apple.com>
3366
3367         Reviewed by Maciej.
3368
3369         - use the new HashMap::take function where appropriate
3370
3371         * bindings/js/kjs_binding.cpp:
3372         (KJS::addWrapper): Made an inline rather than a macro; inlines good, macros bad.
3373         (KJS::removeWrapper): Ditto.
3374         (KJS::removeWrappers): Ditto.
3375         (KJS::ScriptInterpreter::putDOMObject): Use the inline instead of the macro.
3376         (KJS::ScriptInterpreter::forgetDOMObject): Ditto. This involves using take instead
3377         of remove -- in theory ever so slightly less efficient, but I think it's fine.
3378         (KJS::ScriptInterpreter::forgetDOMNodeForDocument): Ditto.
3379         (KJS::ScriptInterpreter::putDOMNodeForDocument): Use the inline instead of the macro.
3380         (KJS::ScriptInterpreter::forgetAllDOMNodesForDocument): Use take instead of find/remove.
3381         (KJS::ScriptInterpreter::updateDOMNodeDocument): Use the inlines instead of the macros.
3382
3383         * bindings/js/kjs_window.cpp: (KJS::Window::clearTimeout): Use take instead of find/remove.
3384         * bridge/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::remove): Ditto.
3385         * page/AnimationController.cpp: (WebCore::AnimationControllerPrivate::clear): Ditto.
3386         * rendering/RenderBlock.cpp:
3387         (WebCore::RenderBlock::~RenderBlock): Ditto.
3388         (WebCore::RenderBlock::setDesiredColumnCountAndWidth): Ditto.
3389         * rendering/RootInlineBox.cpp: Ditto.(WebCore::RootInlineBox::detachEllipsisBox): Ditto.
3390
3391 2007-11-02  Antti Koivisto  <antti@apple.com>
3392
3393         Reviewed by Darin.
3394
3395         Enable video composition.
3396
3397         * WebCore.base.exp:
3398         * platform/graphics/mac/MoviePrivateQTKit.mm:
3399         (WebCore::MoviePrivate::createQTMovieView):
3400         * platform/mac/WebCoreSystemInterface.h:
3401         * platform/mac/WebCoreSystemInterface.mm:
3402
3403 2007-11-02  Darin Adler  <darin@apple.com>
3404
3405         Reviewed by Mitz.
3406
3407         - fix http://bugs.webkit.org/show_bug.cgi?id=15806
3408           <rdar://problem/5561626> ASSERT(element->isRadioButton()) fires destroying form elements
3409
3410         Test: fast/forms/remove-radio-button-assert.html
3411
3412         * html/HTMLGenericFormElement.cpp: (WebCore::HTMLGenericFormElement::removeFromForm):
3413         Added protected function to be used by derived classes that need to do the same sort
3414         of removal from form that's automatically done by the base class in certain circumstances.
3415         * html/HTMLGenericFormElement.h: Added removeFromForm.
3416
3417         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::~HTMLInputElement):
3418         Call removeFromForm here so the element is removed before we destroy the HTMLInputElement
3419         part of this object. By the time we get to the base class's destructor it's too late.
3420         The problem is specific to radio buttons so we don't have to worry about other classes
3421         derived from HTMLGenericFormElement.
3422
3423 2007-11-02  Darin Adler  <darin@apple.com>
3424
3425         Reviewed by Mitz.
3426
3427         - speculative fix for http://bugs.webkit.org/show_bug.cgi?id=15805
3428           <rdar://problem/5510779> crashes in isLoadingMultipartContent
3429
3430         * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::isLoadingMultipartContent):
3431         Instead of asserting the frame loader is non-0, return false if it is 0.
3432
3433 2007-11-02  Darin Adler  <darin@apple.com>
3434
3435         Reviewed by Mitz.
3436
3437         - fix <rdar://problem/5530185> WebKit does not show <object> fallback content when both
3438           URL and MIME type is omitted
3439
3440         Already covered by existing tests (that had incorrect results).
3441
3442         * loader/FrameLoader.cpp: (WebCore::FrameLoader::requestObject): Return false to indicate
3443         failure when both URL and MIME type are empty. The old code would not attempt a load, but
3444         it would indicate success.
3445
3446         * rendering/RenderPartObject.cpp: (WebCore::RenderPartObject::updateWidget): Remove
3447         non-helpful early exit for the case where there is no URL and no type. Returning early
3448         prevents the fallback code from running.
3449
3450 2007-11-02  Alp Toker  <alp@atoker.com>
3451
3452         Reviewed by Darin.
3453
3454         Include Cairo headers properly
3455
3456         * platform/graphics/AffineTransform.h:
3457         * platform/graphics/ImageBuffer.h:
3458         * platform/graphics/cairo/AffineTransformCairo.cpp:
3459         * platform/gtk/FontPlatformDataGtk.cpp:
3460
3461 2007-11-01  Oliver Hunt  <oliver@apple.com>
3462
3463         Reviewed by Alexey.
3464
3465         Make sure we send the correct events for Capslock, Shift, Ctrl, Alt and the Windows key        
3466
3467         * platform/win/KeyEventWin.cpp:
3468         (WebCore::keyIdentifierForWindowsKeyCode):
3469         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3470
3471 2007-11-01  Geoffrey Garen  <ggaren@apple.com>
3472
3473         Reviewed by Maciej Stachowiak.
3474         
3475         In preparation for making List a simple stack-allocated Vector:
3476
3477         Removed all instances of List copying, assignment, and/or storage.
3478         
3479         Layout tests and JS tests pass.
3480
3481         * bindings/js/kjs_window.cpp:
3482         (KJS::WindowFunc::callAsFunction): Stores a Vector of protected 
3483         JSValue*'s instead of a List now. Converts to List on the fly when 
3484         calling the timer function. This is slightly less efficient, but the 
3485         common case is 0-2 arguments, so it's no biggie.
3486
3487         (HTML iBench shows no regression. PLT does not use JS timers.)
3488         
3489         (KJS::ScheduledAction::execute): Uses the more efficient and non-copying
3490         List::slice now.
3491         (KJS::ScheduledAction::ScheduledAction): ditto
3492
3493         * bindings/objc/WebScriptObject.mm:
3494         (getListFromNSArray): Takes a List out parameter now, to avoid copying.
3495
3496 2007-11-01  Oliver Hunt  <oliver@apple.com>
3497
3498         Reviewed by Geoff.
3499
3500         Correct event behaviour on certain control keys
3501
3502         Make sure we send the correct keyDown and keyUp events for the
3503         control keys CapsLock, Shift, Ctrl, Alt, and Meta/Command, and
3504         uses Windows key codes for the event keyCode.
3505
3506         * WebCore.base.exp:
3507         * page/EventHandler.cpp:
3508         (WebCore::EventHandler::keyEvent):
3509         * platform/PlatformKeyboardEvent.h:
3510         * platform/gtk/KeyEventGtk.cpp:
3511         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3512         * platform/mac/KeyEventMac.mm:
3513         (WebCore::keyIdentifierForKeyEvent):
3514         (WebCore::WindowsKeyCodeForKeyEvent):
3515         (WebCore::isKeyUpEvent):
3516         (WebCore::textFromEvent):
3517         (WebCore::unmodifiedTextFromEvent):
3518         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3519         * platform/win/KeyEventWin.cpp:
3520         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3521         * platform/wx/KeyEventWin.cpp:
3522         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3523
3524 2007-11-01  Timothy Hatcher  <timothy@apple.com>
3525
3526         Reviewed by Sam.
3527
3528         * page/inspector/inspector.css: Use the white disclosure triangles
3529           when a parent DOM element is sepected.
3530
3531 2007-11-01  Justin Garcia  <justin.garcia@apple.com>
3532
3533         Reviewed by Oliver Hunt.
3534
3535         <rdar://problem/5195056> Huge plain text pastes are slow, time spent in ApplyStyleCommand::doApply
3536
3537         * editing/ReplaceSelectionCommand.cpp:
3538         (WebCore::ReplaceSelectionCommand::doApply): No need to match style when pasting
3539         into a plaintext-only region, since when we build the fragment to insert from
3540         plain text, we don't put any style information on it, so it will automatically
3541         match style with no intervention.
3542         * editing/markup.cpp:
3543         (WebCore::createFragmentFromText): Place paragraphs into clones of the
3544         block being inserted into, instead of default paragraph elements,
3545         so that when inserted content will match the surrounding paragraph style.
3546         This was broken before, but I haven't added a layout test yet because
3547         there currently isn't a way to get only plain text onto the pasteboard
3548         in a layout test.
3549
3550 2007-11-01  Sam Weinig  <sam@webkit.org>
3551
3552         Reviewed by Adam Roben. 
3553
3554         Add a releaseRef method to COMPtr which matches the behavior
3555         of the method by the same name in PassRefPtr.  This is in
3556         preparation of adding autogenerated COM DOM bindings.
3557
3558         * platform/win/COMPtr.h:
3559         (COMPtr::releaseRef):
3560
3561 2007-11-01  Kevin Ollivier  <kevino@theolliviers.com>
3562
3563         wx impl. for DragController and EventHandler interfaces.
3564
3565         Reviewed by Adam Roben.
3566
3567         * page/wx: Added.
3568         * page/wx/DragControllerWx.cpp: Added.
3569         (WebCore::DragController::isCopyKeyDown):
3570         (WebCore::DragController::dragOperation):
3571         (WebCore::DragController::maxDragImageSize):
3572         * page/wx/EventHandlerWx.cpp: Added.
3573         (WebCore::EventHandler::passMousePressEventToSubframe):
3574         (WebCore::EventHandler::passMouseMoveEventToSubframe):
3575         (WebCore::EventHandler::passMouseReleaseEventToSubframe):
3576         (WebCore::EventHandler::passMousePressEventToScrollbar):
3577         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
3578         (WebCore::EventHandler::focusDocumentView):
3579         (WebCore::EventHandler::eventActivatedView):
3580         (WebCore::EventHandler::createDraggingClipboard):
3581
3582 2007-11-01  Kevin Ollivier  <kevino@theolliviers.com>
3583
3584         Adding files for wx impl. of editing interfaces.
3585
3586         Reviewed by Adam Roben.
3587
3588         * editing/wx: Added.
3589         * editing/wx/EditorWx.cpp: Added.
3590         (WebCore::Editor::newGeneralClipboard):
3591
3592 2007-11-01  Sam Weinig  <sam@webkit.org>
3593
3594         Reviewed by Adam Roben.
3595
3596         Make implicit conversions from LPCSTRs and BSTRs to WebCore string
3597         types possible in preparation of adding autogenerated COM DOM bindings.
3598
3599         * platform/AtomicString.cpp: 
3600         (WebCore::AtomicString::add):
3601         * platform/AtomicString.h:
3602         (WebCore::AtomicString::AtomicString):
3603         * platform/PlatformString.h:
3604         * platform/win/BString.cpp:
3605         (WebCore::BString::BString):
3606         * platform/win/BString.h:
3607
3608 2007-11-01  Brady Eidson  <beidson@apple.com>
3609
3610         Reviewed by Anders
3611
3612         Renamed a flag inside of SQLiteTransaction and added an accessor (for future work)
3613
3614         * platform/sql/SQLiteTransaction.cpp:
3615         (WebCore::SQLiteTransaction::SQLiteTransaction):
3616         (WebCore::SQLiteTransaction::~SQLiteTransaction):
3617         (WebCore::SQLiteTransaction::begin):
3618         (WebCore::SQLiteTransaction::commit):
3619         (WebCore::SQLiteTransaction::rollback):
3620         * platform/sql/SQLiteTransaction.h:
3621         (WebCore::SQLiteTransaction::inProgress):
3622
3623 2007-11-01  Adam Roben  <aroben@apple.com>
3624
3625         Remove all duplicate xcopy commands from WebCore's post-build step
3626
3627         Also add the /d option to the copy of platform/sql.
3628
3629         Rubberstamped by Sam.
3630
3631         * WebCore.vcproj/WebCore.vcproj:
3632
3633 2007-11-01  Adele Peterson  <adele@apple.com>
3634
3635         Reviewed by Maciej.
3636
3637         Add support for the animation of the -webkit-border-raduis properties.
3638
3639         * page/AnimationController.cpp:
3640         (WebCore::blendFunc): Added for IntSize.
3641         (WebCore::ImplicitAnimation::animate): Added cases for border radius properties.
3642
3643 2007-11-01  Alp Toker  <alp@atoker.com>
3644
3645         Reviewed by Mitz Pettel.
3646
3647         Fix an unbalanced save/restore.
3648
3649         * platform/graphics/cg/ImageCG.cpp:
3650         (WebCore::BitmapImage::draw):
3651
3652 2007-11-01  David Hyatt  <hyatt@apple.com>
3653
3654         Add support for the animation of the visibility property.
3655
3656         Reviewed by oliver, aroben
3657
3658         * page/AnimationController.cpp:
3659         (WebCore::blendFunc):
3660         (WebCore::ImplicitAnimation::animate):
3661
3662 2007-11-01  Kevin McCullough  <kmccullough@apple.com>
3663
3664         Reviewed by Adam.
3665
3666         - Made COMPtr be able to be used by certain other templates,
3667         specifically HashSet.
3668
3669         * platform/win/COMPtr.h:
3670         (WTF::):
3671
3672 2007-11-01  Dan Bernstein  <mitz@apple.com>
3673
3674         Reviewed by Dave Hyatt.
3675
3676         - fix http://bugs.webkit.org/show_bug.cgi?id=15015
3677           <rdar://problem/5420308> Most of www.aol.com redraws unnecessarily when headline/photo section changes
3678
3679         Test: fast/repaint/overflow-clip-subtree-layout.html
3680
3681         This patch does not address the bigger issue of doing a full relayout
3682         of inline flows containing floats, but it addresses the problem on
3683         aol.com, where the changes that trigger layout are confined to an
3684         overflow area inside the float.
3685
3686         * page/FrameView.cpp:
3687         (WebCore::FrameView::scheduleRelayoutOfSubtree): If the new and old
3688         layout roots are different but one descends from the other, make (or
3689         keep) the ancestor as the layout root.
3690         * rendering/RenderObject.cpp:
3691         (WebCore::objectIsRelayoutBoundary): Made boxes with overflow
3692         clipping and non-auto width and height relayout boundaries.
3693
3694 2007-11-01  Alexey Proskuryakov  <ap@webkit.org>
3695
3696         Reviewed by Mark Rowe.
3697
3698         Fixed line endings that got confused in this file somehow.
3699
3700         * platform/network/ResourceResponse.cpp:
3701         (WebCore::ResourceResponse::isAttachment):
3702
3703 2007-11-01  Peter Kasting  <zerodpx@gmail.com>
3704
3705         Reviewed by Dave Hyatt.
3706
3707         http://bugs.webkit.org/show_bug.cgi?id=15778
3708         Malformed GIFs should not result in memory corruption.
3709
3710         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3711         (WebCore::GIFImageDecoder::haveDecodedRow):
3712         * platform/image-decoders/gif/GIFImageReader.cpp:
3713         (GIFImageReader::output_row):
3714         (GIFImageReader::read):
3715
3716 2007-10-31  Adam Roben  <aroben@apple.com>
3717
3718         Fix a crash when parsing a cubic-bezier function
3719
3720         Reviewed by Hyatt.
3721
3722         Test: fast/css/parse-timing-function-crash.html
3723
3724         * WebCore.vcproj/WebCore.vcproj:
3725         * css/CSSParser.cpp:
3726         (WebCore::CSSParser::parseTimingFunctionValue): Don't walk off the end
3727         of the ValueList.
3728
3729 2007-10-31  David Hyatt  <hyatt@apple.com>
3730
3731         Fix a merge error from when I applied my patch to ToT.  A couple of lines should be part of an if.
3732
3733         * rendering/RenderStyle.cpp:
3734         (WebCore::RenderStyle::adjustTransitions):
3735
3736 2007-10-31  Anders Carlsson  <andersca@apple.com>
3737
3738         Reviewed by Sam.
3739
3740         Add new SQL callback interfaces and JS implementations of them.
3741         
3742         * DerivedSources.make:
3743         * WebCore.xcodeproj/project.pbxproj:
3744         * bindings/js/JSCustomSQLStatementCallback.cpp: Added.
3745         (WebCore::JSCustomSQLStatementCallback::JSCustomSQLStatementCallback):
3746         (WebCore::JSCustomSQLStatementCallback::handleEvent):
3747         * bindings/js/JSCustomSQLStatementCallback.h: Added.
3748         * bindings/js/JSCustomSQLStatementErrorCallback.cpp: Added.
3749         (WebCore::JSCustomSQLStatementErrorCallback::JSCustomSQLStatementErrorCallback):
3750         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
3751         * bindings/js/JSCustomSQLStatementErrorCallback.h: Added.
3752         * bindings/js/JSCustomSQLTransactionCallback.cpp: Added.
3753         (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
3754         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
3755         * bindings/js/JSCustomSQLTransactionCallback.h: Added.
3756         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: Added.
3757         (WebCore::JSCustomSQLTransactionErrorCallback::JSCustomSQLTransactionErrorCallback):
3758         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
3759         * bindings/js/JSCustomSQLTransactionErrorCallback.h: Added.
3760         * storage/JSCustomSQLStatementCallback.h: Added.
3761         * storage/JSCustomSQLStatementErrorCallback.h: Added.
3762         * storage/JSCustomSQLTransactionCallback.h: Added.
3763         * storage/JSCustomSQLTransactionErrorCallback.h: Added.
3764         * storage/SQLStatementCallback.h: Added.
3765         (WebCore::SQLStatementCallback::~SQLStatementCallback):
3766         * storage/SQLStatementCallback.idl: Added.
3767         * storage/SQLStatementErrorCallback.h: Added.
3768         (WebCore::SQLStatementErrorCallback::~SQLStatementErrorCallback):
3769         * storage/SQLStatementErrorCallback.idl: Added.
3770         * storage/SQLTransaction.h: Added.
3771         * storage/SQLTransaction.idl: Added.
3772         * storage/SQLTransactionCallback.h: Added.
3773         (WebCore::SQLTransactionCallback::~SQLTransactionCallback):
3774         * storage/SQLTransactionCallback.idl: Added.
3775         * storage/SQLTransactionErrorCallback.h: Added.
3776         (WebCore::SQLTransactionErrorCallback::~SQLTransactionErrorCallback):
3777         * storage/SQLTransactionErrorCallback.idl: Added.
3778
3779 2007-10-31  Justin Garcia  <justin.garcia@apple.com>
3780
3781         Reviewed by Dave Harrison.
3782
3783         <rdar://problem/5569741> Pasting content with a line break into a list can remove the list
3784
3785         * editing/htmlediting.cpp:
3786         (WebCore::enclosingEmptyListItem): A single list item can contain multiple 
3787         paragraphs, so if the incoming VisiblePosition is in an empty paragraph in a 
3788         list item, that list item isn't necessarily empty.
3789
3790 2007-10-31  David Hyatt  <hyatt@apple.com>
3791
3792         Disable style sharing for animating styles.
3793
3794         Reviewed by mitzpettel
3795
3796         * css/CSSStyleSelector.cpp:
3797         (WebCore::CSSStyleSelector::canShareStyleWithElement):
3798
3799 2007-10-31  Dan Bernstein  <mitz@apple.com>
3800
3801         Reviewed by Darin Adler.
3802
3803         - fix intermediate length calculation
3804
3805         * rendering/Length.h:
3806         (WebCore::Length::blend):
3807
3808 2007-10-31  Anders Carlsson  <andersca@apple.com>
3809
3810         Reviewed by Darin.
3811
3812         Add new SQLError implementation.
3813         
3814         * DerivedSources.make:
3815         * WebCore.vcproj/WebCore.vcproj:
3816         * WebCore.xcodeproj/project.pbxproj:
3817         * storage/SQLError.h: Added.
3818         (WebCore::SQLError::SQLError):
3819         (WebCore::SQLError::code):
3820         (WebCore::SQLError::message):
3821         * storage/SQLError.idl: Added.
3822
3823 2007-10-31  David Hyatt  <hyatt@apple.com>
3824
3825         Change the initial value of transition-property to all.  Change the initial value of
3826         transition-duration to 0.
3827
3828         Reviewed by antti
3829
3830         * rendering/RenderStyle.h:
3831         (WebCore::RenderStyle::initialTransitionDuration):
3832         (WebCore::RenderStyle::initialTransitionProperty):
3833
3834 2007-10-31  Alp Toker  <alp@atoker.com>
3835
3836         Reviewed by Mark Rowe.
3837
3838         The new Color must be marked valid.
3839
3840         * platform/graphics/gtk/ColorGtk.cpp:
3841
3842 2007-10-31  Simon Hausmann  <hausmann@kde.org>
3843
3844         Reviewed by Maciej;
3845
3846         Build fix for non-Qt builds.
3847
3848         * dom/XMLTokenizer.cpp:
3849         (WebCore::XMLTokenizer::XMLTokenizer):
3850
3851 2007-10-31  Simon Hausmann  <hausmann@kde.org>
3852
3853         Reviewed by Lars.
3854
3855         Fix dependency path to header files of the public API of the Qt port.
3856
3857         * WebCore.pro:
3858
3859 2007-10-31  Holger Freyther  <zecke@selfish.org>
3860
3861         Reviewed by Simon.
3862
3863         * QXmlStreamNamespaceDeclaration doesn't have the constructor we
3864         want to use for Qt4.3. Reenable the old code path which is likely
3865         to be dead as I have not checked if m_prefixToNamespaceMap is actually
3866         used.
3867         * Guard the entity resolver with the QT_VERSION as well.
3868         * Partially reverts 369506279abdaa863e15efed649ca19e062f2c30 and
3869         d2b54d0fc1b07a2480f4f7a1417abd7a636b0107 for Qt4.3.
3870
3871         * dom/XMLTokenizer.cpp:
3872         (WebCore::XMLTokenizer::XMLTokenizer):
3873         * dom/XMLTokenizer.h:
3874
3875 2007-10-31  Holger Freyther  <zecke@selfish.org>
3876
3877         Reviewed by Lars Knoll <lars@trolltech.com>.
3878
3879         * QMimeData::removeData will be new in Qt4.4, don't use it for Qt4.3 
3880         * Provide a bad fallback implementation to filter the format list.
3881
3882         * platform/qt/ClipboardQt.cpp:
3883         (WebCore::ClipboardQt::clearData):
3884
3885 2007-10-31  Lars Knoll  <lars@trolltech.com>
3886
3887         Reviewed by Simon.
3888
3889         add an entitiy resolver to QXmlStream.
3890         Fixes fast/parser/entities-in-attributes.xhtml.
3891
3892         * dom/XMLTokenizer.cpp:
3893         (WebCore::EntityResolver::resolveUndeclaredEntity):
3894         (WebCore::XMLTokenizer::XMLTokenizer):
3895         (WebCore::XMLTokenizer::~XMLTokenizer):
3896
3897 2007-10-31  Lars Knoll  <lars@trolltech.com>
3898
3899         Reviewed by Simon.
3900
3901         Fixes in the XML tokenizer when using QXmlStream.
3902         
3903         Use new functionality of QXmlStream in Qt 4.4 to simplify
3904         the code (but keep the old code for now to still support Qt 4.3).
3905         
3906         Add proper support for namespace handling when parsing into
3907         a document fragment.
3908
3909         * dom/XMLTokenizer.cpp:
3910         (WebCore::XMLTokenizer::XMLTokenizer):
3911         (WebCore::XMLTokenizer::write):
3912         (WebCore::XMLTokenizer::startElementNs):
3913         (WebCore::):
3914         * dom/XMLTokenizer.h:
3915
3916 2007-10-31  Lars Knoll  <lars@trolltech.com>
3917
3918         Reviewed by Simon.
3919
3920         add support for dragging images.
3921
3922         * platform/DragImage.h:
3923         * platform/qt/ClipboardQt.cpp:
3924         (WebCore::ClipboardQt::clearData):
3925         (WebCore::ClipboardQt::setDragImage):
3926         (WebCore::ClipboardQt::setDragImageElement):
3927         (WebCore::ClipboardQt::createDragImage):
3928         (WebCore::getCachedImage):
3929         (WebCore::ClipboardQt::declareAndWriteDragImage):
3930         * platform/qt/ClipboardQt.h:
3931
3932 2007-10-31  Lars Knoll  <lars@trolltech.com>
3933
3934         Reviewed by Simon.
3935
3936         fix most of the issues I found with Clipboard and DnD.
3937
3938         * editing/qt/EditorQt.cpp:
3939         * platform/qt/ClipboardQt.cpp:
3940         (WebCore::ClipboardQt::ClipboardQt):
3941         (WebCore::ClipboardQt::~ClipboardQt):
3942         (WebCore::ClipboardQt::clearData):
3943         (WebCore::ClipboardQt::clearAllData):
3944         (WebCore::ClipboardQt::getData):
3945         (WebCore::ClipboardQt::setData):
3946         (WebCore::ClipboardQt::types):
3947         (WebCore::ClipboardQt::setDragImage):
3948         (WebCore::ClipboardQt::setDragImageElement):
3949         (WebCore::ClipboardQt::declareAndWriteDragImage):
3950         (WebCore::ClipboardQt::writeURL):
3951         (WebCore::ClipboardQt::writeRange):
3952         (WebCore::ClipboardQt::hasData):
3953         * platform/qt/ClipboardQt.h:
3954         * platform/qt/DragDataQt.cpp:
3955         (WebCore::DragData::asURL):
3956
3957 2007-10-30  Mark Rowe  <mrowe@apple.com>
3958
3959         Fix the Gtk and Qt builds by stubbing out PlatformKeyboardEvent::currentCapsLockState.
3960
3961         * platform/gtk/KeyEventGtk.cpp:
3962         (WebCore::PlatformKeyboardEvent::currentCapsLockState):
3963         * platform/qt/PlatformKeyboardEventQt.cpp:
3964         (WebCore::PlatformKeyboardEvent::currentCapsLockState):
3965
3966 2007-10-31  Alexey Proskuryakov  <ap@webkit.org>
3967
3968         Reviewed by Anders.
3969
3970         http://bugs.webkit.org/show_bug.cgi?id=15762
3971         XSLStylesheet loads subresources from a wrong URL
3972
3973         Covered by corrected existing tests.
3974
3975         * xml/XSLStyleSheet.cpp:
3976         (WebCore::XSLStyleSheet::parseString): Pass stylesheet URL, not
3977         the document one.
3978
3979 2007-10-31  Alexey Proskuryakov  <ap@webkit.org>
3980
3981         Reviewed by Darin.
3982
3983         http://bugs.webkit.org/show_bug.cgi?id=10818
3984         String::append does 2 full copies instead of 1 (or zero!)
3985
3986         No change in functionality, thus no test.
3987
3988         * platform/String.cpp:
3989         (WebCore::String::append): Rewrote to copy once. Also removed an ancient
3990         FIXME that doesn't seem to make any sense. Note that append() behavior doesn't 
3991         match documented String behavior ("modifications to one instance will
3992         also modify all others"), but there are a lot of methods that don't.
3993
3994 2007-10-31  Adam Roben  <aroben@apple.com>
3995
3996         Windows build fix
3997
3998         * WebCore.vcproj/WebCore.vcproj: Add [JS]ProgressEvent.{cpp,h} files.
3999
4000 2007-10-30  Adam Roben  <aroben@apple.com>
4001
4002         Windows build fixes
4003
4004         I'm not completely sure why these const issues weren't caught by GCC,
4005         but MSVC was certainly not happy with them.
4006
4007         * editing/IndentOutdentCommand.cpp:
4008         (WebCore::isIndentBlockquote):
4009         * editing/markup.cpp:
4010         (WebCore::styleFromMatchedRulesAndInlineDecl):
4011
4012 2007-10-30  David Hyatt  <hyatt@apple.com>
4013
4014         transition-property was defaulting to all when it should default to none.  
4015
4016         It was taking a string type.  I figured out how to make it take an ident instead, so you can write:
4017
4018         transition-property: opacity
4019
4020         instead of
4021
4022         transition-property: "opacity"
4023
4024         Transition layers also weren't properly repeating patterns the way they were supposed to.  I fixed that.
4025
4026         Finally, I fixed a bug in the code to fix up transition layers where something was misplaced that should have been inside a null check.
4027
4028         Reviewed by aroben
4029
4030         * css/CSSHelper.h:
4031         * css/CSSParser.cpp:
4032         (WebCore::CSSParser::parseTransitionProperty):
4033         * css/CSSStyleSelector.cpp:
4034         (WebCore::CSSStyleSelector::adjustRenderStyle):
4035         * page/AnimationController.cpp:
4036         (WebCore::ImplicitAnimation::animate):
4037         * rendering/RenderStyle.cpp:
4038         (WebCore::RenderStyle::adjustTransitions):
4039         * rendering/RenderStyle.h:
4040         (WebCore::RenderStyle::initialTransitionProperty):
4041
4042 2007-10-30  Antti Koivisto  <antti@apple.com>
4043
4044         Reviewed by Geoff.
4045
4046         Leak fix
4047
4048         * platform/graphics/mac/MoviePrivateQTKit.mm:
4049         (WebCore::MoviePrivate::getSupportedTypes):
4050
4051 2007-10-30  Dan Bernstein  <mitz@apple.com>
4052
4053         Reviewed by Stephanie Lewis.
4054
4055         - fix <rdar://problem/5547237> REGRESSION (304-ToT): Repro font-related crash in fontdatawin.cpp Line 93 (many sites)
4056
4057         * platform/win/FontDataWin.cpp:
4058         (WebCore::FontData::platformInit): Handle the case where the font has no
4059         glyphs on page zero.
4060
4061 2007-10-30  David Hyatt  <hyatt@apple.com>
4062
4063         Make sure CSS transforms can be animated using the CSS transition property.
4064
4065         Reviewed by Dan and Antti
4066
4067         * css/CSSStyleSelector.cpp:
4068         (WebCore::CSSStyleSelector::applyProperty):
4069         * page/AnimationController.cpp:
4070         (WebCore::blendFunc):
4071         (WebCore::ImplicitAnimation::animate):
4072         * rendering/Length.h:
4073         (WebCore::Length::blend):
4074         * rendering/RenderStyle.cpp:
4075         (WebCore::StyleTransformData::operator==):
4076         (WebCore::TransformOperations::operator==):
4077         (WebCore::blendLengths):
4078         (WebCore::ScaleTransformOperation::blend):
4079         (WebCore::RotateTransformOperation::blend):
4080         (WebCore::SkewTransformOperation::blend):
4081         (WebCore::TranslateTransformOperation::blend):
4082         (WebCore::MatrixTransformOperation::blend):
4083         * rendering/RenderStyle.h:
4084         (WebCore::TransformOperations::operator!=):
4085         (WebCore::TransformOperations::isEmpty):
4086         (WebCore::TransformOperations::size):
4087         (WebCore::TransformOperations::operator[]):
4088         (WebCore::TransformOperations::append):
4089         (WebCore::RenderStyle::transform):
4090         (WebCore::RenderStyle::setTransform):
4091         (WebCore::RenderStyle::initialTransform):
4092
4093 2007-10-30  Antti Koivisto  <antti@apple.com>
4094
4095         Another Qt/GTK build fix.
4096
4097         * bindings/js/JSHTMLElementWrapperFactory.cpp:
4098
4099 2007-10-30  Antti Koivisto  <antti@apple.com>
4100
4101         Attempt to fix Qt/GTK build.
4102
4103         * WebCore.pro:
4104
4105 2007-10-30  Justin Garcia  <justin.garcia@apple.com>
4106
4107         Reviewed by Darin Adler.
4108
4109         <rdar://problem/5549929> CrashTracer: [USER] 35 crashes at WebCore::CharacterData::insertData
4110         
4111         We were trying to insert a tab into a br, after the br incorrectly ended up inside
4112         a tab span.
4113         
4114         * editing/DeleteButtonController.cpp: 
4115         (WebCore::isDeletableElement): Changed to take in a const Node* instead of a Node*.
4116         * editing/DeleteSelectionCommand.cpp:
4117         (WebCore::isTableRow): Ditto.
4118         * editing/IndentOutdentCommand.cpp:
4119         (WebCore::isIndentBlockquote): Ditto.
4120         (WebCore::isListOrIndentBlockquote): Ditto.
4121         * editing/InsertLineBreakCommand.cpp:
4122         (WebCore::InsertLineBreakCommand::shouldUseBreakElement): Added, moved code from
4123         doApply here.
4124         (WebCore::InsertLineBreakCommand::doApply): 
4125         Don't upstream() the insertion position.  upstream()ing it will only have an effect
4126         when the insertion position is the first in its paragraph (since we canonicalize
4127         VisiblePositions to the upstream() candidate).  In this start of paragraph case, 
4128         upstream() can move outside inline elements like tab spans or elements that might
4129         have a different whitespace mode (added two test cases to cover these).
4130         Moved code to decide whether to insert a br or a '\n' to its own method.
4131         Removed special case code for inserting at a position inside a tab span.  We instead
4132         adjust the insertion position before insertion if it is inside a tab span and
4133         handle insertion in the appropriate if-block.  This fixes a bug where we would 
4134         only insert one line break when two were needed (added a testcase).
4135         Removed special case code for inserting before and after tables and horizontal
4136         rules.  We handle these insertions in the appropriate if-block.
4137         * editing/InsertLineBreakCommand.h:
4138         * editing/ReplaceSelectionCommand.cpp:
4139         (WebCore::isMailPasteAsQuotationNode): Change to take in a const Node*.
4140         * editing/htmlediting.cpp:
4141         (WebCore::isContentEditable): Ditto.
4142         (WebCore::isBlock): Ditto.
4143         (WebCore::enclosingNodeOfType): Changed to take a function pointer to a function
4144         that takes in a const Node*.
4145         (WebCore::isTabSpanTextNode): Check to see that the node actually a text node,
4146         and not, say, a br.
4147         * editing/htmlediting.h:
4148         * editing/markup.cpp:
4149         (WebCore::styleFromMatchedRulesAndInlineDecl): Changed to take in a const Node*.
4150         (WebCore::elementHasTextDecorationProperty): Ditto.
4151
4152 2007-10-30  Antti Koivisto  <antti@apple.com>
4153
4154         Reviewed by NOBODY.
4155
4156         Add missing files.
4157
4158         * html/VoidCallback.cpp: Added.
4159         (VoidCallback::VoidCallback):
4160         (VoidCallback::~VoidCallback):
4161         (VoidCallback::handleEvent):
4162         (VoidCallback::execute):
4163         (VoidCallback::operator==):
4164         (WebCore::toVoidCallback):
4165         * html/VoidCallback.h: Added.
4166         * html/VoidCallback.idl: Added.
4167
4168 2007-10-30  David Kilzer  <ddkilzer@webkit.org>
4169
4170         Generated files missing from WebCore's Xcode project file
4171         <http://bugs.webkit.org/show_bug.cgi?id=15406>
4172
4173         Reviewed by Darin.
4174
4175         Added the following files to the Xcode project file (note that
4176         JSHTMLInputElementBaseTable.cpp is used as a header file):
4177
4178         - DOMCSSStyleSheetPrivate.h
4179         - DOMEventPrivate.h
4180         - DOMHTMLCollectionPrivate.h
4181         - DOMHTMLEmbedElementPrivate.h
4182         - DOMHTMLIFrameElementPrivate.h
4183         - DOMHTMLObjectElementPrivate.h
4184         - DOMHTMLSelectElementPrivate.h
4185         - DOMTextEventInternal.h
4186         - JSHTMLInputElementBaseTable.cpp
4187
4188         * DerivedSources.make: Removed DOMSVGException.h and JSSVGAnimatedPoints.h
4189         since their generated code was not used.
4190         * WebCore.xcodeproj/project.pbxproj: Added missing header files.
4191
4192 2007-10-29  Antti Koivisto  <antti@apple.com>
4193
4194         Rubber stamped by Adele.
4195
4196         Initial media (<video> and <audio>) support from feature branch and 
4197         QTKit based platform implementation.
4198         
4199         This will need to be updated to match current draft specification.
4200
4201         * Configurations/WebCore.xcconfig:
4202         * DerivedSources.make:
4203         * WebCore.base.exp:
4204         * WebCore.xcodeproj/project.pbxproj:
4205         * bindings/js/JSEventCustom.cpp:
4206         (WebCore::toJS):
4207         * bindings/js/JSHTMLAudioElementConstructor.cpp: Added.
4208         (WebCore::JSHTMLAudioElementConstructor::JSHTMLAudioElementConstructor):
4209         (WebCore::JSHTMLAudioElementConstructor::implementsConstruct):
4210         (WebCore::JSHTMLAudioElementConstructor::construct):
4211         * bindings/js/JSHTMLAudioElementConstructor.h: Added.
4212         * bindings/js/JSHTMLElementWrapperFactory.cpp:
4213         (WebCore::createJSHTMLWrapper):
4214         * bindings/js/kjs_window.cpp:
4215         (KJS::Window::getValueProperty):
4216         * bindings/js/kjs_window.h:
4217         (KJS::Window::):
4218         * bindings/scripts/CodeGeneratorJS.pm:
4219         * dom/Document.cpp:
4220         (WebCore::Document::createEvent):
4221         (WebCore::Document::willSaveToCache):
4222         (WebCore::Document::didRestoreFromCache):
4223         (WebCore::Document::registerForCacheCallbacks):
4224         (WebCore::Document::unregisterForCacheCallbacks):
4225         * dom/Document.h:
4226         * dom/Element.cpp:
4227         (WebCore::Element::setBooleanAttribute):
4228         * dom/Element.h:
4229         (WebCore::Element::willSaveToCache):
4230         * dom/Event.cpp:
4231         (WebCore::Event::isProgressEvent):
4232         * dom/Event.h:
4233         * dom/EventNames.h:
4234         * dom/EventTargetNode.cpp:
4235         (WebCore::EventTargetNode::dispatchProgressEvent):
4236         * dom/EventTargetNode.h:
4237         * dom/ProgressEvent.cpp: Added.
4238         (WebCore::ProgressEvent::ProgressEvent):
4239         (WebCore::ProgressEvent::initProgressEvent):
4240         (WebCore::ProgressEvent::initProgressEventNS):
4241         * dom/ProgressEvent.h: Added.
4242         (WebCore::ProgressEvent::lengthComputable):
4243         (WebCore::ProgressEvent::loaded):
4244         (WebCore::ProgressEvent::total):
4245         (WebCore::ProgressEvent::isProgressEvent):
4246         * dom/ProgressEvent.idl: Added.
4247         * history/CachedPage.cpp:
4248         (WebCore::CachedPage::CachedPage):
4249         * html/HTMLAttributeNames.in: