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