REGRESSION: Canvas is broken in high dpi mode
[WebKit-https.git] / WebCore / ChangeLog
1 2008-12-12  Oliver Hunt  <oliver@apple.com>
2
3         Reviewed by Alexey Proskuryakov.
4
5         REGRESSION: Canvas is broken in high dpi mode
6         <rdar://problem/6432739> <https://bugs.webkit.org/show_bug.cgi?id=22823>
7
8         Simply made sure that we correctly scale the graphics context to
9         account for the difference between logical and buffer resolution.
10
11         * html/HTMLCanvasElement.cpp:
12         (WebCore::HTMLCanvasElement::createImageBuffer):
13         (WebCore::HTMLCanvasElement::baseTransform):
14
15 2008-12-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
16
17         Rubber-stamped by Oliver Hunt.
18
19         Share PluginView::paintMissingPluginIcon() between ports
20
21         Also, enable this feature for Qt/X11, Qt/Mac and GTK
22
23         * plugins/PluginView.cpp:
24         (WebCore::PluginView::paintMissingPluginIcon):
25         * plugins/gtk/PluginViewGtk.cpp:
26         (WebCore::PluginView::paint):
27         * plugins/mac/PluginViewMac.cpp:
28         (WebCore::PluginView::paint):
29         * plugins/qt/PluginViewQt.cpp:
30         (WebCore::PluginView::paint):
31         * plugins/win/PluginViewWin.cpp:
32
33 2008-12-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
34
35         Reviewed by Simon Hausmann.
36
37         [Qt/Mac] Implement PluginView::updatePluginWidget()
38
39         We should update the window and clip rect regardless of whether or
40         not the plugin has been loaded, for example to ensure that the
41         missing plugin image is placed correctly.
42
43         * plugins/mac/PluginViewMac.cpp:
44         (WebCore::PluginView::setNPWindowIfNeeded):
45         (WebCore::PluginView::updatePluginWidget):
46
47 2008-12-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
48
49         Rubber-stamped by Oliver Hunt.
50
51         Make PluginView::updatePluginWidget() non-const
52
53         We can do this now since frameRectsChanged() is no longer const. This
54         also allows us to get rid of the mutables in the PluginView.
55
56         * platform/qt/TemporaryLinkStubs.cpp:
57         (PluginView::updatePluginWidget):
58         * plugins/PluginView.h:
59         * plugins/gtk/PluginViewGtk.cpp:
60         (WebCore::PluginView::updatePluginWidget):
61         * plugins/mac/PluginViewMac.cpp:
62         (WebCore::PluginView::updatePluginWidget):
63         * plugins/qt/PluginViewQt.cpp:
64         (WebCore::PluginView::updatePluginWidget):
65         * plugins/win/PluginViewWin.cpp:
66         (WebCore::PluginView::updatePluginWidget):
67         * plugins/wx/PluginViewWx.cpp:
68         (WebCore::PluginView::updatePluginWidget):
69
70 2008-12-12  Tor Arne Vestbø  <tavestbo@trolltech.com>
71
72         Reviewed by Simon Hausmann.
73
74         Implement ImageSource::filenameExtension() for the Qt port
75         
76         We're using QImageReader::imageFormat().toLower() to check
77         that the image format is supported, and if it is we store
78         the resulting extension when creating the ImageDecoderQt.
79
80         * platform/graphics/qt/ImageDecoderQt.cpp:
81         (WebCore::ImageDecoderQt::create):
82         (WebCore::ImageDecoderQt::ImageDecoderQt):
83         (WebCore::ImageDecoderQt::imageFormat):
84         * platform/graphics/qt/ImageDecoderQt.h:
85         * platform/graphics/qt/ImageSourceQt.cpp:
86         (WebCore::ImageSource::setData):
87         (WebCore::ImageSource::filenameExtension):
88
89 2008-12-11  Stephanie Lewis  <slewis@apple.com>
90
91         Reviewed by Geoff Garen
92
93         Account for the size of the response and request headers as well as other overhead
94         when calculating the size a resource takes up in the cache.  Halts unbounded 
95         growth in the cache.  Reduced stress test memory high water marks by > 50%.
96
97         Uses estimates gathered from the stress test to set the overhead size.  
98         A version of the patch was created that calculated most of the sizes, but it was 
99         decided that the patch was still at a basic level an estimate.  What gains it made
100         in accuracy was offset by the complexity involved in creating and updating the
101         estimate.
102
103         * loader/Cache.cpp:
104         (WebCore::Cache::resourceAccessed):
105         (WebCore::Cache::TypeStatistic::addResource):
106         (WebCore::Cache::dumpLRULists):
107         * loader/CachedResource.cpp:
108         (WebCore::CachedResource::overheadSize):
109         * loader/CachedResource.h:
110         (WebCore::CachedResource::size):
111
112 2008-12-11  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
113
114         Reviewed by Holger Freyther.
115
116         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22814
117
118         Add <wml> image element support. Based on HTML/SVGImage{Element/Loader}, with
119         the only difference that WML defines a second source attribute 'localsrc', that
120         takes precedence over the 'src' attribute. If loading the 'localsrc' attribute
121         fails, the user agent should try loading the 'src' attribute. If both fail the
122         'alt' fallback content will be used - just like in HTML.
123
124         Fixes: fast/wml/img-localsrc.wml (<img> and 'localsrc' attribute)
125                fast/wml/img-src-localsrc-alt.wml ('localsrc'/'src' fallback handling)
126                fast/wml/img-src.wml (<img> and 'src' attribute)
127
128         * GNUmakefile.am:
129         * WebCore.vcproj/WebCore.vcproj:
130         * WebCore.xcodeproj/project.pbxproj:
131         * rendering/HitTestResult.cpp:
132         (WebCore::HitTestResult::altDisplayString):
133         (WebCore::HitTestResult::absoluteImageURL):
134         * rendering/RenderImage.cpp:
135         (WebCore::RenderImage::updateAltText):
136         * wml/WMLImageElement.cpp: Added.
137         (WebCore::WMLImageElement::WMLImageElement):
138         (WebCore::WMLImageElement::~WMLImageElement):
139         (WebCore::WMLImageElement::mapToEntry):
140         (WebCore::WMLImageElement::parseMappedAttribute):
141         (WebCore::WMLImageElement::attach):
142         (WebCore::WMLImageElement::createRenderer):
143         (WebCore::WMLImageElement::insertedIntoDocument):
144         (WebCore::WMLImageElement::isURLAttribute):
145         (WebCore::WMLImageElement::imageSourceAttributeName):
146         (WebCore::WMLImageElement::altText):
147         * wml/WMLImageElement.h: Added.
148         (WebCore::WMLImageElement::useFallbackAttribute):
149         (WebCore::WMLImageElement::setUseFallbackAttribute):
150         * wml/WMLImageLoader.cpp: Added.
151         (WebCore::WMLImageLoader::WMLImageLoader):
152         (WebCore::WMLImageLoader::~WMLImageLoader):
153         (WebCore::WMLImageLoader::dispatchLoadEvent):
154         (WebCore::WMLImageLoader::sourceURI):
155         (WebCore::WMLImageLoader::notifyFinished):
156         * wml/WMLImageLoader.h: Added.
157         * wml/WMLTagNames.in:
158
159 2008-12-11  Holger Hans Peter Freyther  <zecke@selfish.org>
160
161         Reviewed by Darin Adler.
162
163         https://bugs.webkit.org/show_bug.cgi?id=22043
164
165         Do not run into the WebCore::DocumentLoader::updateLoading
166         ASSERT on Gtk+/CURL when trying to load tests from our LayoutTests.
167
168         Do not call setPrimaryLoadComplete when the
169         activeDocumentLoader has already been replaced. This can happen
170         when a script executed from within FramerLoader::didFinishLoading will
171         navigate to another URL.
172
173         The assertion is caused by existing tests (e.g.
174         fast/history/clicked-link-is-visited.html) reproducing this with
175         network backends not equal to curl is tough or maybe not
176         even possible.
177
178         * loader/DocumentLoader.cpp:
179         (WebCore::DocumentLoader::setPrimaryLoadComplete):
180
181 2008-12-11  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
182
183         Reviewed by Eric Seidel.
184
185         - Remove some dead, commented-out code from WMLAElement.
186         - Add missing virtual destructor for <noop>, as suggested by Alexey.
187         - Refactor addHTMLAlignment in a static helper function to share with WML.
188
189         * html/HTMLElement.cpp:
190         (WebCore::HTMLElement::addHTMLAlignment):
191         (WebCore::HTMLElement::addHTMLAlignmentToStyledElement):
192         * html/HTMLElement.h:
193         * wml/WMLAElement.cpp:
194         (WebCore::WMLAElement::defaultEventHandler):
195         * wml/WMLNoopElement.cpp:
196         (WebCore::WMLNoopElement::~WMLNoopElement):
197         * wml/WMLNoopElement.h:
198
199 2008-12-10  Oliver Hunt  <oliver@apple.com>
200
201         Reviewed by Adele Peterson.
202
203         <rdar://problem/6302405> Crash (null-deref) when using :before pseudoselector with content CSS rule in SVG
204         <https://bugs.webkit.org/show_bug.cgi?id=22804>
205
206         This issue was caused by css generated content resulting in non-svg flowboxes
207         being injected into SVG content.  As SVG spec does not describe behaviour in
208         this case, and neither Opera nor Firefox displays such generated content, so
209         now we make svg text layout and rendering just ignore any such content.
210
211         Test: svg/css/crash-css-generated-content.xhtml
212
213         * rendering/SVGRootInlineBox.cpp:
214         (WebCore::SVGRootInlineBox::buildLayoutInformation):
215         (WebCore::SVGRootInlineBox::layoutInlineBoxes):
216         (WebCore::SVGRootInlineBox::buildTextChunks):
217
218 2008-12-11  Cameron Zwarich  <zwarich@apple.com>
219
220         Reviewed by Dave Hyatt.
221
222         Bug 21256: REGRESSION (r36906): horizontally repeating image leaves ghosts when vertical scrolling
223         <https://bugs.webkit.org/show_bug.cgi?id=21256>
224         <rdar://problem/6362978>
225
226         The ScrollView refactoring in r36906 caused the ScrollView and the
227         platform widget to disagree about whether optimizing scrolling via
228         blitting is allowed. The easiest way to fix this is to make ScrollView
229         simply ask the platform widget whether this is safe on platforms that
230         are affected.
231
232         It is not possible to write a layout test for this bug because it
233         involves the back/forward cache.
234
235         * platform/ScrollView.cpp:
236         (WebCore::ScrollView::ScrollView):
237         (WebCore::ScrollView::setCanBlitOnScroll):
238         (WebCore::ScrollView::canBlitOnScroll):
239         (WebCore::ScrollView::platformSetCanBlitOnScroll):
240         (WebCore::ScrollView::platformCanBlitOnScroll):
241         * platform/ScrollView.h:
242         * platform/mac/ScrollViewMac.mm:
243         (WebCore::ScrollView::platformSetCanBlitOnScroll):
244         (WebCore::ScrollView::platformCanBlitOnScroll):
245         * platform/wx/ScrollViewWx.cpp:
246         (WebCore::ScrollView::platformSetCanBlitOnScroll):
247         (WebCore::ScrollView::platformCanBlitOnScroll):
248
249 2008-12-11  Brent Fulgham  <bfulgham@gmail.com>
250
251         Reviewed by Adam Roben.
252
253         https://bugs.webkit.org/show_bug.cgi?id=22808
254
255         Correct build break due to malformed XML in Visual Studio project
256         following @r39205 change.
257
258         * WebCore.vcproj/WebCore.vcproj: Correct file entry so project loads.
259
260 2008-12-10  Chris Marrin  <cmarrin@apple.com>
261
262         Reviewed by Dave Hyatt.
263
264         Fixed https://bugs.webkit.org/show_bug.cgi?id=22738
265
266         This gets rid of the per-animation timers which were used when an animation
267         started, ended and looped. Their job is now done by the main AnimationController's
268         timer. It is now set to fire as needed. For instance, if there is a delay, it will
269         fire after the delay time and then every 30ms to run the animation. The start, loop
270         and end events are generated as needed during the firing of this timer.
271
272         I had to add one more bit of code. When animation timers used to fire the animation events.
273         This would always happen from the RunLoop, so any style changes that happened in the
274         event handler would get picked up on the next updateRendering() call. But now the start
275         event is generated during the styleIsAvailable() call, which is in the middle of the 
276         updateRendering() cycle. And calling an event handler in the middle of updateRendering()
277         is not allowed and causes style changes to get missed. We already have a mechanism in
278         AnimationController to defer updateRendering() calls. So I added logic to defer all
279         event handling to there. Now, I put any request for event handling into a list and ask
280         for a deferred updateRendering() call. When that deferred timer fires, I go through that
281         list, send all the events and then call updateRendering().
282
283         * page/animation/AnimationBase.cpp:
284         (WebCore::AnimationBase::AnimationBase):
285         (WebCore::AnimationBase::updateStateMachine):
286         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
287         (WebCore::AnimationBase::willNeedService):
288         (WebCore::AnimationBase::goIntoEndingOrLoopingState):
289         * page/animation/AnimationBase.h:
290         * page/animation/AnimationController.cpp:
291         (WebCore::AnimationControllerPrivate::updateAnimationTimer):
292         (WebCore::AnimationControllerPrivate::updateRenderingDispatcherFired):
293         (WebCore::AnimationControllerPrivate::addEventToDispatch):
294         (WebCore::AnimationControllerPrivate::animationTimerFired):
295         (WebCore::AnimationController::addEventToDispatch):
296         * page/animation/AnimationController.h:
297         * page/animation/CompositeAnimation.cpp:
298         (WebCore::CompositeAnimationPrivate::updateTransitions):
299         (WebCore::CompositeAnimationPrivate::willNeedService):
300         (WebCore::CompositeAnimationPrivate::getAnimationForProperty):
301         (WebCore::CompositeAnimation::willNeedService):
302         (WebCore::CompositeAnimation::getAnimationForProperty):
303         * page/animation/CompositeAnimation.h:
304         * page/animation/ImplicitAnimation.cpp:
305         (WebCore::ImplicitAnimation::animate):
306         (WebCore::ImplicitAnimation::onAnimationEnd):
307         (WebCore::ImplicitAnimation::sendTransitionEvent):
308         * page/animation/ImplicitAnimation.h:
309         * page/animation/KeyframeAnimation.cpp:
310         (WebCore::KeyframeAnimation::animate):
311         (WebCore::KeyframeAnimation::sendAnimationEvent):
312         * page/animation/KeyframeAnimation.h:
313         (WebCore::KeyframeAnimation::setUnanimatedStyle):
314
315 2008-12-11  Simon Hausmann  <simon.hausmann@nokia.com>
316
317         Fix the Qt build with an empty filenameExtension() implementation.
318
319         * platform/graphics/qt/ImageSourceQt.cpp:
320         (WebCore::ImageSource::filenameExtension):
321
322 2008-12-11  Holger Hans Peter Freyther  <zecke@selfish.org>
323
324         Reviewed by Simon Hausmann.
325
326         Fix crash in the cairo implementation of the SVGPaintServer
327
328         For SVGFonts the RenderObject can be zero. The existing SVGFont
329         test cases is exposing this bug. Qt and other ports have fixed
330         this issue by adding null checks as well.
331
332         * svg/graphics/cairo/SVGPaintServerCairo.cpp:
333         (WebCore::SVGPaintServer::renderPath):
334
335 2008-12-11  Holger Freyther  <zecke@selfish.org>
336
337         Reviewed by Simon Hausmann.
338
339         https://bugs.webkit.org/show_bug.cgi?id=20953
340
341         Make the Qt port follow the Win, Mac, Gtk+ port in regard to Font
342         handling. FontQt.cpp from now on is only implementing the complex path. Create
343         FontFallbackListQt.cpp and FontPlatformDataQt.cpp to work within
344         the framework set by the Font code.
345
346         Sharing the Font.cpp implementation allows the Qt port to support
347         the CSS font faces and SVG fonts.
348
349         Split out the Qt4.3 Font handling into FonQt43.cpp to allow to more
350         easily deprecate it.
351
352         This commit is removing a lot of #ifdefs from Font.h as the Qt Font
353         implementation is now in line with the rest of WebCore.
354
355         * WebCore.pro:
356         * platform/graphics/Font.h: Remove #ifdefs
357         (WebCore::Font::letterSpacing):
358         (WebCore::Font::setLetterSpacing):
359         (WebCore::Font::isPlatformFont):
360         * platform/graphics/FontFallbackList.h:
361         * platform/graphics/SimpleFontData.cpp:
362         (WebCore::SimpleFontData::SimpleFontData):
363         (WebCore::SimpleFontData::platformGlyphInit): There is no GlyphCache
364         on Qt, move the initialisation over.
365         (WebCore::SimpleFontData::~SimpleFontData):
366         * platform/graphics/SimpleFontData.h:
367         (WebCore::SimpleFontData::getQtFont):
368         * platform/graphics/qt/FontCacheQt.cpp:
369         (WebCore::FontCache::getCachedFontPlatformData): Remove unused parameter
370         (WebCore::FontCache::releaseFontData): Add to build
371         * platform/graphics/qt/FontCustomPlatformData.cpp:
372         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
373         (WebCore::FontCustomPlatformData::fontPlatformData):
374         (WebCore::createFontCustomPlatformData):
375         * platform/graphics/qt/FontCustomPlatformData.h:
376         * platform/graphics/qt/FontFallbackListQt.cpp: Added.
377         (WebCore::FontFallbackList::FontFallbackList):
378         (WebCore::FontFallbackList::invalidate):
379         (WebCore::FontFallbackList::releaseFontData):
380         (WebCore::FontFallbackList::determinePitch):
381         (WebCore::FontFallbackList::fontDataAt):
382         (WebCore::FontFallbackList::fontDataForCharacters):
383         (WebCore::FontFallbackList::setPlatformFont):
384         * platform/graphics/qt/FontPlatformData.h:
385         (WebCore::FontPlatformData::font):
386         (WebCore::FontPlatformData::size):
387         * platform/graphics/qt/FontPlatformDataQt.cpp: Added.
388         (WebCore::FontPlatformData::FontPlatformData):
389         * platform/graphics/qt/FontQt.cpp:
390         (WebCore::Font::drawComplexText):
391         (WebCore::Font::floatWidthForComplexText):
392         (WebCore::Font::offsetForPositionForComplexText):
393         (WebCore::Font::selectionRectForComplexText):
394         (WebCore::Font::font):
395         * platform/graphics/qt/FontQt43.cpp: Added. Moved Qt4.3 code from FontQt.cpp
396         (WebCore::Font::drawComplexText):
397         (WebCore::Font::floatWidthForComplexText):
398         (WebCore::Font::offsetForPositionForComplexText):
399         (WebCore::Font::selectionRectForComplexText):
400         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
401         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
402         (WebCore::GlyphPageTreeNode::pruneTreeFontData):
403         * platform/graphics/qt/SimpleFontDataQt.cpp:
404         (WebCore::SimpleFontData::determinePitch):
405         (WebCore::SimpleFontData::containsCharacters):
406         (WebCore::SimpleFontData::platformInit):
407         (WebCore::SimpleFontData::platformGlyphInit):
408         (WebCore::SimpleFontData::platformDestroy):
409         * platform/qt/RenderThemeQt.cpp:
410         (WebCore::RenderThemeQt::adjustButtonStyle): Avoid crashes.
411
412 2008-12-11  Holger Freyther  <zecke@selfish.org>
413
414         Reviewed by Simon Hausmann.
415
416         https://bugs.webkit.org/show_bug.cgi?id=20953
417
418         For Qt it is not pratical to have a FontCache and GlyphPageTreeNode
419         implementation. This is one of the reasons why the Qt port is currently not
420         using WebCore/platform/graphics/Font.cpp. By allowing to not use
421         the simple/fast-path the Qt port will be able to use it.
422
423         Introduce USE(FONT_FAST_PATH) and define it for every port but the
424         Qt one.
425
426         * platform/graphics/Font.cpp:
427         (WebCore::Font::drawText):
428         (WebCore::Font::floatWidth):
429         (WebCore::Font::selectionRectForText):
430         (WebCore::Font::offsetForPosition):
431         * platform/graphics/Font.h:
432
433 2008-12-11  Holger Hans Peter Freyther  <zecke@selfish.org>
434
435         Reviewed by Darin Adler.
436
437         https://bugs.webkit.org/show_bug.cgi?id=20953
438
439         Split out the font fast path from Fast.cpp into FontFastPath.cpp. This
440         will allow the Qt port to share most of WebCore::Font
441         implementation but the fast path. Qt does not provide the API to get
442         individual Glyphs making the fast path hard to support.
443
444
445         * GNUmakefile.am:
446         * WebCore.vcproj/WebCore.vcproj:
447         * WebCore.xcodeproj/project.pbxproj:
448         * WebCoreSources.bkl:
449         * platform/graphics/Font.cpp:
450         * platform/graphics/FontFastPath.cpp: Added.
451         (WebCore::Font::glyphDataForCharacter):
452
453 2008-12-11  Robert Carr  <racarr@svn.gnome.org>
454
455         Reviewed by Holger Freyther.
456
457         https://bugs.webkit.org/show_bug.cgi?id=22560
458
459         Code in PlatformScreenGtk for screenDepth and screenRect can not
460         assume that the platformWindow for the widget has a valid "window"
461         member. For example in the case of, a new browser view opening as a
462         child of a GtkNotebook, but never being switched to, or manually
463         realized. Solve by using the toplevel window of the widget, rather
464         than the widget itself.
465
466         * platform/gtk/PlatformScreenGtk.cpp:
467         (WebCore::screenDepth):
468         (WebCore::screenRect):
469
470 2008-12-08  Tor Arne Vestbø  <tavestbo@trolltech.com>
471
472         Reviewed by Darin Adler and Holger Freyther.
473
474         Make Widget::frameRectsChanged() and overrides non-const
475
476         This will hopefully allow us to get rid of some of the mutables in
477         the classes that react to the callback by changing their own state.
478
479         * platform/ScrollView.cpp:
480         (WebCore::ScrollView::frameRectsChanged):
481         * platform/ScrollView.h:
482         * platform/Widget.h:
483         (WebCore::Widget::frameRectsChanged):
484         * platform/gtk/ScrollbarGtk.cpp: Remove non-const version since
485         this was more complex and did the same thing, changed const of
486         the leftover frameRectsChanged() method.
487         (ScrollbarGtk::frameRectsChanged):
488         * platform/gtk/ScrollbarGtk.h:
489         * plugins/PluginView.cpp:
490         (WebCore::PluginView::frameRectsChanged):
491         * plugins/PluginView.h:
492
493 2008-12-11  Holger Hans Peter Freyther  <zecke@selfish.org>
494
495         Reviewed and implemented with Tor Arne Vestbø.
496
497         Reimplement RenderTheme::caretBlinkInterval for Qt.
498
499         The QApplication::cursorFlashTime is in milliseconds and describes
500         the whole cycle while WebCore expects half a cycle.
501
502         * platform/qt/RenderThemeQt.cpp:
503         (WebCore::RenderThemeQt::caretBlinkInterval):
504         * platform/qt/RenderThemeQt.h:
505
506 2008-12-09  Trenton Schulz <trenton.schulz@nokia.com>
507
508         Reviewed by Tor Arne Vestbø.
509
510         [Qt/Mac] Don't call HIGetScaleFactor() if we're not on Tiger or better
511
512         * plugins/mac/PluginViewMac.cpp:
513         (WebCore::tigerOrBetter):
514         (WebCore::PluginView::globalMousePosForPlugin):
515
516 2008-12-10  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
517
518         Reviewed by Eric Seidel and George Staikos.
519
520         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22799
521
522         Add WML <template> support. The <template> element is specified at deck-level
523         and declares a template for all <card> elements in the document.
524
525         * GNUmakefile.am:
526         * WebCore.vcproj/WebCore.vcproj:
527         * WebCore.xcodeproj/project.pbxproj:
528         * editing/htmlediting.cpp:
529         (WebCore::canHaveChildrenForEditing): Treat <do> just like a <button>.
530         * wml/WMLCardElement.cpp:
531         (WebCore::WMLCardElement::WMLCardElement):
532         (WebCore::WMLCardElement::setTemplateElement):
533         (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded):
534         (WebCore::WMLCardElement::handleDeckLevelTaskOverridesIfNeeded):
535         * wml/WMLCardElement.h:
536         (WebCore::WMLCardElement::templateElement):
537         * wml/WMLDoElement.cpp:
538         (WebCore::WMLDoElement::insertedIntoDocument):
539         * wml/WMLDocument.cpp:
540         (WebCore::WMLDocument::finishedParsing):
541         * wml/WMLErrorHandling.cpp:
542         (WebCore::errorMessageForErrorCode):
543         * wml/WMLErrorHandling.h:
544         (WebCore::):
545         * wml/WMLEventHandlingElement.cpp:
546         (WebCore::WMLEventHandlingElement::~WMLEventHandlingElement):
547         * wml/WMLEventHandlingElement.h:
548         (WebCore::WMLEventHandlingElement::doElements):
549         * wml/WMLTagNames.in:
550         * wml/WMLTemplateElement.cpp: Added.
551         (WebCore::WMLTemplateElement::WMLTemplateElement):
552         (WebCore::WMLTemplateElement::~WMLTemplateElement):
553         (WebCore::WMLTemplateElement::parseMappedAttribute):
554         (WebCore::WMLTemplateElement::registerTemplatesInDocument):
555         * wml/WMLTemplateElement.h: Added.
556         * wml/WMLTimerElement.cpp:
557         (WebCore::WMLTimerElement::timerFired):
558
559 2008-12-09  Dmitry Titov  <dimich@chromium.org>
560
561         Reviewed by Darin Adler.
562
563         Fix memory leak - need to call stopActiveDOMObjects
564         when cached pages get destroyed.
565         https://bugs.webkit.org/show_bug.cgi?id=22753
566
567         * dom/Document.cpp:
568         (WebCore::Document::detach):
569
570 2008-12-10  Alice Liu  <alice.liu@apple.com>
571
572         Manual test for https://bugs.webkit.org/show_bug.cgi?id=20685
573
574         Reviewed by Darin Adler.
575
576         * manual-tests/drag-image-to-desktop.html: Added.
577
578 2008-12-10  Alice Liu  <alice.liu@apple.com>
579
580         fixed https://bugs.webkit.org/show_bug.cgi?id=20685
581
582         Reviewed by Darin Adler.
583
584         Manual test case is manual-tests/drag-image-to-desktop.html
585
586         Added new files to projects
587         * WebCore.vcproj/WebCore.vcproj:
588         * WebCore.xcodeproj/project.pbxproj:
589
590         * page/DragController.cpp:
591         (WebCore::DragController::startDrag):
592         * platform/MIMETypeRegistry.cpp:
593         (WebCore::initializeSupportedImageMIMETypes):
594         (WebCore::initializeSupportedImageMIMETypesForEncoding):
595
596         These changes add a method to obtain the extension for an image
597         * platform/graphics/BitmapImage.cpp:
598         (WebCore::BitmapImage::filenameExtension):
599         * platform/graphics/BitmapImage.h:
600         * platform/graphics/Image.h:
601         (WebCore::Image::filenameExtension):
602         * platform/graphics/ImageSource.h:
603         * platform/graphics/cairo/ImageSourceCairo.cpp:
604         (WebCore::ImageSource::filenameExtension):
605         * platform/graphics/cg/ImageSourceCG.cpp:
606         (WebCore::ImageSource::filenameExtension):
607
608         These changes added a utility that returns the preferred extension for a UTI
609         * platform/graphics/cg/ImageSourceCG.h: Added.
610         * platform/graphics/cg/ImageSourceCGMac.mm: Added.
611         (WebCore::MIMETypeForImageSourceType):
612         (WebCore::preferredExtensionForImageSourceType):
613         * platform/graphics/cg/ImageSourceCGWin.cpp: Added.
614         (WebCore::MIMETypeForImageSourceType):
615         (WebCore::preferredExtensionForImageSourceType):
616
617         * platform/mac/MIMETypeRegistryMac.mm:
618         moved getMIMETypeForUTI to ImageSourceCGMac.mm
619
620         Ask image for its file extension instead of relying on MIME type and file path
621         * platform/win/ClipboardWin.cpp:
622         (WebCore::createGlobalImageFileDescriptor):
623
624         Remove extraneous code from getPreferredExtensionForMIMEType.
625         Also moved getMIMETypeForUTI to ImageSourceCGWin.cpp
626         * platform/win/MIMETypeRegistryWin.cpp:
627         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
628
629 2008-12-10  Simon Fraser  <simon.fraser@apple.com>
630
631         Reviewed by Antti Koivisto
632
633         <rdar://problem/6431224>
634         
635         When updating the value of a slider, don't mark the parents
636         as needing layout, because the size of the slider can never
637         change. This fixes full-page repaints in some cases.
638
639         * rendering/RenderSlider.cpp:
640         (WebCore::RenderSlider::updateFromElement):
641
642 2008-12-10  Simon Fraser  <simon.fraser@apple.com>
643
644         Potential build fix. The forward declaration of FloatPoint should
645         be inside the WebCore namespace.
646         
647         * platform/graphics/FloatPoint3D.h:
648
649 2008-12-10  Simon Fraser  <simon.fraser@apple.com>
650
651         Reviewed by Sam Weinig
652
653         https://bugs.webkit.org/show_bug.cgi?id=22793
654
655         Cleanup FloatPoint3D: inline the getters and setters,
656         fix a potential divide-by-zero in normalize(), and add
657         a FloatPoint constructor.
658         
659         * platform/graphics/FloatPoint3D.cpp:
660         (WebCore::FloatPoint3D::FloatPoint3D):
661         (WebCore::FloatPoint3D::normalize):
662         * platform/graphics/FloatPoint3D.h:
663         (WebCore::FloatPoint3D::x):
664         (WebCore::FloatPoint3D::setX):
665         (WebCore::FloatPoint3D::y):
666         (WebCore::FloatPoint3D::setY):
667         (WebCore::FloatPoint3D::z):
668         (WebCore::FloatPoint3D::setZ):
669
670 2008-12-09  Julien Chaffraix  <jchaffraix@webkit.org>
671
672         Reviewed by Eric Seidel.
673
674         Bug 22665: Remove setCreatedByParser(bool) from the few elements that use it
675         https://bugs.webkit.org/show_bug.cgi?id=22665
676
677         - Removed setCreatedByParser from style and link elements.
678
679         - Removed XMLTokenizer::eventuallyMarkAsCreatedByParser.
680
681         * dom/XMLTokenizer.cpp:
682         * dom/XMLTokenizer.h:
683         * dom/XMLTokenizerLibxml2.cpp:
684         (WebCore::XMLTokenizer::startElementNs):
685         * dom/XMLTokenizerQt.cpp:
686         (WebCore::XMLTokenizer::parseStartElement):
687         * html/HTMLElementFactory.cpp:
688         (WebCore::linkConstructor):
689         (WebCore::styleConstructor):
690         * html/HTMLLinkElement.cpp:
691         (WebCore::HTMLLinkElement::HTMLLinkElement):
692         * html/HTMLLinkElement.h:
693         * html/HTMLStyleElement.cpp:
694         (WebCore::HTMLStyleElement::HTMLStyleElement):
695         * html/HTMLStyleElement.h:
696         * html/HTMLTagNames.in:
697         * svg/SVGStyleElement.cpp:
698         (WebCore::SVGStyleElement::SVGStyleElement):
699         * svg/SVGStyleElement.h:
700         * svg/svgtags.in:
701
702 2008-12-10  Brady Eidson  <beidson@apple.com>
703
704         Reviewed by Darin
705
706         https://bugs.webkit.org/show_bug.cgi?id=22194 and <rdar://problem/6388378> -
707         Dialog when going back to a page from whence you submitted a form
708
709         http://trac.webkit.org/changeset/37317 changed the manner in which headers are added to
710         http requests, which caused the networking layer to have an incomplete set of headers
711         just before consulting the Policy Delegate.  This caused a cache miss and incorrectly made
712         us believe we'd be resubmitting the form.
713
714         * loader/FrameLoader.cpp:
715         (WebCore::FrameLoader::loadItem):  Being careful to maintain the new behavior required by
716           the Origin header mechanism as discussed in bug 22194, restore the previous behavior of
717           setting all the headers before the networking layer is asked about the cache lookup.
718
719 2008-12-10  Dimitri Glazkov  <dglazkov@chromium.org>
720
721         Reviewed by Timothy Hatcher.
722
723         Add back ability to end all profiling via console by invoking profileEnd
724         with no arguments.
725
726         * page/Console.cpp:
727         (WebCore::Console::profileEnd): Removed title null-checking and
728             subsequent early exit.
729
730 2008-12-10  Pierre-Olivier Latour  <pol@apple.com>
731
732         Reviewed by Darin Adler.
733
734         KeyframeAnimation::animate() needs to compute the elapsed animation time
735         properly taking into account its paused state.
736
737         https://bugs.webkit.org/show_bug.cgi?id=22773
738
739         Test: animations/animation-drt-api-multiple-keyframes.html
740
741         * page/animation/KeyframeAnimation.cpp:
742         (WebCore::KeyframeAnimation::animate):
743
744 2008-12-10  Simon Fraser  <simon.fraser@apple.com>
745
746         Reviewed by Dan Bernstein
747
748         Part of
749         https://bugs.webkit.org/show_bug.cgi?id=22570
750         
751         Rename methods on RenderLayer for clarity:
752             clearClipRects -> clearClipRectsIncludingDescendants
753             clearClipRect  -> clearClipRects
754
755         * rendering/RenderBox.cpp:
756         (WebCore::RenderBox::destroy):
757         * rendering/RenderLayer.cpp:
758         (WebCore::RenderLayer::updateLayerPosition):
759         (WebCore::RenderLayer::removeOnlyThisLayer):
760         (WebCore::RenderLayer::insertOnlyThisLayer):
761         (WebCore::RenderLayer::clearClipRectsIncludingDescendants):
762         (WebCore::RenderLayer::clearClipRects):
763         * rendering/RenderLayer.h:
764         * rendering/RenderObject.cpp:
765         (WebCore::RenderObject::styleWillChange):
766         * rendering/RenderWidget.cpp:
767         (WebCore::RenderWidget::destroy):
768
769 2008-12-10  Kevin Ollivier  <kevino@theolliviers.com>
770
771         wx build fix after the script call stack/frame additions.
772         
773         * WebCoreSources.bkl:
774
775 2008-12-10   Srinivasa Rao M. Hamse  <msrinirao@gmail.com>
776
777         Reviewed by Holger Freyther.
778
779         F1-F12 key mappings for WebKit Gtk Port
780
781         * platform/gtk/KeyEventGtk.cpp:
782         (WebCore::windowsKeyCodeForKeyEvent):
783
784 2008-12-10  Enrico Ros  <enrico.ros@m31.com>
785
786         Reviewed by Simon Hausmann.
787
788         Fix the Qt build when SVG is disabled. A broken dependancy caused
789         unnecessary rebuilds even with no changes.
790
791         * WebCore.pro: fix a broken build dependancy
792
793 2008-12-10  Hironori Bono  <hbono@chromium.org>
794
795         Reviewed by Alexey Proskuryakov.
796
797         Bug 21820: Unable to enter the Tamil UNICODE Characters via Thamizha Phonetic IME
798         https://bugs.webkit.org/show_bug.cgi?id=21820
799
800         <rdar://problem/5683248> Typing backspace to delete a diacritical mark also deletes the character before (Arabic)
801         <rdar://problem/5702038> Backspace removes Thai Character in wrong sequence
802
803         Tests: editing/deleting/delete-ligature-001.html
804                editing/deleting/delete-ligature-002.html
805                editing/deleting/delete-ligature-003.html
806
807         * editing/TypingCommand.cpp:
808         (WebCore::TypingCommand::deleteKeyPressed): Delete only the last character
809         of a ligature which consists of multiple Unicode characters when deleting it with
810         a backspace key.
811
812 2008-12-10  David Levin  <levin@chromium.org>
813
814         Reviewed by Alexey Proskuryakov.
815
816         https://bugs.webkit.org/show_bug.cgi?id=22177
817         Fix the windows build by removing calls to notifyFormStateChanged
818         where they didn't appear in the original reviewed patch.
819
820         * html/HTMLInputElement.cpp:
821         (WebCore::HTMLInputElement::type):
822         (WebCore::HTMLInputElement::attach):
823
824 2008-12-09  Adam Barth  <abarth@webkit.org>
825
826         Reviewed by Sam Weinig.
827
828         Add ScriptController::updateSecurityOrigin to notify the bindings
829         that a document's securityOrigin has been updated.  This is used by
830         V8 to update its security context.
831
832         * bindings/js/ScriptController.cpp:
833         (WebCore::ScriptController::updateSecurityOrigin):
834         * bindings/js/ScriptController.h:
835         * dom/Document.cpp:
836         (WebCore::Document::setDomain):
837
838 2008-12-09  Eric Seidel  <eric@webkit.org>
839
840         No review, build fix only.
841
842         Fix a few config issues to let the Chromium Windows WebCore build get further.
843
844         * WebCore.scons:
845
846 2008-12-09  Brett Wilson  <brettw@chromium.org>
847
848         Reviewed by Dave Hyatt.
849
850         https://bugs.webkit.org/show_bug.cgi?id=22177
851
852         Add a callback on ChromeClient that the state of form elements on
853         the page has changed. This is to allow clients implementing session
854         saving to know when the current state is dirty.
855
856         * html/HTMLInputElement.cpp:
857         (WebCore::notifyFormStateChanged):
858         (WebCore::HTMLInputElement::setInputType):
859         (WebCore::HTMLInputElement::type):
860         (WebCore::HTMLInputElement::attach):
861         (WebCore::HTMLInputElement::setValue):
862         (WebCore::HTMLInputElement::setValueFromRenderer):
863         (WebCore::HTMLInputElement::setFileListFromRenderer):
864         * html/HTMLSelectElement.cpp:
865         (WebCore::HTMLSelectElement::setSelectedIndex):
866         * html/HTMLTextAreaElement.cpp:
867         (WebCore::notifyFormStateChanged):
868         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
869         (WebCore::HTMLTextAreaElement::updateValue):
870         (WebCore::HTMLTextAreaElement::setValue):
871         * loader/EmptyClients.h:
872         (WebCore::EmptyChromeClient::formStateDidChange):
873         * page/ChromeClient.h:
874
875 2008-12-09  Sam Weinig  <sam@webkit.org>
876
877         Reviewed by Darin Adler.
878
879         https://bugs.webkit.org/show_bug.cgi?id=19762
880
881         Fix intermittent crash in buildbot. The CSSCursorImageValues and
882         SVGCursorElements held onto raw SVGElement pointers without any
883         guarantee that the element is still around.
884
885         We did not fix the design that resulted in this issue, we just fixed
886         the pointer lifetimes.
887
888         * css/CSSCursorImageValue.cpp:
889         (WebCore::CSSCursorImageValue::~CSSCursorImageValue): Zero out the back pointers.
890         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed): Set up a back pointer.
891         (WebCore::CSSCursorImageValue::removeReferencedElement): Added. Used when the element
892         is destroyed.
893         * css/CSSCursorImageValue.h: Added removeReferencedElement.
894
895         * svg/SVGCursorElement.cpp:
896         (WebCore::SVGCursorElement::~SVGCursorElement): Zero out the back pointers.
897         (WebCore::SVGCursorElement::addClient): Set up a back pointer.
898         (WebCore::SVGCursorElement::removeClient): Zero out the back pointer.
899
900         * svg/SVGElement.cpp:
901         (WebCore::SVGElement::SVGElement): Initialize back pointers to zero.
902         (WebCore::SVGElement::~SVGElement): Call both the element and cursor image value
903         to remove the element from their sets.
904         * svg/SVGElement.h:
905         (WebCore::SVGElement::setCursorElement): Added.
906         (WebCore::SVGElement::setCursorImageValue): Added.
907
908 2008-12-09  David Hyatt  <hyatt@apple.com>
909
910         Add code that will create custom CSS scrollbars from the <body>, the document element (<html>) and the owning
911         frame/iframe.  If any of them set a custom style, it will be used.  The scrollbars do not update dynamically
912         yet as you switch from page to page (until they are destroyed and recreated).
913
914         Reviewed by Adele
915
916         * page/FrameView.cpp:
917         (WebCore::FrameView::createScrollbar):
918
919 2008-12-09  Ojan Vafai  <ojan@chromium.org>
920
921         Reviewed by Dave Hyatt.
922
923         https://bugs.webkit.org/show_bug.cgi?id=22689
924         Match Firefox button metrics on Windows.
925
926         * rendering/RenderButton.cpp:
927         (WebCore::RenderButton::addChild):
928         (WebCore::RenderButton::styleDidChange):
929         (WebCore::RenderButton::setupInnerStyle):
930         * rendering/RenderButton.h:
931         * rendering/RenderTheme.cpp:
932         (WebCore::RenderTheme::adjustButtonInnerStyle):
933         * rendering/RenderTheme.h:
934         * rendering/RenderThemeWin.cpp:
935         (WebCore::RenderThemeWin::adjustSliderThumbSize):
936         (WebCore::RenderThemeWin::adjustButtonInnerStyle):
937         * rendering/RenderThemeWin.h:
938
939 2008-12-09  Darin Fisher  <darin@chromium.org>
940
941         Fixes bustages.
942
943         https://bugs.webkit.org/show_bug.cgi?id=22631
944         Adding missing files from previous commit.
945
946         * bindings/js/ScriptCallFrame.cpp: Added.
947         (WebCore::ScriptCallFrame::ScriptCallFrame):
948         (WebCore::ScriptCallFrame::~ScriptCallFrame):
949         (WebCore::ScriptCallFrame::argumentAt):
950         * bindings/js/ScriptCallFrame.h: Added.
951         (WebCore::ScriptCallFrame::functionName):
952         (WebCore::ScriptCallFrame::sourceURL):
953         (WebCore::ScriptCallFrame::lineNumber):
954         (WebCore::ScriptCallFrame::argumentCount):
955         * bindings/js/ScriptCallStack.cpp: Added.
956         (WebCore::ScriptCallStack::ScriptCallStack):
957         (WebCore::ScriptCallStack::~ScriptCallStack):
958         (WebCore::ScriptCallStack::at):
959         (WebCore::ScriptCallStack::size):
960         (WebCore::ScriptCallStack::initialize):
961         * bindings/js/ScriptCallStack.h: Added.
962         (WebCore::ScriptCallStack::state):
963
964 2008-12-09  Dimitri Glazkov  <dglazkov@chromium.org>
965
966         Reviewed by Timothy Hatcher.
967
968         https://bugs.webkit.org/show_bug.cgi?id=22631
969         Streamline Console.cpp, abstract out the use of JSC::ExecState and
970         JSC::ArgList by introducing ScriptCallFrame and ScriptCallStack
971         abstractions.
972
973         * GNUmakefile.am: Added ScriptCallFrame and ScriptCallStack to build
974         * WebCore.pro:  Added ScriptCallFrame and ScriptCallStack to build
975         * WebCore.vcproj/WebCore.vcproj: Added ScriptCallFrame and
976         ScriptCallStack to project
977         * WebCore.xcodeproj/project.pbxproj: Added ScriptCallFrame and
978         ScriptCallStack to project
979         * bindings/js/JSConsoleCustom.cpp: Remove custom bindings.
980         * bindings/js/ScriptCallFrame.cpp: Added.
981         (WebCore::ScriptCallFrame::ScriptCallFrame):
982         (WebCore::ScriptCallFrame::~ScriptCallFrame):
983         (WebCore::ScriptCallFrame::argumentAt):
984         * bindings/js/ScriptCallFrame.h: Added.
985         (WebCore::ScriptCallFrame::functionName):
986         (WebCore::ScriptCallFrame::sourceURL):
987         (WebCore::ScriptCallFrame::lineNumber):
988         (WebCore::ScriptCallFrame::argumentCount):
989         * bindings/js/ScriptCallStack.cpp: Added.
990         (WebCore::ScriptCallStack::ScriptCallStack):
991         (WebCore::ScriptCallStack::~ScriptCallStack):
992         (WebCore::ScriptCallStack::at):
993         (WebCore::ScriptCallStack::size):
994         (WebCore::ScriptCallStack::initialize):
995         * bindings/js/ScriptCallStack.h: Added.
996         (WebCore::ScriptCallStack::ScriptCallStack):
997         (WebCore::ScriptCallStack::~ScriptCallStack):
998         (WebCore::ScriptCallStack::state):
999         (WebCore::ScriptCallStack::at):
1000         (WebCore::ScriptCallStack::size):
1001         (WebCore::ScriptCallStack::initialize):
1002         * bindings/js/ScriptString.h: Added missing PlatformString include.
1003         (WebCore::ScriptString::ScriptString): Added default constructor.
1004         (WebCore::ScriptString::operator==): Added equality operator.
1005         (WebCore::ScriptString::operator!=):
1006         * bindings/js/ScriptValue.cpp: Added isNull and isUndefined.
1007         (WebCore::ScriptValue::isNull):
1008         (WebCore::ScriptValue::isUndefined):
1009         * bindings/js/ScriptValue.h: Added isNull and isUndefined
1010         * bindings/scripts/CodeGeneratorJS.pm: Add handling for
1011         CustomArgumentHandling attribute.
1012         * inspector/InspectorController.cpp: Refactored to use 
1013         ScriptCallFrame and ScriptCallStack.
1014         (WebCore::ConsoleMessage::ConsoleMessage):
1015         (WebCore::InspectorController::addMessageToConsole):
1016         (WebCore::InspectorController::startGroup):
1017         (WebCore::InspectorController::addScriptConsoleMessage):
1018         (WebCore::InspectorController::count):
1019         (WebCore::InspectorController::startTiming):
1020         (WebCore::InspectorController::stopTiming):
1021         * inspector/InspectorController.h: Refactored to use ScriptCallFrame and
1022         ScriptCallStack.
1023         * inspector/front-end/Console.js: Modified to use argument value itself
1024         rather than f.name for stack trace.
1025         * page/Console.cpp: Refactored to use ScriptCallFrame and
1026         ScriptCallStack.
1027         (WebCore::getFirstArgumentAsString):
1028         (WebCore::Console::addMessage):
1029         (WebCore::Console::debug):
1030         (WebCore::Console::error):
1031         (WebCore::Console::info):
1032         (WebCore::Console::log):
1033         (WebCore::Console::dir):
1034         (WebCore::Console::dirxml):
1035         (WebCore::Console::trace):
1036         (WebCore::Console::assertCondition):
1037         (WebCore::Console::count):
1038         (WebCore::Console::profile):
1039         (WebCore::Console::profileEnd):
1040         (WebCore::Console::time):
1041         (WebCore::Console::timeEnd):
1042         (WebCore::Console::group):
1043         (WebCore::Console::warn):
1044         * page/Console.h:
1045         * page/Console.idl: Removed Custom attributes, added
1046         CustomArgumentHandling attributes, and tweaked argument defs.
1047
1048 2008-12-09  Darin Adler  <darin@apple.com>
1049
1050         Try to fix non-Mac builds.
1051
1052         * GNUmakefile.am: Added NavigatorBase.
1053         * WebCore.pro: Ditto.
1054         * WebCore.scons: Ditto.
1055         * WebCore.vcproj/WebCore.vcproj: Ditto.
1056         * WebCoreSources.bkl: Ditto.
1057
1058         Unrelated tweak sitting in my tree.
1059
1060         * bindings/objc/DOMAbstractView.mm: Remove pointless override of finalize method.
1061
1062 2008-12-09  Darin Adler  <darin@apple.com>
1063
1064         Try to fix Tiger build.
1065
1066         * platform/network/mac/NetworkStateNotifierMac.cpp: Declare CFRunLoopGetMain.
1067
1068 2008-12-09  Alexey Proskuryakov  <ap@webkit.org>
1069
1070         Reviewed by Darin Adler.
1071
1072         https://bugs.webkit.org/show_bug.cgi?id=22719
1073         Implement Navigator object in Workers
1074
1075         Test: fast/workers/worker-navigator.html
1076
1077         * DerivedSources.make:
1078         * GNUmakefile.am:
1079         * WebCore.pro:
1080         * WebCore.vcproj/WebCore.vcproj:
1081         * WebCore.xcodeproj/project.pbxproj:
1082         Added WorkerNavigator sources.
1083
1084         * bindings/js/JSWorkerContext.cpp: (WebCore::jsWorkerContextNavigator):
1085         Worker.navigator returns a WoerkerNavigator object (it is named just Navigator in the spec,
1086         but it is not the same interface that is available on Windows).
1087
1088         * dom/Worker.cpp:
1089         (WebCore::Worker::notifyFinished):
1090         * dom/WorkerContext.cpp:
1091         (WebCore::WorkerContext::WorkerContext):
1092         (WebCore::WorkerContext::navigator):
1093         * dom/WorkerContext.h:
1094         (WebCore::WorkerContext::create):
1095         * dom/WorkerThread.cpp:
1096         (WebCore::WorkerThread::create):
1097         (WebCore::WorkerThread::WorkerThread):
1098         (WebCore::WorkerThread::workerThread):
1099         * dom/WorkerThread.h:
1100         Pass a pre-computed user agent string into worker, because it cannot call a client method
1101         directly, and pre-computing is easier than sending a synchronous message to the main thread.
1102
1103         * page/Navigator.cpp:
1104         * page/Navigator.h:
1105         * page/NavigatorBase.cpp: Added.
1106         * page/NavigatorBase.h: Added.
1107         Factor out common (and uncommon, but very similar) functionality into a base class.
1108
1109         * page/WorkerNavigator.cpp: Added.
1110         * page/WorkerNavigator.h: Added.
1111         * page/WorkerNavigator.idl: Added.
1112         Per Web Workers and HTML5, implement a small subset of what we currently have in Window.Navigator.
1113
1114         * platform/network/NetworkStateNotifier.cpp: (WebCore::networkStateNotifier):
1115         Make networkStateNotifier() static constructor thread safe. The object is created on the
1116         thread it is first called from, while callbacks are registered on the main thread. Calls to
1117         onLine() from other threads are safe, because it is just loading a boolean.
1118
1119         * platform/network/mac/NetworkStateNotifierMac.cpp: (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1120         Schedule notifications on main event loop, not the current one.
1121
1122 2008-12-09  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1123
1124         Rubber-stamped by Alexey Proskuryakov.
1125
1126         Forgot to update Qt/WML build - add some new files to the build.
1127
1128         * WebCore.pro:
1129
1130 2008-12-09  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
1131
1132         Reviewed by Alexey Proskuryakov.
1133
1134         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22637
1135
1136         Implement the GET method for WMLGoElement, and some test covering it's behaviour.
1137         Update all build systems supporting WML that haven't been updated since a while.
1138
1139         Add WMLPostField stub implementation, needed for implementing POST method.
1140
1141         Tests: wml/go-task-get-method-external-deck-with-href.html
1142                wml/go-task-get-method-external-deck.html
1143                wml/go-task-get-method-same-deck.html
1144
1145         * GNUmakefile.am:
1146         * WebCore.vcproj/WebCore.vcproj:
1147         * WebCore.xcodeproj/project.pbxproj:
1148         * dom/Document.cpp:
1149         (WebCore::Document::resetWMLPageState):
1150         * wml/WMLCardElement.cpp:
1151         * wml/WMLCardElement.h:
1152         * wml/WMLEventHandlingElement.cpp:
1153         (WebCore::WMLCardElement::registerDoElement):
1154         * wml/WMLEventHandlingElement.h:
1155         * wml/WMLGoElement.cpp:
1156         (WebCore::WMLGoElement::WMLGoElement):
1157         (WebCore::WMLGoElement::registerPostfieldElement):
1158         (WebCore::WMLGoElement::parseMappedAttribute):
1159         (WebCore::WMLGoElement::executeTask):
1160         (WebCore::WMLGoElement::parseContentType):
1161         (WebCore::WMLGoElement::preparePOSTRequest):
1162         (WebCore::WMLGoElement::prepareGETRequest):
1163         * wml/WMLGoElement.h:
1164         * wml/WMLPostfieldElement.cpp: Added.
1165         (WebCore::WMLPostfieldElement::WMLPostfieldElement):
1166         (WebCore::WMLPostfieldElement::parseMappedAttribute):
1167         (WebCore::WMLPostfieldElement::insertedIntoDocument):
1168         * wml/WMLPostfieldElement.h: Added.
1169         (WebCore::WMLPostfieldElement::name):
1170         (WebCore::WMLPostfieldElement::value):
1171         * wml/WMLTagNames.in:
1172
1173 2008-12-08  Peter Kasting  <pkasting@google.com>
1174
1175         Reviewed by Anders Carlsson.
1176
1177         https://bugs.webkit.org/show_bug.cgi?id=16814
1178         Allow ports to disable ActiveX->NPAPI conversion for Media Player.
1179         Improve handling of miscellaneous ActiveX objects.
1180
1181         * rendering/RenderPartObject.cpp:
1182         (WebCore::mapClassIdToServiceType):
1183         (WebCore::shouldUseChildEmbedOfObject):
1184         (WebCore::RenderPartObject::updateWidget):
1185
1186 2008-12-08  Darin Adler  <darin@apple.com>
1187
1188         Reviewed by John Sullivan.
1189
1190         - fix https://bugs.webkit.org/show_bug.cgi?id=22409
1191           REGRESSION: cmd-shift-left/right don't switch tabs, instead select text
1192
1193         Tests: editing/execCommand/enabling-and-selection-2.html
1194                editing/execCommand/enabling-and-selection.html
1195
1196         * editing/EditorCommand.cpp: Updated table to use these functions by their new names.
1197         (WebCore::enabledVisibleSelection): Renamed this to reflect its new algorithm.
1198         An invisible selection with a position that selects no characters doesn't count
1199         as a visible selection.
1200         (WebCore::enabledVisibleSelectionAndMark): Ditto.
1201
1202 2008-12-08  David Kilzer  <ddkilzer@apple.com>
1203
1204         Remove duplicate entries from WebCore project.
1205
1206         Reviewed by Eric Seidel.
1207
1208         Bug 22555: Sort "children" sections in Xcode project files.
1209         <https://bugs.webkit.org/show_bug.cgi?id=22555>
1210
1211         Recipe for removing duplicates:
1212         $ ./WebKitTools/Scripts/sort-Xcode-project-file project.pbxproj
1213         $ uniq < project.pbxproj | diff -u project.pbxproj - | patch -p0 project.pbxproj
1214
1215         * WebCore.xcodeproj/project.pbxproj: Removed duplicates.
1216
1217 2008-12-08  Julien Chaffraix  <jchaffraix@webkit.org>
1218
1219         Reviewed by Darin Adler.
1220
1221         Bug 22665: Remove setCreatedByParser(bool) from the few elements that use it
1222         https://bugs.webkit.org/show_bug.cgi?id=22665
1223
1224         Remove setCreatedByParser from the script elements (HTML and SVG).
1225
1226         * dom/XMLTokenizer.cpp:
1227         (WebCore::XMLTokenizer::eventuallyMarkAsParserCreated): Removed
1228         call to setCreatedByParser for the 2 elements.
1229
1230         * dom/make_names.pl: Modified to call the constructor with
1231         the createByParser parameter if 'constructorNeedsCreatedByParser'
1232         is set.
1233
1234         * html/HTMLElementFactory.cpp:
1235         (WebCore::scriptConstructor):
1236         * html/HTMLScriptElement.cpp:
1237         (WebCore::HTMLScriptElement::HTMLScriptElement):
1238         * html/HTMLScriptElement.h:
1239         * html/HTMLTagNames.in: Added constructorNeedsCreatedByParser
1240         to script.
1241         * svg/SVGScriptElement.cpp:
1242         (WebCore::SVGScriptElement::SVGScriptElement):
1243         * svg/SVGScriptElement.h:
1244         * svg/svgtags.in: Added constructorNeedsCreatedByParser
1245         to script.
1246
1247 2008-12-08  David Kilzer  <ddkilzer@apple.com>
1248
1249         Bug 22555: Sort "children" sections in Xcode project files
1250
1251         <https://bugs.webkit.org/show_bug.cgi?id=22555>
1252
1253         Reviewed by Eric Seidel.
1254
1255         * WebCore.xcodeproj/project.pbxproj: Sorted.
1256         * manual-tests/NPN_Invoke/NPN_Invoke.xcodeproj/project.pbxproj: Sorted.
1257
1258 2008-12-08  Tony Chang  <tony@chromium.org>
1259
1260         Reviewed by Eric Seidel.
1261
1262         Add a bool to GraphicsContext so that shadows can ignore
1263         transformations.  This is needed by HTML canvas element
1264         where the spec says shadows are applied w/o transformations.
1265         https://bugs.webkit.org/show_bug.cgi?id=22580
1266
1267         No functional changes, thus no tests.
1268
1269         * html/CanvasRenderingContext2D.cpp:
1270         (WebCore::CanvasRenderingContext2D::setShadow):
1271         (WebCore::CanvasRenderingContext2D::applyShadow):
1272         * html/HTMLCanvasElement.cpp:
1273         (WebCore::HTMLCanvasElement::createImageBuffer):
1274         * platform/graphics/GraphicsContext.cpp:
1275         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
1276         * platform/graphics/GraphicsContext.h:
1277         * platform/graphics/GraphicsContextPrivate.h:
1278         (WebCore::GraphicsContextState::GraphicsContextState):
1279         * platform/graphics/cg/GraphicsContextCG.cpp:
1280         (WebCore::GraphicsContext::setPlatformShadow):
1281
1282 2008-12-08  Julien Chaffraix  <jchaffraix@webkit.org>
1283
1284         Reviewed by Darin Adler.
1285
1286         Bug 17897: Not Rendering Images Imported from XHTML Document
1287         <rdar://problem/5827614>
1288
1289         When we were loading document with XMLHttpRequest that contained images, the images
1290         would not be fetched as they would not be displayed. However if we inserted such
1291         an image element into a rendered document, we would not fetch the image and thus never
1292         display it.
1293
1294         Now we check if the image has been loaded when we insert an HTMLImageElement into a
1295         document.
1296         To enable this, the image loader has an error flag. To avoid doing several attempts
1297         when we know that the image is in error, we store the failed URL.
1298         However Firefox and Opera ignore errors when the 'src' attribute changes and thus
1299         we also have an updateFromElementIgnoringPreviousError to match the other browser.
1300
1301         Tests: http/tests/misc/image-blocked-src-change.html
1302                http/tests/misc/image-blocked-src-no-change.html
1303                http/tests/xmlhttprequest/xmlhttprequest-image-not-loaded-svg.svg
1304                http/tests/xmlhttprequest/xmlhttprequest-image-not-loaded.html
1305
1306         * html/HTMLEmbedElement.cpp:
1307         (WebCore::HTMLEmbedElement::parseMappedAttribute): Changed to call updateFromElementIgnoringPreviousError.
1308         * html/HTMLImageElement.cpp:
1309         (WebCore::HTMLImageElement::parseMappedAttribute): Ditto.
1310         (WebCore::HTMLImageElement::insertedIntoDocument): Call updateFromElement if we do not have
1311         an image.
1312
1313         * html/HTMLInputElement.cpp:
1314         (WebCore::HTMLInputElement::parseMappedAttribute): Changed to call updateFromElementIgnoringPreviousError.
1315         * html/HTMLObjectElement.cpp:
1316         (WebCore::HTMLObjectElement::parseMappedAttribute): Ditto.
1317         * html/HTMLVideoElement.cpp:
1318         (WebCore::HTMLVideoElement::parseMappedAttribute): Ditto.
1319         * loader/ImageLoader.cpp:
1320         (WebCore::ImageLoader::setImage): Added an assertion.
1321         (WebCore::ImageLoader::updateFromElement): Added a check for load error (to avoid displaying
1322         multiple errors in the console for a single image load).
1323
1324         (WebCore::ImageLoader::updateFromElementIgnoringPreviousError): This method clears previous error
1325         before calling updateFromElement.
1326
1327         (WebCore::ImageLoader::notifyFinished): Added an assertion.
1328         * loader/ImageLoader.h:
1329         * svg/SVGImageElement.cpp:
1330         (WebCore::SVGImageElement::svgAttributeChanged): Changed to call updateFromElementIgnoringPreviousError.
1331
1332 2008-12-08  David Hyatt  <hyatt@apple.com>
1333
1334         Make scrollbar creation virtual on ScrollView so that FrameView can have the capability to create
1335         custom CSS scrollbars.
1336
1337         Reviewed by Eric Seidel
1338
1339         * page/FrameView.cpp:
1340         (WebCore::FrameView::createScrollbar):
1341         * page/FrameView.h:
1342         * platform/ScrollView.cpp:
1343         (WebCore::ScrollView::setHasHorizontalScrollbar):
1344         (WebCore::ScrollView::setHasVerticalScrollbar):
1345         (WebCore::ScrollView::createScrollbar):
1346         * platform/ScrollView.h:
1347
1348 2008-12-08  Dan Bernstein  <mitz@apple.com>
1349
1350         Reviewed by John Sullivan.
1351
1352         - WebCore part of tracking the global history item for a WebView
1353
1354         * loader/FrameLoader.cpp:
1355         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Set the page's
1356         global history item to the current back/forward list item, respecting
1357         private browsing mode.
1358         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Ditto in this
1359         case.
1360         (WebCore::FrameLoader::goToItem): Ditto in this case.
1361         (WebCore::FrameLoader::updateHistoryForStandardLoad): If this load
1362         creates a new global history item, set the page's global history item
1363         to it.
1364         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory):
1365         Ditto.
1366         * page/Page.cpp:
1367         (WebCore::Page::setGlobalHistoryItem): Added this setter.
1368         * page/Page.h: Added a m_globalHistoryItem data member.
1369         (WebCore::Page::globalHistoryItem): Added this getter.
1370
1371 2008-12-08  Antti Koivisto  <antti@apple.com>
1372
1373         Reviewed by Dave Kilzer.
1374
1375         A few stylistic fixes suggested by Dave Kilzer.
1376
1377         * css/CSSPrimitiveValue.cpp:
1378         (WebCore::CSSPrimitiveValue::createIdentifier):
1379         (WebCore::CSSPrimitiveValue::create):
1380
1381 2008-12-08  Alexey Proskuryakov  <ap@webkit.org>
1382
1383         Reviewed by Darin Adler.
1384
1385         https://bugs.webkit.org/show_bug.cgi?id=22737
1386         Try debug version when locating CFNetwork
1387
1388         * platform/network/cf/ResourceRequestCFNet.cpp:
1389         (WebCore::findCFNetworkModule):
1390         (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
1391         (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
1392         * platform/network/win/CookieJarCFNetWin.cpp:
1393         (WebCore::findCFNetworkModule):
1394         (WebCore::findIsHTTPOnlyFunction):
1395
1396 2008-12-08  Aaron Boodman  <aa@chromium.org>
1397
1398         Reviewed by Stephanie Lewis.
1399
1400         https://bugs.webkit.org/show_bug.cgi?id=22301
1401         Make dispatchDidFinishLoading() always fire before didFinishLoadForFrame().
1402
1403         * loader/FrameLoader.cpp:
1404         (WebCore::FrameLoader::finishedParsing):
1405
1406 2008-12-08  Trenton Schulz <trenton.schulz@nokia.com>
1407
1408         Rubber-stamped by Tor Arne Vestbø.
1409
1410         Fix build warning on Mac
1411
1412         * platform/text/mac/StringImplMac.mm:
1413
1414 2008-12-08  Simon Hausmann  <simon.hausmann@nokia.com>
1415
1416         Fix the Qt build.
1417
1418         * bridge/qt/qt_runtime.cpp:
1419         (JSC::Bindings::convertQVariantToValue): Pass JSGlobalData to RegExp
1420           constructor.
1421
1422 2008-12-08  Oliver Hunt  <oliver@apple.com>
1423
1424         Reviewed by Alexey Proskuryakov.
1425
1426         Bug 22398: r39059: Crash when clearing webkitTransitionDuration in webkitTransitionEnd event handler
1427         <rdar://problem/6426245> REGRESSION(r39059): Reproducible crash when clearing webkitTransitionDuration in webkitTransitionEnd event handler (22398)
1428
1429         This regression was caused by r39059 replacing the protector on the active
1430         animation with a protector on just the composition.  It turns out that both
1431         protectors are necessary.
1432
1433         Test: transitions/transition-duration-cleared-in-transitionend-crash.html
1434
1435         * page/animation/AnimationBase.cpp:
1436         (WebCore::AnimationBase::animationTimerCallbackFired):
1437
1438 2008-12-08  Dmitry Titov  <dimich@chromium.org>
1439
1440         Reviewed by Alexey Proskuryakov.
1441
1442         https://bugs.webkit.org/show_bug.cgi?id=22732
1443         Remove unused files PausedTimeouts.h,.cpp
1444         The change that deprecated this code was https://bugs.webkit.org/show_bug.cgi?id=22620
1445
1446         * GNUmakefile.am:
1447         * WebCore.pro:
1448         * WebCore.scons:
1449         * WebCore.vcproj/WebCore.vcproj:
1450         * WebCore.xcodeproj/project.pbxproj:
1451         * WebCoreSources.bkl:
1452           These are build files which had PausedTimeouts referenced.
1453
1454         * bindings/js/PausedTimeouts.cpp: Removed.
1455         * bindings/js/PausedTimeouts.h: Removed.
1456         * bindings/js/ScriptController.cpp: Removed '#include'
1457         * page/Chrome.cpp: Removed '#include' and unused variable.
1458
1459 2008-12-07  Simon Fraser  <simon.fraser@apple.com>
1460
1461         Reviewed by Dan Bernstein
1462
1463         https://bugs.webkit.org/show_bug.cgi?id=22594
1464
1465         Fix issues which break reading inline style for -webkit-transition
1466         and -webkit-transform-origin.
1467         
1468         Test: fast/css/transform-inline-style.html
1469
1470         * css/CSSMutableStyleDeclaration.cpp:
1471         (WebCore::CSSMutableStyleDeclaration::getPropertyValue): Add cases 
1472         for CSSPropertyWebkitTransformOrigin and CSSPropertyWebkitTransition
1473         so that these shorthand properties are returned correctly.
1474         * css/CSSParser.cpp:
1475         (WebCore::CSSParser::parseAnimationProperty): Create CSSPrimitiveValues
1476         with the correct CSSValueAll and CSSValueNone identifiers, not the
1477         RenderStyle-level cAnimateAll, cAnimateNone.
1478         * css/CSSStyleSelector.cpp:
1479         (WebCore::CSSStyleSelector::mapAnimationProperty): Special-case CSSValueAll
1480         and CSSValueNone values to set cAnimateAll and cAnimateNone transition properties.
1481
1482 2008-12-07  Antti Koivisto  <antti@apple.com>
1483
1484         Reviewed by Darin Adler.
1485
1486         https://bugs.webkit.org/show_bug.cgi?id=22717
1487         Make CSS values use less memory
1488         
1489         Share CSSPrimitiveValue objects for commonly used values including
1490         - idents
1491         - colors
1492         - small integers
1493         
1494         This reduces the amount CSSPrimitiveValue instances by > 80%.
1495
1496         * css/CSSPrimitiveValue.cpp:
1497         (WebCore::CSSPrimitiveValue::createIdentifier):
1498         (WebCore::CSSPrimitiveValue::createColor):
1499         (WebCore::CSSPrimitiveValue::create):
1500         * css/CSSPrimitiveValue.h:
1501         (WebCore::CSSPrimitiveValue::create):
1502
1503 2008-12-07  Antti Koivisto  <antti@apple.com>
1504
1505         Reviewed by Darin Adler.
1506
1507         https://bugs.webkit.org/show_bug.cgi?id=22717
1508         Make CSS values use less memory
1509
1510         Get CSSValues off from the common StyleBase base class. They don't
1511         need a parent pointer or anything else there and there is no real
1512         reason to have them in same data structures with other CSSOM objects.
1513         
1514         Disabled (instead of refactoring around the lack of common base) the ability 
1515         to have style declaration blocks as CSS variable values. They don't exist in 
1516         the spec so I wasn't sure if they have future or not. It would not be hard to 
1517         get them back. CSS variables are in any case an experimental feature and 
1518         not enabled by default.
1519
1520         * css/CSSInitialValue.h:
1521         (WebCore::CSSInitialValue::createExplicit):
1522         (WebCore::CSSInitialValue::createImplicit):
1523         * css/CSSParser.cpp:
1524         (WebCore::CSSParser::addVariableDeclarationBlock):
1525         * css/CSSParser.h:
1526         * css/CSSValue.h:
1527         (WebCore::CSSValue::~CSSValue):
1528         (WebCore::CSSValue::parserValue):
1529         * css/CSSVariablesDeclaration.cpp:
1530         (WebCore::CSSVariablesDeclaration::CSSVariablesDeclaration):
1531         (WebCore::CSSVariablesDeclaration::getVariableValue):
1532         (WebCore::CSSVariablesDeclaration::removeVariable):
1533         (WebCore::CSSVariablesDeclaration::addParsedVariable):
1534         (WebCore::CSSVariablesDeclaration::getParsedVariable):
1535         (WebCore::CSSVariablesDeclaration::getParsedVariableDeclarationBlock):
1536         * css/CSSVariablesDeclaration.h:
1537         (WebCore::CSSVariablesDeclaration::create):
1538         * css/StyleBase.h:
1539
1540 2008-12-07  Dirk Schulze  <krit@webkit.org>
1541
1542         Reviewed by Oliver Hunt.
1543
1544         Add gradient and pattern support for strokeRect on canvas/Cg.
1545
1546         Canvas strokeRect() doesn't support gradients
1547         https://bugs.webkit.org/show_bug.cgi?id=19790
1548
1549         Test: fast/canvas/canvas-strokeRect.html
1550
1551         * platform/graphics/cg/GraphicsContextCG.cpp:
1552         (WebCore::GraphicsContext::strokeRect):
1553
1554 2008-12-06  Dirk Schulze  <krit@webkit.org>
1555
1556         Reviewed by Oliver Hunt.
1557
1558         Add support for setTransform() in canvas.
1559
1560         <canvas> lacks transform() and setTransform()
1561         https://bugs.webkit.org/show_bug.cgi?id=16604
1562
1563         Test: fast/canvas/canvas-setTransform.html
1564
1565         * html/CanvasRenderingContext2D.cpp:
1566         (WebCore::CanvasRenderingContext2D::State::State):
1567         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
1568         (WebCore::CanvasRenderingContext2D::setFillStyle):
1569         (WebCore::CanvasRenderingContext2D::scale):
1570         (WebCore::CanvasRenderingContext2D::rotate):
1571         (WebCore::CanvasRenderingContext2D::translate):
1572         (WebCore::CanvasRenderingContext2D::transform):
1573         (WebCore::CanvasRenderingContext2D::setTransform):
1574         (WebCore::CanvasRenderingContext2D::beginPath):
1575         (WebCore::CanvasRenderingContext2D::closePath):
1576         (WebCore::CanvasRenderingContext2D::moveTo):
1577         (WebCore::CanvasRenderingContext2D::lineTo):
1578         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
1579         (WebCore::CanvasRenderingContext2D::bezierCurveTo):
1580         (WebCore::CanvasRenderingContext2D::arcTo):
1581         (WebCore::CanvasRenderingContext2D::arc):
1582         (WebCore::CanvasRenderingContext2D::rect):
1583         (WebCore::CanvasRenderingContext2D::fill):
1584         (WebCore::CanvasRenderingContext2D::stroke):
1585         (WebCore::CanvasRenderingContext2D::clip):
1586         (WebCore::CanvasRenderingContext2D::isPointInPath):
1587         (WebCore::CanvasRenderingContext2D::clearRect):
1588         (WebCore::CanvasRenderingContext2D::fillRect):
1589         (WebCore::CanvasRenderingContext2D::strokeRect):
1590         (WebCore::CanvasRenderingContext2D::drawImage):
1591         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
1592         (WebCore::CanvasRenderingContext2D::willDraw):
1593         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1594         * html/CanvasRenderingContext2D.h:
1595         * html/CanvasRenderingContext2D.idl:
1596         * html/HTMLCanvasElement.cpp:
1597         (WebCore::HTMLCanvasElement::baseTransform):
1598         * html/HTMLCanvasElement.h:
1599         * platform/graphics/ImageBuffer.h:
1600         (WebCore::ImageBuffer::baseTransform):
1601
1602 2008-12-06  Antti Koivisto  <antti@apple.com>
1603
1604         Reviewed by Darin Adler.
1605
1606         Also copy m_implicit field. Darin wanted this change commited separately.
1607
1608         * css/CSSProperty.h:
1609         (WebCore::CSSProperty::operator=):
1610
1611 2008-12-06  Antti Koivisto  <antti@apple.com>
1612
1613         Reviewed by Darin Adler.
1614
1615         https://bugs.webkit.org/show_bug.cgi?id=22379
1616         Make CSSOM use less memory
1617         
1618         Use vector instead of a double linked list for properties in CSSMutableStyleDeclaration.
1619         
1620         Taught setter functions to use existing slots to avoid memory moves, plus some
1621         other optimizations.
1622
1623         * WebCore.xcodeproj/project.pbxproj:
1624         * css/CSSMutableStyleDeclaration.cpp:
1625         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
1626         (WebCore::CSSMutableStyleDeclaration::operator=):
1627         (WebCore::CSSMutableStyleDeclaration::getPropertyCSSValue):
1628         (WebCore::CSSMutableStyleDeclaration::removeShorthandProperty):
1629         (WebCore::CSSMutableStyleDeclaration::removeProperty):
1630         (WebCore::CSSMutableStyleDeclaration::getPropertyPriority):
1631         (WebCore::CSSMutableStyleDeclaration::getPropertyShorthand):
1632         (WebCore::CSSMutableStyleDeclaration::isPropertyImplicit):
1633         (WebCore::CSSMutableStyleDeclaration::setProperty):
1634         (WebCore::CSSMutableStyleDeclaration::setPropertyInternal):
1635         (WebCore::CSSMutableStyleDeclaration::setStringProperty):
1636         (WebCore::CSSMutableStyleDeclaration::setImageProperty):
1637         (WebCore::CSSMutableStyleDeclaration::parseDeclaration):
1638         (WebCore::CSSMutableStyleDeclaration::addParsedProperties):
1639         (WebCore::CSSMutableStyleDeclaration::addParsedProperty):
1640         (WebCore::CSSMutableStyleDeclaration::setLengthProperty):
1641         (WebCore::CSSMutableStyleDeclaration::length):
1642         (WebCore::CSSMutableStyleDeclaration::item):
1643         (WebCore::CSSMutableStyleDeclaration::cssText):
1644         (WebCore::CSSMutableStyleDeclaration::setCssText):
1645         (WebCore::CSSMutableStyleDeclaration::merge):
1646         (WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
1647         (WebCore::CSSMutableStyleDeclaration::copy):
1648         (WebCore::CSSMutableStyleDeclaration::findPropertyWithId):
1649         * css/CSSMutableStyleDeclaration.h:
1650         (WebCore::CSSMutableStyleDeclarationConstIterator::operator*):
1651         (WebCore::CSSMutableStyleDeclarationConstIterator::operator->):
1652         (WebCore::CSSMutableStyleDeclarationConstIterator::operator!=):
1653         (WebCore::CSSMutableStyleDeclarationConstIterator::operator==):
1654         (WebCore::CSSMutableStyleDeclaration::create):
1655         (WebCore::CSSMutableStyleDeclaration::begin):
1656         (WebCore::CSSMutableStyleDeclaration::end):
1657         (WebCore::CSSMutableStyleDeclarationConstIterator::CSSMutableStyleDeclarationConstIterator):
1658         (WebCore::CSSMutableStyleDeclarationConstIterator::~CSSMutableStyleDeclarationConstIterator):
1659         (WebCore::CSSMutableStyleDeclarationConstIterator::operator=):
1660         (WebCore::CSSMutableStyleDeclarationConstIterator::operator++):
1661         (WebCore::CSSMutableStyleDeclarationConstIterator::operator--):
1662         * css/CSSProperty.h:
1663         (WTF::):
1664         * css/CSSStyleDeclaration.cpp:
1665         (WebCore::CSSStyleDeclaration::diff):
1666         (WebCore::CSSStyleDeclaration::copyPropertiesInSet):
1667         * css/CSSStyleSelector.cpp:
1668         (WebCore::CSSStyleSelector::resolveVariablesForDeclaration):
1669         (WebCore::CSSStyleSelector::keyframeStylesForAnimation):
1670         (WebCore::CSSStyleSelector::applyDeclarations):
1671         * dom/EventTarget.h:
1672         * editing/ApplyStyleCommand.cpp:
1673         (WebCore::StyleChange::init):
1674         (WebCore::ApplyStyleCommand::isHTMLStyleNode):
1675         (WebCore::ApplyStyleCommand::removeHTMLFontStyle):
1676         (WebCore::ApplyStyleCommand::removeCSSStyle):
1677         * editing/Editor.cpp:
1678         (WebCore::Editor::selectionStartHasStyle):
1679         (WebCore::updateState):
1680         * editing/ReplaceSelectionCommand.cpp:
1681         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
1682         * editing/markup.cpp:
1683         (WebCore::appendStartMarkup):
1684
1685 2008-12-06  Simon Fraser  <simon.fraser@apple.com>
1686
1687         Reviewed by Antti Koivisto, Dan Bernstein
1688
1689         https://bugs.webkit.org/show_bug.cgi?id=22088
1690
1691         Fix logic related to repainting when transform changes:
1692         If an object has a layer, and the transform changes, then we need
1693         to do a repaintIncludingDescendants(), not just a repaint.
1694         
1695         Test: fast/repaint/transform-repaint-descendants.html
1696
1697         * rendering/RenderObject.cpp:
1698         (WebCore::RenderObject::styleWillChange):
1699
1700 2008-12-06  Simon Fraser  <simon.fraser@apple.com>
1701
1702         Reviewed by Dan Bernstein
1703
1704         https://bugs.webkit.org/show_bug.cgi?id=15739
1705
1706         When painting the selection on a replaced element, paint
1707         using local coordinates so that the selection is correctly
1708         painted for transformed elements.
1709
1710         Test: fast/replaced/selection-rect-transform.html
1711
1712         * rendering/RenderReplaced.cpp:
1713         (WebCore::RenderReplaced::paint):
1714
1715 2008-12-06  Simon Fraser  <simon.fraser@apple.com>
1716
1717         Reviewed by Dave Hyatt
1718
1719         https://bugs.webkit.org/show_bug.cgi?id=15671
1720         
1721         Fix caret rendering to behave correctly with transforms:
1722         * Rename caretRect() methods to localCaretRect() and
1723           absoluteCaretBounds() as appropriate
1724         * Fix localCaretRect() methods to return a rect in the
1725           appropriate coordinates.
1726         * Pass tx, ty down through the paintCaret() methods, after fixing them
1727           up to account for differences between contents coords, and renderer-local
1728           coords (via RenderBlock::offsetForContents()).
1729         * Remove m_caretPositionOnLayout from SelectionController, and instead
1730           call invalidateSelection() from RenderLayer::scrollToOffset(), because
1731           we can no longer assume simple x/y offsets from scrolling with transforms.
1732         * Move the logic to compute which RenderObject actually paints the caret into
1733           SelectionController::caretRenderer(), rather than having it in RenderBlock.
1734         * SelectionController now computes and caches a local caret rect. For invalidation,
1735           it computes the absolute bounds of that (possibly transformed) local rect.
1736           The local rect is computed in the coordinate system of the RenderObject that
1737           will paint the caret (this may require offsetting from the actual renderer
1738           at the start of the selection).
1739         * Fix LayoutState(RenderObject* root) to take transforms into account
1740         * Make offsetFromContainer() a virtual method on RenderObject, and implement
1741           the RenderObject version. It's used to map from selection start renderer
1742           to caret renderer.
1743
1744         Test: fast/transforms/transformed-caret.html
1745
1746         * WebCore.base.exp:
1747         * editing/DeleteSelectionCommand.cpp:
1748         (WebCore::DeleteSelectionCommand::mergeParagraphs):
1749         * editing/SelectionController.cpp:
1750         (WebCore::SelectionController::SelectionController):
1751         (WebCore::absoluteCaretY):
1752         (WebCore::SelectionController::modify):
1753         (WebCore::SelectionController::xPosForVerticalArrowNavigation):
1754         (WebCore::SelectionController::layout):
1755         (WebCore::SelectionController::caretRenderer):
1756         (WebCore::SelectionController::localCaretRect):
1757         (WebCore::SelectionController::absoluteCaretBounds):
1758         (WebCore::SelectionController::caretRepaintRect):
1759         (WebCore::SelectionController::recomputeCaretRect):
1760         (WebCore::SelectionController::invalidateCaretRect):
1761         (WebCore::SelectionController::paintCaret):
1762         (WebCore::SelectionController::caretRendersInsideNode):
1763         * editing/SelectionController.h:
1764         * editing/VisiblePosition.cpp:
1765         (WebCore::VisiblePosition::localCaretRect):
1766         (WebCore::VisiblePosition::absoluteCaretBounds):
1767         (WebCore::VisiblePosition::xOffsetForVerticalNavigation):
1768         * editing/VisiblePosition.h:
1769         * editing/mac/SelectionControllerMac.mm:
1770         (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
1771         * html/HTMLElement.cpp:
1772         (WebCore::HTMLElement::isContentEditable):
1773         * page/AccessibilityRenderObject.cpp:
1774         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
1775         * page/Frame.cpp:
1776         (WebCore::Frame::firstRectForRange):
1777         (WebCore::Frame::selectionLayoutChanged):
1778         (WebCore::Frame::paintCaret):
1779         (WebCore::Frame::paintDragCaret):
1780         (WebCore::Frame::revealSelection):
1781         (WebCore::Frame::revealCaret):
1782         * page/Frame.h:
1783         * rendering/LayoutState.cpp:
1784         (WebCore::LayoutState::LayoutState):
1785         * rendering/RenderBlock.cpp:
1786         (WebCore::RenderBlock::paintCaret):
1787         (WebCore::RenderBlock::paintObject):
1788         (WebCore::RenderBlock::positionForCoordinates):
1789         (WebCore::RenderBlock::offsetForContents):
1790         * rendering/RenderBlock.h:
1791         * rendering/RenderBox.cpp:
1792         (WebCore::RenderBox::localCaretRect):
1793         * rendering/RenderBox.h:
1794         * rendering/RenderFlow.cpp:
1795         (WebCore::RenderFlow::localCaretRect):
1796         * rendering/RenderFlow.h:
1797         * rendering/RenderLayer.cpp:
1798         (WebCore::RenderLayer::scrollToOffset):
1799         * rendering/RenderObject.cpp:
1800         (WebCore::RenderObject::localCaretRect):
1801         * rendering/RenderObject.h:
1802         * rendering/RenderSVGInlineText.cpp:
1803         (WebCore::RenderSVGInlineText::localCaretRect):
1804         * rendering/RenderSVGInlineText.h:
1805         * rendering/RenderText.cpp:
1806         (WebCore::RenderText::RenderText):
1807         (WebCore::RenderText::localCaretRect):
1808         * rendering/RenderText.h:
1809
1810 2008-12-06  David Kilzer  <ddkilzer@apple.com>
1811
1812         Bug 22711: Current svn (build 39065) fails to compile
1813
1814         <https://bugs.webkit.org/show_bug.cgi?id=22711>
1815
1816         BUILD FIX for r39065: Forgot parentheses after "document".
1817
1818         Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
1819         <https://bugs.webkit.org/show_bug.cgi?id=22666>
1820
1821         * svg/SVGFEImageElement.cpp:
1822         (WebCore::SVGFEImageElement::addSubresourceAttributeURLs): Changed
1823         document to document().
1824
1825 2008-12-06  Dmitry Titov  <dimich@chromium.org>
1826
1827         Reviewed by Alexey Proskuryakov.
1828
1829         https://bugs.webkit.org/show_bug.cgi?id=22710
1830         Memory leak due to circular reference Document->DOMTimer->ScheduledAction->[JS objects]->Document
1831
1832         * bindings/js/DOMTimer.cpp:
1833         (WebCore::DOMTimer::stop): Delete ScheduledAction, which contains a protected object.
1834
1835 2008-12-06  David Kilzer  <ddkilzer@apple.com>
1836
1837         Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
1838
1839         <https://bugs.webkit.org/show_bug.cgi?id=22666>
1840
1841         Reviewed by Darin Adler.
1842
1843         When creating a webarchive from WebCore::LegacyWebArchive::create(),
1844         HashSet<String>, Vector<KURL> and Vector<String> were all used to
1845         store a list of URLs for resources found in the document.  Instead
1846         use a single ListHashSet<KURL> to store the list and resolve the
1847         relative URLs as they're added.  We use a new inline method called
1848         WebCore::addSubresourceURL() to add KURL objects to the ListHashSet
1849         to prevent "null" KURL objects from crashing in the KURL hashing
1850         function.
1851
1852         * WebCore.base.exp: Changed export of
1853         WebCore::Node::getSubresourceURLs() to take a ListHashSet<KURL>
1854         argument instead of a Vector<KURL>.
1855
1856         * WebCore.xcodeproj/project.pbxproj: Marked KURLHash.h as a private
1857         header for use in WebKit.
1858
1859         * css/CSSStyleSheet.cpp:
1860         (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Renamed from
1861         addSubresourceURLStrings().  Changed to use ListHashSet<KURL>
1862         instead of HashSet<String>.  Cleaned up code.
1863         * css/CSSStyleSheet.h:
1864         (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Ditto.
1865         * css/StyleSheet.h:
1866         (WebCore::StyleSheet::addSubresourceStyleURLs): Ditto.
1867
1868         * dom/Node.cpp:
1869         (WebCore::Node::getSubresourceURLs): Changed to use
1870         ListHashSet<KURL> instead of Vector<KURL>.  Cleaned up code.
1871         * dom/Node.h:
1872         (WebCore::Node::getSubresourceURLs): Ditto.
1873         (WebCore::Node::addSubresourceAttributeURLs): Renamed from
1874         getSubresourceAttributeStrings().  Changed to use ListHashSet<KURL>
1875         instead of Vector<String>.
1876         (WebCore::addSubresourceURL): Added.  Safely adds new KURL objects
1877         to a ListHashSet<KURL> object.  A "null" KURL object will cause the
1878         hash function to crash since it contains a null StringImpl.  Used in
1879         Node::addSubresourceAttributeURLs() and addSubresourceStyleURLs() in
1880         the style subsystem.
1881
1882         * dom/ProcessingInstruction.cpp:
1883         (WebCore::ProcessingInstruction::addSubresourceAttributeURLs):
1884         Renamed from getSubresourceAttributeStrings().  Changed to use
1885         ListHashSet<KURL> instead of Vector<String>.  Use
1886         WebCore::addSubresourceURL() to add new KURL objects.
1887         * dom/ProcessingInstruction.h: Ditto.
1888         * html/HTMLBodyElement.cpp:
1889         (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): Ditto.
1890         * html/HTMLBodyElement.h: Ditto.
1891         * html/HTMLEmbedElement.cpp:
1892         (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs): Ditto.
1893         * html/HTMLEmbedElement.h: Ditto.
1894         * html/HTMLImageElement.cpp:
1895         (WebCore::HTMLImageElement::addSubresourceAttributeURLs): Ditto.
1896         * html/HTMLImageElement.h: Ditto.
1897         * html/HTMLInputElement.cpp:
1898         (WebCore::HTMLInputElement::addSubresourceAttributeURLs): Ditto.
1899         * html/HTMLInputElement.h: Ditto.
1900         * html/HTMLLinkElement.cpp:
1901         (WebCore::HTMLLinkElement::addSubresourceAttributeURLs): Ditto.
1902         * html/HTMLLinkElement.h: Ditto.
1903         * html/HTMLObjectElement.cpp:
1904         (WebCore::HTMLObjectElement::addSubresourceAttributeURLs): Ditto.
1905         * html/HTMLObjectElement.h: Ditto.
1906         * html/HTMLParamElement.cpp:
1907         (WebCore::HTMLParamElement::addSubresourceAttributeURLs): Ditto.
1908         * html/HTMLParamElement.h: Ditto.
1909         * html/HTMLScriptElement.cpp:
1910         (WebCore::HTMLScriptElement::addSubresourceAttributeURLs): Ditto.
1911         * html/HTMLScriptElement.h: Ditto.
1912         * html/HTMLStyleElement.cpp:
1913         (WebCore::HTMLStyleElement::addSubresourceAttributeURLs): Ditto.
1914         * html/HTMLStyleElement.h: Ditto.
1915         * html/HTMLTableCellElement.cpp:
1916         (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs): Ditto.
1917         * html/HTMLTableCellElement.h: Ditto.
1918         * html/HTMLTableElement.cpp:
1919         (WebCore::HTMLTableElement::addSubresourceAttributeURLs): Ditto.
1920         * html/HTMLTableElement.h: Ditto.
1921
1922         * loader/archive/cf/LegacyWebArchive.cpp:
1923         (WebCore::LegacyWebArchive::create): Changed from using
1924         HashSet<String> to ListHashSet<KURL> for tracking unique
1925         subresources.  Changed from using Vector<KURL> to ListHashSet<KURL>
1926         when calling WebCore::Node::getSubresourceURLs().  Cleaned up code.
1927
1928         * svg/SVGCursorElement.cpp:
1929         (WebCore::SVGCursorElement::addSubresourceAttributeURLs): Renamed
1930         from getSubresourceAttributeStrings().  Changed to use
1931         ListHashSet<KURL> instead of Vector<String>.  Use
1932         WebCore::addSubresourceURL() to add new KURL objects.
1933         * svg/SVGCursorElement.h: Ditto.
1934         * svg/SVGFEImageElement.cpp:
1935         (WebCore::SVGFEImageElement::addSubresourceAttributeURLs): Ditto.
1936         * svg/SVGFEImageElement.h: Ditto.
1937         * svg/SVGImageElement.cpp:
1938         (WebCore::SVGImageElement::addSubresourceAttributeURLs): Ditto.
1939         * svg/SVGImageElement.h: Ditto.
1940         * svg/SVGScriptElement.cpp:
1941         (WebCore::SVGScriptElement::addSubresourceAttributeURLs): Ditto.
1942         * svg/SVGScriptElement.h: Ditto.
1943
1944 2008-12-05  Brett Wilson  <brettw@chromium.org>
1945
1946         Reviewed by Darin Adler.
1947
1948         Make the page group use the proper link hashing functions rather than
1949         calling the string hash functions directly. Add Chromium-specfic ifdefs
1950         in the visited link computation functions to allow integration.
1951
1952         * page/PageGroup.cpp:
1953         (WebCore::PageGroup::isLinkVisited):
1954         (WebCore::PageGroup::addVisitedLink):
1955         * platform/LinkHash.cpp:
1956         (WebCore::visitedLinkHash):
1957         * platform/LinkHash.h:
1958
1959 2008-12-05  Chris Marrin  <cmarrin@apple.com>
1960
1961         Reviewed by Dave Hyatt.
1962
1963         Fix for https://bugs.webkit.org/show_bug.cgi?id=22635
1964         For iteration and end events, previous fixes to prevent the deletion of
1965         Animation objects (ref counting and hanging onto a ref during event callbacks)
1966         was sufficient to prevent dangling pointers. But start events are sent in
1967         the styleAvailable() call, which iterates over CompositeAnimation objects,
1968         which are not ref counted. So that object can get destroyed in the event
1969         handler while still active. So I added refcounting for CompositeAnimations.
1970
1971         Additionally, when am iterating over the CompositingAnimation list, it can
1972         be deleted, which mutates the list. So I now make one pass over the list
1973         building a vector of CompositeAnimation objects that need to be called and
1974         then iterate over that vector to make the actual calls.
1975
1976         Finally, to make sure the lifetime of the CompositeAnimation exceeds that of
1977         the Animation objects it owns, I now keep a ref to the CompositeAnimation
1978         in the timer callback for the iteration and end events. That means I no
1979         longer need to keep a ref to the Animation objects themselves in that timer
1980         callback, since the CompositeAnimation already has one.
1981
1982         Tests: animations/animation-iteration-event-destroy-renderer.html
1983                animations/animation-start-event-destroy-renderer.html
1984
1985         * page/animation/AnimationBase.cpp:
1986         (WebCore::AnimationBase::updateStateMachine):
1987         (WebCore::AnimationBase::animationTimerCallbackFired):
1988         * page/animation/AnimationController.cpp:
1989         (WebCore::AnimationControllerPrivate::~AnimationControllerPrivate):
1990         (WebCore::AnimationControllerPrivate::accessCompositeAnimation):
1991         (WebCore::AnimationControllerPrivate::clear):
1992         (WebCore::AnimationControllerPrivate::styleAvailable):
1993         (WebCore::AnimationControllerPrivate::updateAnimationTimer):
1994         (WebCore::AnimationControllerPrivate::animationTimerFired):
1995         (WebCore::AnimationControllerPrivate::isAnimatingPropertyOnRenderer):
1996         (WebCore::AnimationControllerPrivate::suspendAnimations):
1997         (WebCore::AnimationControllerPrivate::resumeAnimations):
1998         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
1999         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
2000         (WebCore::AnimationController::updateAnimations):
2001         (WebCore::AnimationController::setAnimationStartTime):
2002         (WebCore::AnimationController::setTransitionStartTime):
2003         * page/animation/CompositeAnimation.cpp:
2004         (WebCore::CompositeAnimationPrivate::animationController):
2005         (WebCore::CompositeAnimationPrivate::isWaitingForStyleAvailable):
2006         (WebCore::CompositeAnimationPrivate::~CompositeAnimationPrivate):
2007         (WebCore::CompositeAnimationPrivate::clearRenderer):
2008         (WebCore::CompositeAnimation::clearRenderer):
2009         (WebCore::CompositeAnimation::animationController):
2010         (WebCore::CompositeAnimation::isWaitingForStyleAvailable):
2011         * page/animation/CompositeAnimation.h:
2012         (WebCore::CompositeAnimation::create):
2013
2014 2008-12-05  David Kilzer  <ddkilzer@apple.com>
2015
2016         Bug 22609: Provide a build-time choice when generating hash tables for properties of built-in DOM objects
2017
2018         <https://bugs.webkit.org/show_bug.cgi?id=22609>
2019         <rdar://problem/6331749>
2020
2021         Reviewed by Darin Adler.
2022
2023         Initial patch by Yosen Lin.  Adapted for ToT WebKit by David Kilzer.
2024
2025         Added back the code that generates a "compact" hash (instead of a
2026         perfect hash) as a build-time option using the
2027         ENABLE(PERFECT_HASH_SIZE) macro as defined in Lookup.h.
2028
2029         * bindings/scripts/CodeGeneratorJS.pm:
2030         (GenerateImplementation): Compute the number of elements that will
2031         be stored in each hash table and pass it to GenerateHashTable().
2032         (GenerateHashTable): Added new second parameter representing the
2033         number of elements to store in the compact hash table.  Added back
2034         code to compute compact hash tables.  Generate both hash table sizes
2035         and emit conditionalized code based on ENABLE(PERFECT_HASH_SIZE).
2036
2037 2008-12-05  Brett Wilson  <brettw@chromium.org>
2038
2039         Fix build bustage from previous patch.
2040
2041         * css/CSSSelector.h:
2042
2043 2008-12-05  Brett Wilson  <brettw@chromium.org>
2044
2045         Reviewed by Eric Seidel.
2046
2047         Add a missing include for OwnPtr to make CSSSelector compile without
2048         precompiled headers.
2049
2050         * css/CSSSelector.h:
2051
2052 2008-12-05  Finnur Thorarinsson  <finnur.webkit@gmail.com>
2053
2054         Reviewed by Darin Adler.
2055
2056         Bug 22579: Providing a function to ScrollbarClient.h which allows us to get at the tickmarks
2057         without relying on high-level WebCore types, as requested by Dave Hyatt.
2058         
2059         No functional changes, thus no test cases.
2060
2061         * page/FrameView.cpp:
2062         (WebCore::FrameView::getTickmarks):
2063         * page/FrameView.h:
2064         * platform/ScrollbarClient.h:
2065
2066 2008-12-05  Dean Jackson  <dino@apple.com>
2067
2068         Reviewed by David Hyatt.
2069
2070         Make sure Window event listeners also tell the
2071         Document about the event type, so noisy events
2072         will be dispatched even if nothing in the document
2073         is listening.
2074         https://bugs.webkit.org/show_bug.cgi?id=20572
2075
2076         * dom/Document.cpp:
2077         (WebCore::Document::addWindowEventListener):
2078
2079 2008-12-05  Adam Roben  <aroben@apple.com>
2080
2081         Windows build fix after r39026
2082
2083         * platform/network/cf/ResourceRequestCFNet.cpp:
2084         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2085         (WebCore::ResourceRequest::doUpdateResourceRequest):
2086         Add some missing .get()s.
2087
2088 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
2089
2090         Tiger build fix.
2091
2092         * platform/network/mac/ResourceRequestMac.mm: Define NSUInteger.
2093
2094 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
2095
2096         Reviewed by Darin Adler.
2097
2098         <rdar://problem/6405599> Tiger Mail crashes when using "Mail Contents of This Page"
2099         in Safari before opening a mail message in Mail
2100
2101         * platform/mac/WebCoreObjCExtras.mm:
2102         (WebCoreObjCFinalizeOnMainThread):
2103         Don't call initializeThreading: we now expect the caller to do it, to simplify keeping
2104         Tiger and post-Tiger behavior in line.
2105
2106         * bindings/objc/DOMRGBColor.mm:
2107         (+[DOMRGBColor initialize]):
2108         * bindings/objc/WebScriptObject.mm:
2109         (+[WebScriptObject initialize]):
2110         * page/mac/AccessibilityObjectWrapper.mm:
2111         (+[AccessibilityObjectWrapper initialize]):
2112         * platform/mac/SharedBufferMac.mm:
2113         (+[WebCoreSharedBufferData initialize]):
2114         Call JSC::initializeThreading();
2115
2116 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
2117
2118         Reviewed by Darin Adler.
2119
2120         <rdar://problem/4072827> Downloaded non-ASCII file name becomes garbled
2121
2122         * platform/network/ResourceRequestBase.cpp:
2123         (WebCore::ResourceRequestBase::setResponseContentDispositionEncodingFallbackArray):
2124         * platform/network/ResourceRequestBase.h:
2125         * platform/network/cf/ResourceRequestCFNet.cpp:
2126         (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
2127         (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
2128         (WebCore::setContentDispositionEncodingFallbackArray):
2129         (WebCore::copyContentDispositionEncodingFallbackArray):
2130         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2131         (WebCore::ResourceRequest::doUpdateResourceRequest):
2132         * platform/network/mac/ResourceRequestMac.mm:
2133         (WebCore::ResourceRequest::doUpdateResourceRequest):
2134         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2135         Added a way to specify encoding fallback list for Content-Disposition header.
2136
2137         * loader/FrameLoader.cpp: (WebCore::FrameLoader::addExtraFieldsToRequest): Generate and
2138         pass a list of encodings to try when decoding Content-Disposition header, as described
2139         in comments.
2140
2141 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
2142
2143         Reviewed by Darin Adler.
2144
2145         https://bugs.webkit.org/show_bug.cgi?id=22672
2146         ASSERT(m_table) when xhr.onabort creates another xhr or calls setTimeout
2147
2148         Test: http/tests/xmlhttprequest/send-on-abort.html
2149
2150         * dom/ScriptExecutionContext.cpp:
2151         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
2152         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
2153         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
2154         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
2155         Add a comment explaining that ActiveDOMObject methods shouldn't execute arbitrary JS.
2156
2157         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::stop): Don't dispatch events. This
2158         reverts a recent change that made the behavior slightly closer to Firefox - but the
2159         compatibility effect should be very minor if any, and Firefox itself behaves inconsistently.
2160
2161 2008-12-05  Tobias König <tobias.koenig@nokia.com>
2162
2163         Reviewed by Simon Hausmann.
2164
2165         Record required package dependencies for the Qt build for a correct
2166         pkg-config file.
2167
2168         * WebCore.pro:
2169
2170 2008-12-05  Tor Arne Vestbø  <tavestbo@trolltech.com>
2171
2172         Rubber-stamped by Simon Hausmann.
2173
2174         [Qt/Mac] Blacklist QuickTime plugin until we support the QuickDraw drawing model
2175
2176         * plugins/mac/PluginPackageMac.cpp:
2177         (WebCore::PluginPackage::fetchInfo):
2178         (WebCore::PluginPackage::isPluginBlacklisted):
2179
2180 2008-12-05  Jungshik Shin  <jshin@chromium.org>
2181
2182         Reviewed by Alexey Proskuryakov.
2183
2184         https://bugs.webkit.org/show_bug.cgi?id=22472
2185
2186         Revises charset alias map for TextCodecICU.
2187         - Uses windows-949 and windows-874 instead of windows-949-2000 and windows-874-2000
2188         - Replaces 'windows874' in a couple of place with 'windows-874' (for the canonical name)
2189         - Maps 'dos-874' to 'windows-874'. Currently, it's aliases to 'cp874', which is in turn
2190           mapped to 'TIS-620'. 'TIS-620' is manually aliased to 'windows-874'. We'd better directly
2191           alias 'dos-874' to 'windows-874'.
2192         - Replaces 'EUC-CN' with 'GBK' when it's used as the canonical name.
2193           Similar to the above case, we're getting rid of indirection that eventually leads to 'GBK' by
2194           directly going to 'GBK'.
2195         - Adds 'x-uhc' as an alias for 'windows-949'. It's used in some web pages.
2196
2197         Tests: fast/encoding/char-decoding-mac.html
2198                fast/encoding/char-decoding.html
2199
2200         * platform/text/TextCodecICU.cpp:
2201         (WebCore::TextCodecICU::registerExtendedEncodingNames):
2202
2203 2008-12-04  Kevin Watters  <kevinwatters@gmail.com>
2204
2205         Reviewed by Kevin Ollivier.
2206
2207         Add a MIME mapping for the .htm extension to wx and GTK ports.
2208         
2209         https://bugs.webkit.org/show_bug.cgi?id=22668
2210         
2211         * platform/gtk/MIMETypeRegistryGtk.cpp:
2212         (WebCore::):
2213         * platform/wx/MimeTypeRegistryWx.cpp:
2214         (WebCore::):
2215
2216 2008-12-04  Kevin Watters  <kevinwatters@gmail.com>
2217
2218         Reviewed by Kevin Ollivier.
2219
2220         Implement basic text paste support in wx and add notImplemented stubs
2221         to catch other methods.
2222         
2223         https://bugs.webkit.org/show_bug.cgi?id=22667
2224
2225         * platform/wx/PasteboardWx.cpp:
2226         (WebCore::Pasteboard::canSmartReplace):
2227         (WebCore::Pasteboard::plainText):
2228         (WebCore::Pasteboard::documentFragment):
2229         (WebCore::Pasteboard::writeImage):
2230
2231 2008-12-04  Kevin Ollivier  <kevino@theolliviers.com>
2232
2233         wx build fix for !USE(WXGC) build config.
2234
2235         * platform/graphics/wx/PathWx.cpp:
2236         (WebCore::Path::contains):
2237         (WebCore::Path::addLineTo):
2238         (WebCore::Path::addQuadCurveTo):
2239         (WebCore::Path::addBezierCurveTo):
2240         (WebCore::Path::addArcTo):
2241         (WebCore::Path::closeSubpath):
2242         (WebCore::Path::addArc):
2243         (WebCore::Path::addRect):
2244         (WebCore::Path::addEllipse):
2245         (WebCore::Path::transform):
2246         (WebCore::Path::apply):
2247         (WebCore::Path::isEmpty):
2248
2249 2008-12-04  Kevin Watters  <kevinwatters@gmail.com>
2250
2251         Reviewed by Kevin Ollivier.
2252
2253         Turn off styled controls until we can implement them properly.
2254         
2255         https://bugs.webkit.org/show_bug.cgi?id=22662
2256
2257         * platform/wx/RenderThemeWx.cpp:
2258         (WebCore::RenderThemeWx::isControlStyled):
2259
2260 2008-12-04  Kevin Watters  <kevinwatters@gmail.com>
2261
2262         Reviewed by Kevin Ollivier.
2263
2264         wx implementations for Path API.
2265
2266         https://bugs.webkit.org/show_bug.cgi?id=22661
2267
2268         * platform/graphics/wx/PathWx.cpp:
2269         (WebCore::Path::~Path):
2270         (WebCore::Path::contains):
2271         (WebCore::Path::addLineTo):
2272         (WebCore::Path::addQuadCurveTo):
2273         (WebCore::Path::addBezierCurveTo):
2274         (WebCore::Path::addArcTo):
2275         (WebCore::Path::closeSubpath):
2276         (WebCore::Path::addArc):
2277         (WebCore::Path::addRect):
2278         (WebCore::Path::addEllipse):
2279         (WebCore::Path::transform):
2280         (WebCore::Path::isEmpty):
2281
2282 2008-12-04  Julien Chaffraix  <jchaffraix@webkit.org>
2283
2284         Reviewed by Eric Seidel.
2285
2286         Bug 22564: Make HTML elements' constructors take a QualifiedName
2287         https://bugs.webkit.org/show_bug.cgi?id=22564
2288
2289         Updated the remaining constructors.
2290
2291         * bindings/js/JSImageConstructor.cpp:
2292         (WebCore::constructImage):
2293         * dom/Document.cpp:
2294         (WebCore::Document::getCSSCanvasElement):
2295         * editing/DeleteButton.cpp:
2296         (WebCore::DeleteButton::DeleteButton):
2297         * html/HTMLAppletElement.cpp:
2298         (WebCore::HTMLAppletElement::HTMLAppletElement):
2299         * html/HTMLAppletElement.h:
2300         * html/HTMLAreaElement.cpp:
2301         (WebCore::HTMLAreaElement::HTMLAreaElement):
2302         * html/HTMLAreaElement.h:
2303         * html/HTMLBaseFontElement.cpp:
2304         (WebCore::HTMLBaseFontElement::HTMLBaseFontElement):
2305         * html/HTMLBaseFontElement.h:
2306         * html/HTMLCanvasElement.cpp:
2307         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2308         * html/HTMLCanvasElement.h:
2309         * html/HTMLElementFactory.cpp:
2310         (WebCore::hrConstructor):
2311         (WebCore::paragraphConstructor):
2312         (WebCore::basefontConstructor):
2313         (WebCore::fontConstructor):
2314         (WebCore::anchorConstructor):
2315         (WebCore::imageConstructor):
2316         (WebCore::mapConstructor):
2317         (WebCore::areaConstructor):
2318         (WebCore::canvasConstructor):
2319         (WebCore::appletConstructor):
2320         (WebCore::embedConstructor):
2321         (WebCore::objectConstructor):
2322         (WebCore::paramConstructor):
2323         (WebCore::scriptConstructor):
2324         (WebCore::tableConstructor):
2325         (WebCore::tableCaptionConstructor):
2326         (WebCore::tableRowConstructor):
2327         * html/HTMLEmbedElement.cpp:
2328         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
2329         * html/HTMLEmbedElement.h:
2330         * html/HTMLFontElement.cpp:
2331         (WebCore::HTMLFontElement::HTMLFontElement):
2332         * html/HTMLFontElement.h:
2333         * html/HTMLHRElement.cpp:
2334         (WebCore::HTMLHRElement::HTMLHRElement):
2335         * html/HTMLHRElement.h:
2336         * html/HTMLImageElement.cpp:
2337         (WebCore::HTMLImageElement::HTMLImageElement):
2338         * html/HTMLImageElement.h:
2339         * html/HTMLMapElement.cpp:
2340         (WebCore::HTMLMapElement::HTMLMapElement):
2341         * html/HTMLMapElement.h:
2342         * html/HTMLObjectElement.cpp:
2343         (WebCore::HTMLObjectElement::HTMLObjectElement):
2344         * html/HTMLObjectElement.h:
2345         * html/HTMLParagraphElement.cpp:
2346         (WebCore::HTMLParagraphElement::HTMLParagraphElement):
2347         * html/HTMLParagraphElement.h:
2348         * html/HTMLParamElement.cpp:
2349         (WebCore::HTMLParamElement::HTMLParamElement):
2350         * html/HTMLParamElement.h:
2351         * html/HTMLParser.cpp:
2352         (WebCore::HTMLParser::handleError):
2353         (WebCore::HTMLParser::mapCreateErrorCheck):
2354         (WebCore::HTMLParser::handleIsindex):
2355         * html/HTMLScriptElement.cpp:
2356         (WebCore::HTMLScriptElement::HTMLScriptElement):
2357         * html/HTMLScriptElement.h:
2358         * html/HTMLTableCaptionElement.cpp:
2359         (WebCore::HTMLTableCaptionElement::HTMLTableCaptionElement):
2360         * html/HTMLTableCaptionElement.h:
2361         * html/HTMLTableElement.cpp:
2362         (WebCore::HTMLTableElement::HTMLTableElement):
2363         (WebCore::HTMLTableElement::createCaption):
2364         (WebCore::HTMLTableElement::insertRow):
2365         * html/HTMLTableElement.h:
2366         * html/HTMLTableRowElement.cpp:
2367         (WebCore::HTMLTableRowElement::HTMLTableRowElement):
2368         * html/HTMLTableRowElement.h:
2369         * html/HTMLTableSectionElement.cpp:
2370         (WebCore::HTMLTableSectionElement::insertRow):
2371         * html/HTMLViewSourceDocument.cpp:
2372         (WebCore::HTMLViewSourceDocument::createContainingTable):
2373         (WebCore::HTMLViewSourceDocument::addLine):
2374         * loader/ImageDocument.cpp:
2375         (WebCore::ImageDocumentElement::ImageDocumentElement):
2376
2377 2008-12-04  Eric Seidel  <eric@webkit.org>
2378
2379         No review, build fix only.
2380
2381         Add file missing from last commit.
2382
2383         * bindings/js/ScriptState.h: Added.
2384
2385 2008-12-04  Dimitri Glazkov  <dglazkov@chromium.org>
2386
2387         Reviewed by Geoff Garen.
2388
2389         Implement ScriptState abstraction (initially, a simple typedef)
2390         as means of carrying exception information across bindings boundaries
2391         and in a script engine-independent way.
2392
2393         * WebCore.vcproj/WebCore.vcproj:
2394         * WebCore.xcodeproj/project.pbxproj:
2395         * bindings/js/JSDOMBinding.cpp:
2396         (WebCore::scriptStateFromNode):
2397         * bindings/js/JSDOMBinding.h:
2398         * bindings/js/JSNodeFilterCondition.h:
2399         * bindings/js/ScriptState.h: Added.
2400         * dom/NodeFilter.cpp:
2401         (WebCore::NodeFilter::acceptNode):
2402         * dom/NodeFilter.h:
2403         (WebCore::NodeFilter::acceptNode):
2404         * dom/NodeFilterCondition.cpp:
2405         (WebCore::NodeFilterCondition::acceptNode):
2406         * dom/NodeFilterCondition.h:
2407         * dom/NodeIterator.cpp:
2408         (WebCore::NodeIterator::nextNode):
2409         (WebCore::NodeIterator::previousNode):
2410         * dom/NodeIterator.h:
2411         (WebCore::NodeIterator::nextNode):
2412         (WebCore::NodeIterator::previousNode):
2413         * dom/Traversal.cpp:
2414         (WebCore::Traversal::acceptNode):
2415         * dom/Traversal.h:
2416         * dom/TreeWalker.cpp:
2417         (WebCore::TreeWalker::parentNode):
2418         (WebCore::TreeWalker::firstChild):
2419         (WebCore::TreeWalker::lastChild):
2420         (WebCore::TreeWalker::previousSibling):
2421         (WebCore::TreeWalker::nextSibling):
2422         (WebCore::TreeWalker::previousNode):
2423         (WebCore::TreeWalker::nextNode):
2424         * dom/TreeWalker.h:
2425         (WebCore::TreeWalker::parentNode):
2426         (WebCore::TreeWalker::firstChild):
2427         (WebCore::TreeWalker::lastChild):
2428         (WebCore::TreeWalker::previousSibling):
2429         (WebCore::TreeWalker::nextSibling):
2430         (WebCore::TreeWalker::previousNode):
2431         (WebCore::TreeWalker::nextNode):
2432
2433 2008-12-04  Pierre-Olivier Latour  <pol@apple.com>
2434
2435         Reviewed by Dan Bernstein.
2436
2437         Fixed pauseTransitionAtTimeOnElementWithId() in DRT asserting when passed invalid property name
2438         and potential similar issue with pauseAnimationAtTimeOnElementWithId().
2439
2440         https://bugs.webkit.org/show_bug.cgi?id=22641
2441
2442         * page/animation/CompositeAnimation.cpp:
2443         (WebCore::CompositeAnimationPrivate::pauseAnimationAtTime):
2444         (WebCore::CompositeAnimationPrivate::pauseTransitionAtTime):
2445
2446 2008-12-04  Dimitri Glazkov  <dglazkov@chromium.org>
2447
2448         Reviewed by Darin Adler.
2449
2450         Remove unused Completion.h include.
2451
2452         * html/CanvasRenderingContext2D.cpp: Removed Completion.h include.
2453
2454 2008-11-13  David Hyatt  <hyatt@apple.com>
2455
2456         Fix a bug in ScrollView's refactoring.  An isVisible check should have been isSelfVisible.
2457
2458         Reviewed by Darin Adler
2459
2460         * platform/ScrollView.cpp:
2461         (WebCore::ScrollView::setParentVisible):
2462
2463 2008-12-04  Friedemann Kleint  <friedemann.kleint@nokia.com>
2464
2465         Reviewed by Tor Arne Vestbø.
2466
2467         Fix small translation glitch in the Qt file chooser.
2468
2469         * platform/qt/FileChooserQt.cpp:
2470         (WebCore::FileChooser::basenameForWidth):
2471
2472 2008-12-04  Tor Arne Vestbø  <tavestbo@trolltech.com>
2473
2474         Rubber-stamped by Simon Hausmann.
2475
2476         Blacklist Silverlight plugin on Qt/Mac until supported
2477
2478         Currently the plugin crashes with a corrupted stack trace, possibly
2479         related to https://bugs.webkit.org/show_bug.cgi?id=20635
2480
2481         * plugins/mac/PluginPackageMac.cpp:
2482         (WebCore::PluginPackage::fetchInfo):
2483         (WebCore::PluginPackage::isPluginBlacklisted):
2484
2485 2008-12-03  Dmitry Titov  <dimich@chromium.org>
2486
2487         Reviewed by Alexey Proskuryakov.
2488
2489         Fix non-Mac build.
2490
2491         * page/Chrome.cpp: (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
2492
2493 2008-12-03  David Levin  <levin@chromium.org>
2494
2495         Reviewed by Alexey Proskuryakov.
2496
2497         Remove uses of document() in XMLHttpRequest where simple.
2498         https://bugs.webkit.org/show_bug.cgi?id=22619
2499
2500         * xml/XMLHttpRequest.cpp:
2501         (WebCore::XMLHttpRequest::responseXML):
2502         Return NULL in the worker case which is according to spec (and avoids using document()).
2503
2504         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
2505         (WebCore::XMLHttpRequest::initSend):
2506         Use scriptExecutionContext() instead of document().
2507
2508 2008-12-03  David Levin  <levin@chromium.org>
2509
2510         Reviewed by Alexey Proskuryakov.
2511
2512         Make ScriptExecutionContextTaskWorkerTask::performTask a pure virtual function.
2513         https://bugs.webkit.org/show_bug.cgi?id=22642
2514
2515         * dom/Document.cpp:
2516         (WebCore::ScriptExecutionContextTaskTimer::ScriptExecutionContextTaskTimer):
2517         (WebCore::ScriptExecutionContextTaskTimer::fired):
2518         (WebCore::PerformTaskContext::PerformTaskContext):
2519         (WebCore::performTask):
2520         (WebCore::Document::postTask):
2521         * dom/Document.h:
2522         * dom/ScriptExecutionContext.cpp:
2523         * dom/ScriptExecutionContext.h:
2524         * dom/WorkerContext.cpp:
2525         (WebCore::ScriptExecutionContextTaskWorkerTask::create):
2526         (WebCore::ScriptExecutionContextTaskWorkerTask::ScriptExecutionContextTaskWorkerTask):
2527         (WebCore::ScriptExecutionContextTaskWorkerTask::performTask):
2528         (WebCore::WorkerContext::postTask):
2529         * dom/WorkerContext.h:
2530
2531 2008-12-03  Dmitry Titov  <dimich@chromium.org>
2532
2533         Reviewed by Alexey Proskuryakov.
2534
2535         Using ActiveDOMObject as base class for DOMTimer.
2536         https://bugs.webkit.org/show_bug.cgi?id=22620
2537
2538         Using ActiveDOMObject simplifies the code because ActiveDOMObject
2539         is wired for stop/pause/resume on loading/unloading/caching the page etc
2540         so the timer-specific code that does the same can be removed.
2541         In addition, timers can be now paused/resumed 'in place' which
2542         makes it unnecessary to 'serialize' them into special PausedTimeouts
2543         instance, so pause/resumeTimeouts implementation in JSDOMWindowBase can also be removed.
2544         Also, moving TimeoutMap from JSDOMWindowBase to Document matches lifetime
2545         of timeouts and makes it possible to not roundtrip them via PausedTimeouts 
2546         every time when JSDOMWindow wrapper is destroyed while the page is in the b/f cache.
2547
2548         Timeouts are now paused with other ActiveDOMObjects:
2549         - before creating CachedPage in FrameLoader::commitProvisionalLoad()
2550         - in JavaScriptDebugServer::setJavaScriptPaused
2551         - during modal UI operations in Chrome::*
2552         this is equivalent to previous usage of JSDOMWindowBase::pauseTimeouts()
2553
2554         Timeouts are stopped to prevent future firing from:
2555         - FrameLoader::clear()
2556         - FrameLoader::frameDetached()
2557         this is equivalent to previous usage of JSDOMWindowBase::clearAllTimeouts()
2558
2559         This is also one of the steps to having timers in Workers. See the plan of
2560         the next steps in the bug above.
2561
2562         * bindings/js/DOMTimer.cpp:
2563         (WebCore::DOMTimer::DOMTimer):
2564         (WebCore::DOMTimer::fired):
2565         (WebCore::DOMTimer::hasPendingActivity):
2566         (WebCore::DOMTimer::contextDestroyed):
2567         (WebCore::DOMTimer::stop):
2568         (WebCore::DOMTimer::suspend):
2569         (WebCore::DOMTimer::resume):
2570         (WebCore::DOMTimer::canSuspend): Implemented ActiveDOMObject methods.
2571
2572         * bindings/js/DOMTimer.h:
2573         * bindings/js/JSDOMBinding.cpp: ActiveDOMObject can have no JS wrapper
2574         (WebCore::markActiveObjectsForContext): 
2575
2576         * bindings/js/JSDOMWindowBase.cpp:
2577         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
2578         (WebCore::JSDOMWindowBase::clear):
2579         (WebCore::JSDOMWindowBase::installTimeout):
2580         (WebCore::JSDOMWindowBase::removeTimeout):
2581         (WebCore::JSDOMWindowBase::timerFired):
2582         (WebCore::JSDOMWindowBase::disconnectFrame):
2583         * bindings/js/JSDOMWindowBase.h:
2584         * bindings/js/ScriptController.cpp:
2585         * bindings/js/ScriptController.h:
2586
2587         * dom/Document.cpp: Document now holds a hash map id->timeout
2588         (WebCore::Document::addTimeout):
2589         (WebCore::Document::removeTimeout):
2590         (WebCore::Document::findTimeout):
2591         * dom/Document.h:
2592         * history/CachedPage.cpp:
2593         (WebCore::CachedPage::CachedPage):
2594         (WebCore::CachedPage::restore):
2595         (WebCore::CachedPage::clear):
2596         * history/CachedPage.h:
2597         * inspector/JavaScriptDebugServer.cpp:
2598         (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer):
2599         (WebCore::JavaScriptDebugServer::setJavaScriptPaused):
2600         * inspector/JavaScriptDebugServer.h:
2601
2602         * loader/FrameLoader.cpp:
2603         (WebCore::FrameLoader::commitProvisionalLoad): 
2604         removed clearAllTimeouts since all ActiveDOMObjects will be stopped in FrameLoader::clear();
2605         I don't see how the old comment can be correct - the code in the same method proceeds to invoke 'onunload'
2606         and then calls into client which can be external code and can cause any active object created in onunload
2607         to fire. We can stop them all before firing onunload but it does not make a lot of sense.
2608         I have a test to go with the next patch which verifies that timers set in onunload do not fire.
2609
2610         (WebCore::FrameLoader::open):
2611         * page/Chrome.cpp:
2612         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
2613         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
2614
2615 2008-12-03  Justin Garcia  <justin.garcia@apple.com>
2616
2617         Reviewed by Beth Dakin.
2618
2619         <rdar://problem/6018653> Extra blank line when pasting paragraph in plain text
2620         
2621         In SnowLeopard, Mail occasionally adds an empty, unstyled paragraph at the
2622         end of pasted content so that users don't get stuck with non-standard pargraph
2623         spacing.  This content threw off our handling of interchange newlines.  Any interchange
2624         newline, regardless of it's position in the incoming fragment was considered to be
2625         "at the start" of the fragment, and would result in us inserting in a newline before 
2626         inserted content.  This patch makes the checks for interchange newlines more strict, 
2627         and treats interchange newlines found elsewhere as normal <br>s.
2628
2629         * editing/ReplaceSelectionCommand.cpp:
2630         (WebCore::ReplacementFragment::ReplacementFragment):
2631         (WebCore::ReplacementFragment::removeInterchangeNodes):
2632         * editing/VisiblePosition.cpp:
2633         (WebCore::VisiblePosition::init):
2634         (WebCore::VisiblePosition::canonicalPosition):
2635         * editing/VisiblePosition.h:
2636
2637 2008-12-03  Eric Seidel  <eric@webkit.org>
2638
2639         Rubber-stamped by David Hyatt.
2640
2641         Bring the WebCore chromium build a couple steps closer to building.
2642
2643         * WebCore.scons:
2644
2645 2008-12-03  Kevin Ollivier  <kevino@theolliviers.com>
2646
2647         wx build fix.
2648
2649         * WebCoreSources.bkl:
2650
2651 2008-12-03  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2652
2653         Reviewed by George Staikos.
2654
2655         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22636
2656
2657         Implement WML variable substitution & validation.
2658         Created a framework for scriptable WML layout tests, that are able to test variable substiution & validation.
2659
2660         Tests: wml/variable-reference-invalid-character.html
2661                wml/variable-reference-valid.html
2662
2663         * wml/WMLVariables.cpp:
2664         (WebCore::isValidFirstVariableNameCharacter):
2665         (WebCore::isValidVariableNameCharacter):
2666         (WebCore::isValidVariableEscapingModeString):
2667         (WebCore::isValidVariableName):
2668         (WebCore::containsVariableReference):
2669         (WebCore::substituteVariableReferences):
2670         * wml/WMLVariables.h:
2671
2672 2008-12-03  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2673
2674         Reviewed by Cameron Zwarich.
2675
2676         Further preparations for WML layout tests.
2677         - Enable variable substitution in Text.cpp - if the parent is a WMLElement derived class.
2678         - Dump WMLMessageSource messages to the console, just like it's done for JSMessageSource
2679         - Add helper method in Document.idl, to reset the WML page state to a well-known default state.
2680           (will be used in the upcoming LayoutTests/wml testcases)
2681
2682          * dom/Document.cpp:
2683         (WebCore::Document::resetWMLPageState):
2684         * dom/Document.h:
2685         * dom/Document.idl:
2686         * dom/Text.cpp:
2687         (WebCore::Text::insertedIntoDocument):
2688         * dom/Text.h:
2689         * page/Console.cpp:
2690         (WebCore::Console::addMessage):
2691         * wml/WMLPageState.h: Readd heper function
2692         (WebCore::WMLPageState::hasVariables):
2693
2694 2008-12-03  Antti Koivisto  <antti@apple.com>
2695
2696         Reviewed by Sam Weinig.
2697
2698         Don't leak selectors in case selector list parsing failed.
2699
2700         * css/CSSGrammar.y:
2701         * css/CSSParser.cpp:
2702         (WebCore::CSSParser::~CSSParser):
2703
2704 2008-12-03  Chris Marrin  <cmarrin@apple.com>
2705
2706         Reviewed by Dave Hyatt.
2707
2708         Fix https://bugs.webkit.org/show_bug.cgi?id=22520
2709
2710         This is a regression (causes a crash of LayoutTests/animations/transform-animation-event-destroy-element.html).
2711         This patch fixes the testcase.
2712
2713         This is another case of animations getting destroyed in the end animation callback and causing dangling
2714         pointers on return. This one involves iterating over the CompositeAnimation, which has been destroyed.
2715         So I now check for a null m_object pointer (which is nullified when the CompositeAnimation is destroyed)
2716         and skip that call.
2717
2718         * page/animation/AnimationBase.cpp:
2719         (WebCore::AnimationBase::updateStateMachine):
2720
2721 2008-12-03  Antti Koivisto  <antti@apple.com>
2722
2723         Reviewed by Darin Adler.
2724
2725         https://bugs.webkit.org/show_bug.cgi?id=22379
2726         Make CSSOM use less memory
2727
2728         Reduce size of the CSSSelector by one more pointer by using an array
2729         instead of a linked list to store them.
2730
2731         * WebCore.xcodeproj/project.pbxproj:
2732         * css/CSSGrammar.y:
2733         * css/CSSParser.cpp:
2734         (WebCore::CSSParser::CSSParser):
2735         (WebCore::CSSParser::parseSelector):
2736         (WebCore::CSSParser::createStyleRule):
2737         * css/CSSParser.h:
2738         (WebCore::CSSParser::reusableSelectorVector):
2739         * css/CSSSelector.h:
2740         (WebCore::CSSSelector::CSSSelector):
2741         (WebCore::CSSSelector::~CSSSelector):
2742         (WebCore::CSSSelector::isLastInSelectorList):
2743         (WebCore::CSSSelector::setLastInSelectorList):
2744         * css/CSSStyleRule.cpp:
2745         (WebCore::CSSStyleRule::CSSStyleRule):
2746         (WebCore::CSSStyleRule::~CSSStyleRule):
2747         (WebCore::CSSStyleRule::selectorText):
2748         * css/CSSStyleRule.h:
2749         (WebCore::CSSStyleRule::adoptSelectorVector):
2750         (WebCore::CSSStyleRule::selectorList):
2751         * css/CSSStyleSelector.cpp:
2752         (WebCore::CSSRuleSet::addRulesFromSheet):
2753         * dom/Node.cpp:
2754         (WebCore::forEachSelector):
2755         (WebCore::selectorNeedsNamespaceResolution):
2756         (WebCore::Node::querySelector):
2757         (WebCore::Node::querySelectorAll):
2758         * dom/SelectorNodeList.cpp:
2759         (WebCore::createSelectorNodeList):
2760         * dom/SelectorNodeList.h:
2761
2762 2008-12-03  Alexey Proskuryakov  <ap@webkit.org>
2763
2764         Reviewed by Darin Adler.
2765
2766         https://bugs.webkit.org/show_bug.cgi?id=22630
2767         Assertion failure in XMLHttpRequest::contextDestroyed
2768
2769         Test: http/tests/xmlhttprequest/close-window.html
2770
2771         * loader/FrameLoader.cpp:
2772         (WebCore::FrameLoader::clear):
2773         (WebCore::FrameLoader::commitProvisionalLoad):
2774         Move stopping active objects to clear(), so that closing a window is also covered.
2775
2776         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::abort): Protect the object in abort(),
2777         because internalAbort() deref()'s.
2778
2779 2008-12-03  Dean Jackson  <dino@apple.com>
2780
2781         Reviewed by Dan Bernstein.
2782
2783         Implement CSS 3 <angle> turn unit and support it
2784         in rotations.
2785         https://bugs.webkit.org/show_bug.cgi?id=22497
2786
2787         * css/CSSGrammar.y:
2788         * css/CSSParser.cpp:
2789         (WebCore::CSSParser::validUnit):
2790         (WebCore::unitFromString):
2791         (WebCore::CSSParser::lex):
2792         * css/CSSPrimitiveValue.cpp:
2793         (WebCore::CSSPrimitiveValue::cssText):
2794         (WebCore::CSSPrimitiveValue::parserValue):
2795         * css/CSSPrimitiveValue.h:
2796         (WebCore::CSSPrimitiveValue::):
2797         * css/CSSStyleSelector.cpp:
2798         (WebCore::CSSStyleSelector::createTransformOperations):
2799         * css/tokenizer.flex:
2800
2801 2008-12-03  Dirk Schulze  <krit@webkit.org>
2802
2803         Reviewed by Nikolas Zimmermann.
2804
2805         Make use of the gradient code in GraphicsContext and get rid of most of the
2806         platform dependent code.
2807
2808         SVG should use the new Gradient support on GraphicsContext
2809         https://bugs.webkit.org/show_bug.cgi?id=20543
2810
2811         * GNUmakefile.am:
2812         * WebCore.pro:
2813         * WebCore.vcproj/WebCore.vcproj:
2814         * WebCore.xcodeproj/project.pbxproj:
2815         * platform/graphics/FloatSize.h:
2816         (WebCore::FloatSize::shrunkTo):
2817         * svg/SVGLinearGradientElement.cpp:
2818         (WebCore::SVGLinearGradientElement::buildGradient):
2819         * svg/SVGRadialGradientElement.cpp:
2820         (WebCore::SVGRadialGradientElement::buildGradient):
2821         * svg/graphics/SVGPaintServer.h:
2822         * svg/graphics/SVGPaintServerGradient.cpp:
2823         (WebCore::SVGPaintServerGradient::SVGPaintServerGradient):
2824         (WebCore::SVGPaintServerGradient::~SVGPaintServerGradient):
2825         (WebCore::SVGPaintServerGradient::gradient):
2826         (WebCore::SVGPaintServerGradient::setGradient):
2827         (WebCore::findTextRootObject):
2828         (WebCore::createMaskAndSwapContextForTextGradient):
2829         (WebCore::clipToTextMask):
2830         (WebCore::SVGPaintServerGradient::setup):
2831         (WebCore::SVGPaintServerGradient::renderPath):
2832         (WebCore::SVGPaintServerGradient::teardown):
2833         * svg/graphics/SVGPaintServerGradient.h:
2834         (WebCore::SVGPaintServerGradient::setGradientStops):
2835         (WebCore::SVGPaintServerGradient::gradientStops):
2836         * svg/graphics/SVGPaintServerLinearGradient.h:
2837         * svg/graphics/SVGPaintServerRadialGradient.h:
2838         * svg/graphics/cairo/SVGPaintServerGradientCairo.cpp: Removed.
2839         * svg/graphics/cg/SVGPaintServerCg.cpp:
2840         * svg/graphics/cg/SVGPaintServerGradientCg.cpp: Removed.
2841         * svg/graphics/qt/SVGPaintServerGradientQt.cpp: Removed.
2842         * svg/graphics/qt/SVGPaintServerLinearGradientQt.cpp: Removed.
2843         * svg/graphics/qt/SVGPaintServerRadialGradientQt.cpp: Removed.
2844
2845 2008-12-03  Sam Weinig  <sam@webkit.org>
2846
2847         Reviewed by Mark Rowe.
2848
2849         Fix formatting.
2850
2851         * css/CSSSelector.h:
2852         (WebCore::CSSSelector::createRareData):
2853
2854 2008-12-03  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2855
2856         Reviewed by Adam Roben.
2857
2858         As Adam Roben noticed, synchronize MessageSource enum with Console.js, and add a comment.
2859
2860         * inspector/front-end/Console.js:
2861         * page/Console.h:
2862
2863 2008-12-03  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2864
2865         Reviewed by Alexey Proskuryakov.
2866
2867         Next steps to make LayoutTests work:
2868         Never access the main frame from WMLRefreshElement/WMLCardElement, but
2869         the current documents frame (WML layout tests will run in an <iframe>)
2870
2871         Prepare WMLErrorHandling for the case that no tokenizer is available anymore
2872         -> report errors through Console::addMessage(), so they get logged in the
2873            expected layout test results.
2874
2875         * wml/WMLCardElement.cpp:
2876         (WebCore::WMLCardElement::setActiveCardInDocument):
2877         * wml/WMLErrorHandling.cpp:
2878         (WebCore::reportWMLError):
2879         (WebCore::errorMessageForErrorCode):
2880         * wml/WMLErrorHandling.h:
2881         * wml/WMLRefreshElement.cpp:
2882         (WebCore::WMLRefreshElement::executeTask):
2883         * page/Console.cpp: Handle WMLMessageSource.
2884         (WebCore::printMessageSourceAndLevelPrefix):
2885         * page/Console.h: Add WMLMessageSource.
2886         (WebCore::):
2887
2888 2008-12-03  Tor Arne Vestbø  <tavestbo@trolltech.com>
2889
2890         Reviewed by Simon Hausmann.
2891
2892         Allow passing jsNull and jsUndefined to Qt plugins
2893
2894         Currently limited to functions with QString and QVariant arguments,
2895         and properties of these types. Both jsNull and jsUndefined ends up
2896         as default-constructed QStrings and QVariants, which means you can
2897         check for isEmpty() and isValid() in the native plugin code.
2898
2899         Based on patches by Jade Han <jade.han@nokia.com>
2900
2901         * bridge/qt/qt_runtime.cpp:
2902         (JSC::Bindings::convertValueToQVariant):
2903         (JSC::Bindings::findMethodIndex):
2904
2905 2008-12-03  Trenton Schulz  <trenton.schulz@nokia.com>
2906
2907         Reviewed by Simon Hausmann.
2908
2909         Fix the build with Qt for Mac OS X.
2910
2911         * platform/PurgeableBuffer.h: Use the dummy wrappers for now.
2912
2913 2008-12-03  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2914
2915         Reviewed by Alexey Proskuryakov.
2916
2917         Fix error handling in WMLSetvarElement. If an invalid variable reference is contained
2918         in the 'name' attribute of <setvar>, a 'WMLErrorInvalidVariableName' error should be
2919         reported, instead of 'WMLErrorInvalidVariableReference'.
2920
2921         * wml/WMLElement.cpp:
2922         (WebCore::WMLElement::parseValueSubstitutingVariableReferences):
2923         (WebCore::WMLElement::parseValueForbiddingVariableReferences):
2924         * wml/WMLElement.h:
2925         * wml/WMLSetvarElement.cpp:
2926         (WebCore::WMLSetvarElement::parseMappedAttribute):
2927         * wml/WMLSetvarElement.h:
2928         (WebCore::WMLSetvarElement::name):
2929         (WebCore::WMLSetvarElement::value):
2930
2931 2008-12-03  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2932
2933         Reviewed by Alexey Proskuryakov.
2934
2935         Preparations to get WML layout tests going.
2936         Make WMLPageState an OwnPtr to Page, and let Page create it on demand.
2937
2938         * page/Page.cpp:
2939         (WebCore::Page::Page):
2940         (WebCore::Page::wmlPageState):
2941         * page/Page.h:
2942         * wml/WMLDocument.cpp:
2943         (WebCore::WMLDocument::WMLDocument):
2944         (WebCore::WMLDocument::finishedParsing):
2945         (WebCore::wmlPageStateForDocument):
2946         * wml/WMLPageState.h: Don't inherit from RefCounted anymore.
2947         (WebCore::WMLPageState::hasVariables): Remove helper function.
2948
2949 2008-12-03  Alexey Proskuryakov  <ap@webkit.org>
2950
2951         Reviewed by Mark Rowe.
2952
2953         https://bugs.webkit.org/show_bug.cgi?id=22627
2954         fast/workers/worker-terminate.html fails randomly
2955
2956         The problem is that worker termination uses script timeouts, so an InterruptedExecutionError
2957         is raised, and it sometimes reaches the main thread.
2958
2959         * dom/WorkerMessagingProxy.cpp:
2960         (WebCore::WorkerExceptionTask::create):
2961         (WebCore::WorkerExceptionTask::WorkerExceptionTask):
2962         (WebCore::WorkerExceptionTask::performTask):
2963         (WebCore::WorkerMessagingProxy::postWorkerException):
2964         * dom/WorkerMessagingProxy.h:
2965         Ignore exceptions that happen in terminated workers.
2966
2967 2008-12-03  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2968
2969         Reviewed by Alexey Proskuryakov.
2970
2971         Remove some unncessary includes.
2972
2973         * wml/WMLAccessElement.cpp:
2974         * wml/WMLDocument.h:
2975         * wml/WMLRefreshElement.cpp:
2976
2977 2008-12-03  Alexey Proskuryakov  <ap@webkit.org>
2978
2979         Rubber-stamped by Cameron Zwarich and Adam Roben.
2980
2981         Fix a typo: m_executionForbidded.
2982
2983         * bindings/js/WorkerScriptController.cpp:
2984         (WebCore::WorkerScriptController::WorkerScriptController):
2985         (WebCore::WorkerScriptController::evaluate):
2986         (WebCore::WorkerScriptController::forbidExecution):
2987         * bindings/js/WorkerScriptController.h:
2988
2989 2008-12-03  Dean McNamee  <deanm@chromium.org>
2990
2991         Bug 22623: Uninitialized memory access in cache parsing code
2992         <https://bugs.webkit.org/show_bug.cgi?id=22623>
2993
2994         Reviewed by David Kilzer.
2995
2996         Initialize m_haveParsedCacheControlHeader and m_haveParsedPragmaHeader.
2997
2998         * platform/network/ResourceResponseBase.h:
2999         (WebCore::ResourceResponseBase::ResourceResponseBase):
3000
3001 2008-12-03  Antti Koivisto  <antti@apple.com>
3002
3003         Probable build fix.
3004
3005         * WebCoreSources.bkl:
3006
3007 2008-12-03  Antti Koivisto  <antti@apple.com>
3008
3009         Forgot to commit these.
3010
3011         * dom/Node.cpp:
3012         (WebCore::forEachTagSelector):
3013         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
3014         (WebCore::Node::querySelector):
3015         * dom/SelectorNodeList.cpp:
3016         (WebCore::createSelectorNodeList):
3017
3018 2008-12-03  Antti Koivisto  <antti@apple.com>
3019
3020         Reviewed by Dan Bernstein and Mark Rowe.
3021
3022         https://bugs.webkit.org/show_bug.cgi?id=22379
3023         Make CSSOM use less memory
3024
3025         Reduce size of the CSSSelector by 3/8 by moving rarely used fields to a rare data
3026         struct. Browsing around with some instrumentation showed that ~0.1% of all selectors
3027         encountered had rare data.
3028         
3029         This also eliminates the CSSNthSelector subclass which will make possible to store
3030         CSSSelectors in an array instead of a linked list for futher memory savings.
3031
3032         * css/CSSGrammar.y:
3033         * css/CSSNthSelector.cpp: Removed.
3034         * css/CSSNthSelector.h: Removed.
3035         * css/CSSParser.cpp:
3036         (WebCore::CSSParser::createFloatingSelector):
3037         * css/CSSParser.h:
3038         * css/CSSSelector.cpp:
3039         (WebCore::CSSSelector::specificity):
3040         (WebCore::CSSSelector::operator==):
3041         (WebCore::CSSSelector::selectorText):
3042         (WebCore::CSSSelector::setTagHistory):
3043         (WebCore::CSSSelector::attribute):
3044         (WebCore::CSSSelector::setAttribute):
3045         (WebCore::CSSSelector::setArgument):
3046         (WebCore::CSSSelector::setSimpleSelector):
3047         (WebCore::CSSSelector::parseNth):
3048         (WebCore::CSSSelector::matchNth):
3049         (WebCore::CSSSelector::RareData::parseNth):
3050         (WebCore::CSSSelector::RareData::matchNth):
3051         * css/CSSSelector.h:
3052         (WebCore::CSSSelector::CSSSelector):
3053         (WebCore::CSSSelector::~CSSSelector):
3054         (WebCore::CSSSelector::tagHistory):
3055         (WebCore::CSSSelector::hasAttribute):
3056         (WebCore::CSSSelector::argument):
3057         (WebCore::CSSSelector::simpleSelector):
3058         (WebCore::CSSSelector::RareData::RareData):
3059         (WebCore::CSSSelector::createRareData):
3060         (WebCore::CSSSelector::):
3061         * css/CSSStyleSelector.cpp:
3062         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
3063         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
3064
3065 2008-12-03  Jian Li  <jianli@chromium.org>
3066
3067         Reviewed by Alexey Proskuryakov.
3068
3069         Remove unneeded included file in WorkerThread.cpp.
3070         https://bugs.webkit.org/show_bug.cgi?id=22613
3071
3072         * dom/WorkerThread.cpp: No need to include JSWorkerContext.h.
3073
3074 2008-12-02  Alexey Proskuryakov  <ap@webkit.org>
3075
3076         Reviewed by Maciej Stachowiak.
3077
3078         https://bugs.webkit.org/show_bug.cgi?id=22543
3079         Consolidate ActiveDOMObject page cache interaction
3080
3081         Test: http/tests/xmlhttprequest/abort-on-leaving-page.html
3082
3083         * dom/ActiveDOMObject.cpp:
3084         (WebCore::ActiveDOMObject::canSuspend):
3085         (WebCore::ActiveDOMObject::suspend):
3086         (WebCore::ActiveDOMObject::resume):
3087         * dom/ActiveDOMObject.h:
3088         * dom/ScriptExecutionContext.cpp:
3089         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
3090         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
3091         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
3092         * dom/ScriptExecutionContext.h:
3093         Added methods for suspending and resuming active objects.
3094
3095         * dom/Worker.cpp:
3096         (WebCore::Worker::canSuspend):
3097         (WebCore::Worker::stop):
3098         * dom/Worker.h:
3099         Workers cannot be suspended yet. This is a change in behavior, as workers used to keep
3100         running until their owner was destroyed.
3101
3102         * loader/FrameLoader.cpp:
3103         (WebCore::FrameLoader::stopLoading): No longer call stopActiveDOMObjects() here, because
3104         their activity is not necessarily loading.
3105         (WebCore::FrameLoader::canCachePage): Can only cache if all active objects can be suspended.
3106         Previously, stopLoading() cancelled outstanding XMLHttpRequests, which made the page
3107         uncacheable due to no-null main document error.
3108         (WebCore::FrameLoader::commitProvisionalLoad): Suspend or stop active objects, depending on
3109         whether the document will be cached.
3110         (WebCore::FrameLoader::frameDetached): Stop active objects to let them clean up before their
3111         context is destroyed.
3112
3113         * xml/XMLHttpRequest.h: added canSuspend().
3114         * xml/XMLHttpRequest.cpp:
3115         (WebCore::XMLHttpRequest::canSuspend): Only XHRs that are not loading can be suspended.
3116         (WebCore::XMLHttpRequest::stop): Call abort() instead of internalAbort() to dispatch events
3117         for Firefox compatibility. This is a change in behavior that helps test that requests do
3118         get aborted.
3119         (WebCore::XMLHttpRequest::contextDestroyed): The request must have been stopped by now, so
3120         assert that.
3121
3122 2008-12-02  Chris Fleizach  <cfleizach@apple.com>
3123
3124         Reviewed by Beth Dakin.
3125
3126         Bug 22606: Can <th> serves as the AXTitleUIElement for <td>?
3127
3128         Test: accessibility/th-as-title-ui.html
3129
3130         * page/AccessibilityObject.h:
3131         (WebCore::AccessibilityObject::isGroup):
3132         * page/AccessibilityRenderObject.cpp:
3133         (WebCore::AccessibilityRenderObject::isGroup):
3134         * page/AccessibilityRenderObject.h:
3135         * page/AccessibilityTableCell.cpp:
3136         (WebCore::AccessibilityTableCell::rowIndexRange):
3137         (WebCore::AccessibilityTableCell::columnIndexRange):
3138         (WebCore::AccessibilityTableCell::titleUIElement):
3139         * page/AccessibilityTableCell.h:
3140         * page/mac/AccessibilityObjectWrapper.mm:
3141         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
3142
3143 2008-12-02  Simon Fraser  <simon.fraser@apple.com>
3144
3145         Reviewed by Dave Hyatt
3146
3147         https://bugs.webkit.org/show_bug.cgi?id=22472
3148         
3149         Override absoluteClippedOverflowRect() in RenderReplaced to return a rect
3150         that is large enough to encompass the selection, so that the repainting of
3151         selected replaced elements works correctly.
3152         
3153         Test: fast/repaint/selected-replaced.html
3154
3155         * rendering/RenderReplaced.cpp:
3156         (WebCore::RenderReplaced::selectionRect):
3157         (WebCore::RenderReplaced::localSelectionRect):
3158         (WebCore::RenderReplaced::absoluteClippedOverflowRect):
3159         * rendering/RenderReplaced.h:
3160
3161 2008-12-02  Gregory Hughes  <ghughes@apple.com>
3162
3163         Reviewed by Beth Dakin.
3164
3165         Bug 22513: ZOOM: text selection does not send correct zoom bounds
3166
3167         When zoomed, text selection must send the zoom bounds in flipped
3168         screen coordinates.
3169
3170         * editing/mac/SelectionControllerMac.mm:
3171         (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
3172         * page/mac/WebCoreViewFactory.h:
3173
3174 2008-12-02  Dean Jackson  <dino@apple.com>
3175
3176         Reviewed by Sam Weinig.
3177
3178         Remove support for 'now' from CSS (was
3179         erroneously added to transition and animation delay)
3180         https://bugs.webkit.org/show_bug.cgi?id=22571
3181
3182         * css/CSSParser.cpp:
3183         (WebCore::CSSParser::parseAnimationDelay):
3184         * css/CSSStyleSelector.cpp:
3185         (WebCore::CSSStyleSelector::mapAnimationDelay):
3186         * css/CSSValueKeywords.in:
3187
3188 2008-12-02  Eric Seidel  <eric@webkit.org>
3189
3190         Build fix, no review.
3191
3192         Fix the Mac and gtk builds:
3193         Don't use a float to hold a double.
3194         Remove a now duplicate symbol.
3195
3196         * page/Frame.cpp:
3197         (WebCore::Frame::selectionLayoutChanged):
3198         * platform/gtk/TemporaryLinkStubs.cpp:
3199
3200 2008-12-02  Chris Fleizach  <cfleizach@apple.com>
3201
3202         Bug 22596: Some elements don't report AXBlockQuoteLevel
3203         https://bugs.webkit.org/show_bug.cgi?id=22596
3204  
3205         Reviewed by John Sullivan.
3206
3207         * page/mac/AccessibilityObjectWrapper.mm:
3208         (blockquoteLevel):
3209         (AXAttributeStringSetBlockquoteLevel):
3210         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
3211         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
3212
3213 2008-12-02  Dean McNamee  <deanm@chromium.org>
3214
3215         Reviewed by Eric Seidel.
3216
3217         Correctly handle a theme returning a non-blinking interval.  We should
3218         not set any timers when the interval is 0 (non-blinking), otherwise we
3219         repeatedly set and destroy a blinking timer, causing a paint and timer
3220         storm.  This is applicable to GTK and Windows, where a user can set a
3221         non-blinking caret in their system preferences.
3222
3223         Renamed caretBlinkFrequency to the more accurate caretBlinkInterval.
3224
3225         * page/Frame.cpp:
3226         (WebCore::Frame::selectionLayoutChanged):
3227         * platform/Theme.h:
3228         (WebCore::Theme::caretBlinkInterval):
3229         * platform/gtk/RenderThemeGtk.cpp:
3230         (WebCore::RenderThemeGtk::caretBlinkInterval):
3231         * platform/gtk/RenderThemeGtk.h:
3232         * rendering/RenderTheme.h:
3233         (WebCore::RenderTheme::caretBlinkInterval):
3234
3235 2008-12-02  David Levin  <levin@chromium.org>
3236
3237         Reviewed by Eric Seidel.
3238
3239         https://bugs.webkit.org/show_bug.cgi?id=22538
3240         
3241         startsWith uses find which searches through the whole string if no match is found.
3242         Using reverseFind with an index of 0 has the benefit of only searching for the match
3243         at the beginning of the string.  This may only be a small benefit in the overall program,
3244         but it may help in some cases when the string is big.
3245
3246         No observable change in behavior, so no test.
3247  
3248         * platform/text/StringImpl.h:
3249         (WebCore::StringImpl::startsWith):
3250
3251 2008-10-29  Eric Seidel  <eric@webkit.org>
3252
3253         Reviewed by Darin Adler.
3254
3255         Wrap a JSC-only hack in a USE(JSC) block to fix the v8 build.
3256         https://bugs.webkit.org/show_bug.cgi?id=21951
3257
3258         * svg/SVGElementInstance.cpp:
3259         (WebCore::SVGElementInstance::forgetWrapper):
3260
3261 2008-12-02  Eric Seidel  <eric@webkit.org>
3262
3263         Reviewed by Darin Adler.
3264
3265         Add an ASSERT to try and catch the root cause of:
3266         https://bugs.webkit.org/show_bug.cgi?id=22168
3267         http://code.google.com/p/chromium/issues/detail?id=4122
3268
3269         * editing/TextIterator.cpp:
3270         (WebCore::TextIterator::emitText):
3271
3272 2008-12-02  Brent Fulgham  <bfulgham@gmail.com>
3273
3274         Reviewed by Adam Roben.
3275
3276         Remove some CG-specific code from the Windows Cairo build.
3277         https://bugs.webkit.org/show_bug.cgi?id=22586
3278
3279         No new test cases since this update should create no user-visible
3280         changes, and should be fully covered by the existing regression
3281         tests.
3282
3283         * WebCore.vcproj/WebCore.vcproj: Remove FontDatabase from
3284         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3285         (WebCore::focusRingColor): Add stub method
3286         * platform/win/TemporaryLinkStubs.cpp:
3287         (WebCore::populateFontDatabase): Add stub method.
3288
3289 2008-12-01 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3290
3291         Reviewed by Tor Arne Vestbø.
3292
3293         MinGW compilation fix for PluginPackageWin.cpp
3294
3295         https://bugs.webkit.org/show_bug.cgi?id=22585
3296
3297         * plugins/win/PluginPackageWin.cpp:
3298         (WebCore::PluginPackage::fetchInfo):
3299
3300 2008-12-02  Adam Roben  <aroben@apple.com>
3301
3302         Build fix for Windows projects with NOMINMAX defined globally
3303
3304         * platform/win/COMPtr.h: Don't redefine NOMINMAX if it's already
3305         defined.
3306
3307 2008-12-02  Simon Hausmann  <hausmann@webkit.org>
3308
3309         Reviewed by Tor Arne Vestbø.
3310
3311         Build JavaScriptCore into libQtWebKit.so through a direct build
3312         instead of a static library. When linking a static library into
3313         a shared library qmake generates an incorrect .prl file, which
3314         causes all sorts of different build problems when linking against
3315         QtWebKit. Fixing this in qmake requires bigger changes that are
3316         currently not possible, so we need to work around this limitation
3317         for now. The advantages of the separate build did not outweight the
3318         build problems it caused.
3319
3320         * WebCore.pro: include JavaScriptCore.pri, re-enable prl support
3321         and rename the lut generator to domlut to avoid a conflict with
3322         JavaScriptCore.pri's lut generator.
3323
3324 2008-12-02  David Levin  <levin@chromium.org>
3325
3326         Reviewed by Alexey Proskuryakov.
3327
3328         https://bugs.webkit.org/show_bug.cgi?id=22588
3329         Move securityOrigin() from Document and WorkerContext into ScriptExecutionContext.
3330
3331         No observable change in behavior, so no test.
3332         
3333         * dom/Document.cpp:
3334         (WebCore::Document::open):
3335         (WebCore::Document::domain):
3336         (WebCore::Document::setDomain):
3337         (WebCore::Document::initSecurityContext):
3338         (WebCore::Document::setSecurityOrigin):
3339         * dom/Document.h:
3340         * dom/ScriptExecutionContext.cpp:
3341         (WebCore::ScriptExecutionContext::setSecurityOrigin):
3342         * dom/ScriptExecutionContext.h:
3343         (WebCore::ScriptExecutionContext::securityOrigin):
3344         * dom/WorkerContext.cpp:
3345         (WebCore::WorkerContext::WorkerContext):
3346         * dom/WorkerContext.h:
3347         These changes are for the move of securityOrigin().
3348         
3349         * xml/XMLHttpRequest.cpp:
3350         (WebCore::XMLHttpRequest::createRequest):
3351         (WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest):
3352         (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
3353         (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult):
3354         (WebCore::XMLHttpRequest::setRequestHeader):
3355         (WebCore::XMLHttpRequest::getAllResponseHeaders):
3356         (WebCore::XMLHttpRequest::getResponseHeader):
3357         (WebCore::XMLHttpRequest::processSyncLoadResults):
3358         (WebCore::XMLHttpRequest::willSendRequest):
3359         (WebCore::XMLHttpRequest::accessControlCheck):
3360         (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
3361         Change XMLHttpRequest to use ScriptExecutionContext instead of Document to access securityOrigin().
3362
3363 2008-12-02  André Pönitz  <apoenitz@trolltech.com>
3364
3365         Reviewed by Simon Hausmann.
3366
3367         Disable the creation of debug information for the Qt build when done
3368         inside Qt. With 670 mb it was slowing down gdb start significantly
3369         for third-party applications that usually don't need it.
3370
3371         * WebCore.pro:
3372
3373 2008-12-01  Beth Dakin  <bdakin@apple.com>
3374
3375         Reviewed by Dan Bernstein.
3376
3377         Fix for https://bugs.webkit.org/show_bug.cgi?id=13736 REGRESSION 
3378         (r19811): Using the down arrow in a textarea gets "stuck" at the 
3379         end of a wrapped line
3380         And corresponding: <rdar://problem/5347931>
3381
3382         The basic problem here is that Position::getInlineBoxAndOffset() 
3383         failed to look beyond a single renderer. This patch looks for a 
3384         better match beyond the first renderer when the affinity is 
3385         downstream and we failed to find a "perfect" match. 
3386         * dom/Position.cpp:
3387         (WebCore::isNonTextLeafChild):
3388         (WebCore::searchAheadForBetterMatch):
3389         (WebCore::Position::getInlineBoxAndOffset):
3390
3391         This is a fix I made based on code inspection. It looks like the 
3392         old code here and skipped over the parent as a possible match. 
3393         * rendering/RenderObject.cpp:
3394         (WebCore::RenderObject::nextInPreOrderAfterChildren):
3395
3396 2008-12-01  Brent Fulgham  <bfulgham@gmail.com>
3397
3398         Reviewed by Adam Roben.
3399
3400         Add WML related files to Visual Studio projects.
3401         https://bugs.webkit.org/show_bug.cgi?id=22561
3402
3403         * WebCore.vcproj/WebCore.vcproj:
3404           1. Add files from the wml directory to the set of windows files.
3405           2. Extend include paths with new wml directory. 
3406           3. Add new autogenerated WML files to DerivedSources.
3407           4. Alphabetize preprocesor includes (holdover from earlier debugging).
3408
3409 2008-12-01  Steve Falkenburg  <sfalken@apple.com>
3410
3411         Revise node/selection image fix.
3412         Moved updateLayout call so selection rect is fetched after the layout.
3413         
3414         Reviewed by Adam Roben.
3415
3416         * page/win/FrameCGWin.cpp:
3417         (WebCore::imageFromRect):
3418         (WebCore::imageFromSelection):
3419         (WebCore::Frame::nodeImage):
3420
3421 2008-12-01  Steve Falkenburg  <sfalken@apple.com>
3422
3423         Support needed to implement renderedImage for Windows.
3424         https://bugs.webkit.org/show_bug.cgi?25648
3425
3426         Reviewed by Adam Roben.
3427
3428         * page/Frame.h:
3429         * page/win/FrameCGWin.cpp:
3430         (WebCore::imageFromRect):
3431         (WebCore::imageFromSelection):
3432         (WebCore::Frame::nodeImage):
3433         * page/win/FrameCairoWin.cpp:
3434         (WebCore::imageFromNode):
3435
3436 2008-12-01  Simon Fraser  <simon.fraser@apple.com>
3437
3438         Reviewed by Dan Bernstein
3439
3440         https://bugs.webkit.org/show_bug.cgi?id=22581
3441         
3442         Fix the painting of the caps lock indicator for transformed text inputs,
3443         by replacing a call to absoluteContentBox() with code that computes the
3444         painting rect for the input contents.
3445
3446         * rendering/RenderTextControl.cpp:
3447         (WebCore::RenderTextControl::paint):
3448
3449 2008-12-01  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3450
3451         Reviewed by George Staikos.
3452
3453         Add two new helper functions to WMLElement, parseValueSubstitutingVariableReferences/parseValueForbiddingVariableReferences.
3454
3455         Convert all elements to parse their attribute values using these new helper functions. This simplifies the
3456         actual attribute parsing code in all WMLElement derived classes, as most WML attribute values either report
3457         an error if there's a variable reference used in the attribute value, or if it's invalid.
3458
3459         Split the WMLErrorInvalidVariableReference error which covered both 'invalid syntax' / 'wrong location'
3460         in two seperated error codes: WMLErrorInvalidVariableReference / WMLErrorInvalidVariableReferenceLocation.
3461
3462         * wml/WMLAccessElement.cpp:
3463         (WebCore::WMLAccessElement::parseMappedAttribute):
3464         * wml/WMLDoElement.cpp:
3465         (WebCore::WMLDoElement::defaultEventHandler):
3466         (WebCore::WMLDoElement::parseMappedAttribute):
3467         * wml/WMLElement.cpp:
3468         (WebCore::WMLElement::parseValueSubstitutingVariableReferences):
3469         (WebCore::WMLElement::parseValueForbiddingVariableReferences):
3470         * wml/WMLElement.h:
3471         * wml/WMLErrorHandling.cpp:
3472         (WebCore::reportWMLError):
3473         * wml/WMLErrorHandling.h:
3474         (WebCore::):
3475         * wml/WMLOnEventElement.cpp:
3476         (WebCore::WMLOnEventElement::parseMappedAttribute):
3477         * wml/WMLPrevElement.cpp:
3478         (WebCore::WMLPrevElement::executeTask):
3479         * wml/WMLSetvarElement.cpp:
3480         (WebCore::WMLSetvarElement::parseMappedAttribute):
3481         * wml/WMLTimerElement.cpp:
3482         (WebCore::WMLTimerElement::parseMappedAttribute):
3483
3484 2008-12-01  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3485
3486         Reviewed by George Staikos.
3487
3488         Fix switching active cards within a document. No way to test, until <go> support is implemented.
3489
3490         * wml/WMLCardElement.cpp:
3491         (WebCore::WMLCardElement::showCard):
3492         (WebCore::WMLCardElement::hideCard):
3493         (WebCore::WMLCardElement::setActiveCardInDocument):
3494         * wml/WMLCardElement.h:
3495
3496 2008-12-01  David Kilzer  <ddkilzer@apple.com>
3497
3498         Fix logic error in LegacyWebArchive::create() from r38884.
3499
3500         * loader/archive/cf/LegacyWebArchive.cpp:
3501         (WebCore::LegacyWebArchive::create): Only continue if the
3502         subresource is actually added.
3503
3504 2008-12-01  David Kilzer  <ddkilzer@apple.com>
3505
3506         Bug 22466: REGRESSION (35867): Many resources missing when saving webarchive of webkit.org
3507
3508         <https://bugs.webkit.org/show_bug.cgi?id=22466>
3509         <rdar://problem/6403593>
3510
3511         Reviewed by Brady Eidson.
3512
3513         Test: http/tests/webarchive/test-preload-resources.html
3514
3515         * loader/archive/cf/LegacyWebArchive.cpp:
3516         (WebCore::LegacyWebArchive::create): Check the WebCore cache for
3517         resources if DocumentLoader::subresource() doesn't return them.
3518         Note that the DocumentLoader::subresource() method returned
3519         preloaded resources before r35867, but this caused a regression in
3520         Mail.
3521
3522 2008-12-01  Julien Chaffraix  <jchaffraix@webkit.org>
3523
3524         Reviewed by Eric Seidel.
3525
3526         Bug 22564: Make HTML elements' constructors take a QualifiedName
3527         https://bugs.webkit.org/show_bug.cgi?id=22564
3528
3529         - Modified the remaining HTML elements' constructors to take a QualifiedName.
3530
3531         - Added an assertion that the QualifiedName given corresponds to the element constructed.
3532
3533         * bindings/js/JSAudioConstructor.cpp:
3534         (WebCore::constructAudio):
3535         * html/HTMLAudioElement.cpp:
3536         (WebCore::HTMLAudioElement::HTMLAudioElement):
3537         * html/HTMLAudioElement.h:
3538         * html/HTMLBRElement.cpp:
3539         (WebCore::HTMLBRElement::HTMLBRElement):
3540         * html/HTMLBRElement.h:
3541         * html/HTMLElement.cpp:
3542         (WebCore::HTMLElement::setInnerText):
3543         * html/HTMLElementFactory.cpp:
3544         (WebCore::brConstructor):
3545         (WebCore::quoteConstructor):
3546         (WebCore::marqueeConstructor):
3547         (WebCore::audioConstructor):
3548         (WebCore::videoConstructor):
3549         (WebCore::sourceConstructor):
3550         * html/HTMLMarqueeElement.cpp:
3551         (WebCore::HTMLMarqueeElement::HTMLMarqueeElement):
3552         * html/HTMLMarqueeElement.h:
3553         * html/HTMLQuoteElement.cpp:
3554         (WebCore::HTMLQuoteElement::HTMLQuoteElement):
3555         * html/HTMLQuoteElement.h:
3556         * html/HTMLSourceElement.cpp:
3557         (WebCore::HTMLSourceElement::HTMLSourceElement):
3558         * html/HTMLSourceElement.h:
3559         * html/HTMLVideoElement.cpp:
3560         (WebCore::HTMLVideoElement::HTMLVideoElement):
3561         * html/HTMLVideoElement.h:
3562         * rendering/RenderTextControl.cpp:
3563         (WebCore::RenderTextControl::updateFromElement):
3564
3565 2008-12-01  Julien Chaffraix  <jchaffraix@webkit.org>
3566
3567         Reviewed by Antti Koivisto.
3568
3569         Bug 22441: Bridge the gap between the generated ElementFactory and HTMLElementFactory
3570         https://bugs.webkit.org/show_bug.cgi?id=22441
3571
3572         Add an assertion to the modified HTML elements' constructor
3573         to check that the QualifiedName parameter is the one that
3574         matches the Element's.
3575
3576         * html/HTMLBaseElement.cpp:
3577         (WebCore::HTMLBaseElement::HTMLBaseElement):
3578         * html/HTMLBlockquoteElement.cpp:
3579         (WebCore::HTMLBlockquoteElement::HTMLBlockquoteElement):
3580         * html/HTMLBodyElement.cpp:
3581         (WebCore::HTMLBodyElement::HTMLBodyElement):
3582         * html/HTMLButtonElement.cpp:
3583         (WebCore::HTMLButtonElement::HTMLButtonElement):
3584         * html/HTMLDListElement.cpp:
3585         (WebCore::HTMLDListElement::HTMLDListElement):
3586         * html/HTMLDirectoryElement.cpp:
3587         (WebCore::HTMLDirectoryElement::HTMLDirectoryElement):
3588         * html/HTMLDivElement.cpp:
3589         (WebCore::HTMLDivElement::HTMLDivElement):
3590         * html/HTMLFieldSetElement.cpp:
3591         (WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
3592         * html/HTMLFormElement.cpp:
3593         (WebCore::HTMLFormElement::HTMLFormElement):
3594         * html/HTMLFrameElement.cpp:
3595         (WebCore::HTMLFrameElement::HTMLFrameElement):
3596         * html/HTMLFrameSetElement.cpp:
3597         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
3598         * html/HTMLHeadElement.cpp:
3599         (WebCore::HTMLHeadElement::HTMLHeadElement):