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