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