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