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