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