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