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