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