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