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