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