Fix painting of SVG <image> when the image must be scaled to retain aspect ratio
[WebKit-https.git] / WebCore / ChangeLog
1 2008-01-07  Oliver Hunt  <oliver@apple.com>
2
3         Reviewed by Niko.
4
5         Fix painting of SVG <image> when the image must be scaled to retain aspect ratio
6
7         Test: svg/custom/image-with-aspect-ratio-stretch.svg
8
9         * rendering/RenderSVGImage.cpp:
10         (WebCore::RenderSVGImage::adjustRectsForAspectRatio):
11
12 2008-01-07  Dan Bernstein  <mitz@apple.com>
13
14         Build fix.
15
16         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
17         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
18
19 2008-01-07  Adele Peterson  <adele@apple.com>
20
21         Add missing newline.
22
23         * rendering/MediaControlElements.cpp:
24
25 2008-01-07  Jon Honeycutt  <jhoneycutt@apple.com>
26
27         Reviewed by Hyatt.
28
29         <rdar://problem/5673489> Safari does not render windowless plugins in an
30         iframe when opacity < 1.0
31
32         Plugins in transparency layers handle their own world transforms, so
33         only apply the horizontal/vertical transform if we are not in a
34         transparency layer.
35
36         * platform/graphics/GraphicsContext.h: Add a Windows-platform-only
37         inTransparencyLayer() function
38         * platform/win/GraphicsContextWin.cpp:
39         (WebCore::GraphicsContext::getWindowsContext): Use inTransparencyLayer()
40         (WebCore::GraphicsContext::inTransparencyLayer):
41         (WebCore::GraphicsContext::releaseWindowsContext): Use
42         inTransparencyLayer()
43         * plugins/win/PluginViewWin.cpp:
44         (WebCore::PluginViewWin::paint): When retrieving the HDC, use the rect
45         relative to the window. Pass m_isTransparent to
46         get/releaseWindowsContext(). Only set the world transform if we are not
47         in a transparency layer.
48
49 2008-01-07  Adele Peterson  <adele@apple.com>
50
51         Build fix.  Need to wrap these classes in #if ENABLE(VIDEO)
52
53         * rendering/MediaControlElements.cpp:
54         * rendering/MediaControlElements.h:
55
56 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
57
58         Reviewed by Mark.
59
60         Enable SVG_FONTS by default.
61
62         * Configurations/WebCore.xcconfig:
63         * WebCore.vcproj/build-generated-files.sh:
64
65 2008-01-07  Dan Bernstein  <mitz@apple.com>
66
67         Build fix.
68
69         * platform/graphics/qt/SimpleFontDataQt.cpp:
70         (WebCore::SimpleFontData::SimpleFontData):
71         (WebCore::SimpleFontData::~SimpleFontData):
72
73 2008-01-07  Adam Barth  <hk9565@gmail.com>
74
75         Reviewed by Sam Weinig
76
77         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16523
78         <rdar://problem/5657447>
79
80         When a frame is created with the URL "about:blank" or "", it should
81         inherit its SecurityOrigin from its opener.  However, once it has
82         decided on that SecurityOrigin, it should not change its mind.
83         Prior to this patch, several events could induce the frame to change
84         its SecurityOrigin, permitting an attacker to inject script into an
85         arbitrary SecurityOrigin.
86
87         This patch makes several changes:
88
89         1) Documents refuse to change from one SecurityOrigin to another
90            unless explicitly instructed to do so.
91
92         2) Navigating to a JavaScript URL that produces a value
93            preserves the current SecurityOrigin explicitly instead of
94            relying on the URL to preserve the origin (which fails for
95            about:blank URLs and SecurityOrigins with document.domain set).
96
97            Ideally, we should not preserve the URL at all.  Instead, the
98            frame's URL should be the JavaScript URL, as in Firefox, but this
99            would require changes that are too risky for this patch.  I'll
100            file this as a separate issue.
101
102         3) Various methods of navigating to JavaScript URLs were not
103            properly handling JavaScript that returned a value (and should
104            therefore replace the current document).  This patch unifies
105            those code paths with the path that works.
106
107            There are still a handful of bugs relating to the handling of
108            JavaScript URLs, but I'll file those as separate issues.
109
110         Tests: http/tests/security/aboutBlank/xss-DENIED-navigate-opener-document-write.html
111                http/tests/security/aboutBlank/xss-DENIED-navigate-opener-javascript-url.html
112                http/tests/security/aboutBlank/xss-DENIED-set-opener.html
113
114         * dom/Document.cpp:
115         (WebCore::Document::initSecurityOrigin):
116         * dom/Document.h:
117         (WebCore::Document::setSecurityOrigin):
118         * loader/FrameLoader.cpp:
119         (WebCore::FrameLoader::changeLocation):
120         (WebCore::FrameLoader::urlSelected):
121         (WebCore::FrameLoader::requestFrame):
122         (WebCore::FrameLoader::submitForm):
123         (WebCore::FrameLoader::executeIfJavaScriptURL):
124         (WebCore::FrameLoader::begin):
125         * loader/FrameLoader.h:
126         * platform/SecurityOrigin.cpp:
127         (WebCore::SecurityOrigin::setForURL):
128         (WebCore::SecurityOrigin::createForFrame):
129         * platform/SecurityOrigin.h:
130
131 2008-01-07  Adele Peterson  <adele@apple.com>
132
133         Forgot to check in these changes in my last checkin.
134
135         * rendering/RenderThemeSafari.cpp:
136
137 2008-01-07  Dan Bernstein  <mitz@apple.com>
138
139         Build fixes.
140
141         * WebCore.pro:
142         * platform/graphics/qt/FontCacheQt.cpp:
143         (WebCore::FontCache::getCachedFontData):
144
145 2008-01-07  Timothy Hatcher  <timothy@apple.com>
146
147         Reviewed by John Sullivan.
148
149         <rdar://problem/5674119> Make the Web Inspector toolbar the normal size when not docked
150
151         * page/inspector/inspector.css: Changed CSS rules to have the toolbar and buttons be
152           normal height when not docked, and small when docked. Also added some cursor properties
153           prevent showing the text cursor over areas that are not selectable.
154         * page/inspector/Images: A few images added and old ones removed or renamed.
155
156 2008-01-07  Alp Toker  <alp@atoker.com>
157
158         Prospective GTK+ autotools/qmake VIDEO build fix for breakage
159         introduced in r29257.
160
161         * GNUmakefile.am:
162         * WebCore.pro:
163
164 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
165
166         Reviewed by Oliver.
167
168         Build fix affecting all builds - again related to the unicode-range addition.
169
170         * css/CSSFontSelector.cpp:
171         (WebCore::CSSFontSelector::addFontFaceRule):
172         * css/SVGCSSFontFace.cpp:
173         (WebCore::SVGCSSFontFace::SVGCSSFontFace):
174         * css/SVGCSSFontFace.h:
175         * rendering/RenderSVGText.cpp:
176         * svg/SVGFont.cpp:
177         (WebCore::svgFontAndFontFaceElementForFontData):
178         (WebCore::floatWidthMissingGlyphCallback):
179         (WebCore::drawTextMissingGlyphCallback):
180         * svg/SVGFontFaceElement.cpp:
181
182 2008-01-07  Adele Peterson  <adele@apple.com>
183
184         Reviewed by Antti, Adam, and Mitz.
185
186         WebCore part of fix for 
187         <rdar://problem/5619073> Updated look for <video> controls
188         <rdar://problem/5619057> Add volume control to video controls
189
190         * WebCore.base.exp: Added symbols for WebKitSystemInterface drawing methods.
191         * WebCore.xcodeproj/project.pbxproj: Added MediaControlElements.h/cpp
192         * WebCore.vcproj/WebCore.vcproj: ditto.
193
194         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added cases for new appearances.
195         * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): Added cases for new types.
196         * css/CSSSelector.h: (WebCore::CSSSelector::): Added new pseudo elements.
197         * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkOneSelector): ditto.
198         * css/CSSValueKeywords.in: Added keywords for new control appearance styles.
199         * css/html4.css: Added new styles for new controls.
200
201         * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::canPlay): Added. Takes loading state into account.
202         * html/HTMLMediaElement.h:
203
204         * page/EventHandler.cpp: (WebCore::EventHandler::updateMouseEventTargetNode): Make sure the events always go to the capturing node, if there is one.
205
206         * platform/mac/WebCoreSystemInterface.h: Added drawing methods for controls.
207         * platform/mac/WebCoreSystemInterface.mm: ditto.
208
209         * rendering/MediaControlElements.cpp: Added.
210         (WebCore::MediaControlShadowRootElement::MediaControlShadowRootElement): Moved from RenderMedia.  Made this relatively positioned, instead of absolute.
211         (WebCore::MediaControlInputElement::MediaControlInputElement): Moved from RenderMedia.  Removed call to updateFromElement, 
212          since its too early to do this here, and causes crashes for the slider.
213         (WebCore::MediaControlInputElement::attachToParent): Moved from RenderMedia.
214         (WebCore::MediaControlInputElement::update): ditto.
215         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Added.
216         (WebCore::MediaControlMuteButtonElement::defaultEventHandler): ditto.
217         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Moved from RenderMedia.
218         (WebCore::MediaControlPlayButtonElement::defaultEventHandler): ditto.
219         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Added.
220         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): ditto.
221         (WebCore::MediaControlSeekButtonElement::seekTimerFired): ditto.
222         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Moved from RenderMedia.
223         (WebCore::MediaControlTimelineElement::defaultEventHandler): ditto.
224         (WebCore::MediaControlTimelineElement::update): ditto. 
225         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Added.
226         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler): ditto.
227         * rendering/MediaControlElements.h: Added. Moved from RenderMedia.
228         (WebCore::MediaControlShadowRootElement::isShadowNode):
229         (WebCore::MediaControlShadowRootElement::shadowParentNode):
230         (WebCore::RenderMediaControlShadowRoot::RenderMediaControlShadowRoot):
231         (WebCore::RenderMediaControlShadowRoot::setParent):
232
233         * rendering/RenderMedia.cpp: Moved control element classes to MediaControlElements files.
234         (WebCore::RenderMedia::RenderMedia): No need to initialize RefPtrs.
235         (WebCore::RenderMedia::layout): Set the position for the controlsRenderer.
236         (WebCore::RenderMedia::createPanel): Added nil check for the renderer.
237         (WebCore::RenderMedia::createMuteButton): Added.
238         (WebCore::RenderMedia::createSeekBackButton): ditto.
239         (WebCore::RenderMedia::createSeekForwardButton): ditto.
240         (WebCore::RenderMedia::createTimeDisplay): Added nil check for the renderer.
241         (WebCore::RenderMedia::createFullscreenButton): Added.
242         (WebCore::RenderMedia::updateControls): Create, delete, and update new controls when appropriate.
243         (WebCore::RenderMedia::updateControlVisibility): Don't fade controls for audio controls. 
244         (WebCore::RenderMedia::forwardEvent): Forward events for new controls.
245         * rendering/RenderMedia.h: Added new methods for creating new controls.
246
247         * rendering/RenderObject.cpp: (WebCore::RenderObject::containingBlock): Updated special case for media elements, which are replaced elements, 
248           but also can contain children (the controls' container) that may need to look for the containing block.
249
250         * rendering/RenderSlider.cpp: (WebCore::RenderSlider::createThumbStyle): Added case for MediaSliderAppearance.
251
252         * rendering/RenderStyle.h: Added appearance constants and pseudo ids for new controls.
253         (WebCore::):
254         (WebCore::RenderStyle::):
255
256         * rendering/RenderTheme.cpp:
257         (WebCore::RenderTheme::adjustStyle): Added cases for new appearances.
258         (WebCore::RenderTheme::paint): ditto.
259         * rendering/RenderTheme.h: Added new methods for painting new appearances.
260         (WebCore::RenderTheme::paintMediaBackground):
261         (WebCore::RenderTheme::paintMediaFullscreenButton):
262         (WebCore::RenderTheme::paintMediaPlayButton):
263         (WebCore::RenderTheme::paintMediaMuteButton):
264         (WebCore::RenderTheme::paintMediaSeekBackButton):
265         (WebCore::RenderTheme::paintMediaSeekForwardButton):
266         (WebCore::RenderTheme::paintMediaSliderThumb):
267         * rendering/RenderThemeMac.h:
268         * rendering/RenderThemeMac.mm:
269         (WebCore::RenderThemeMac::RenderThemeMac): Initialize m_mediaControlBackgroundImage.
270         (WebCore::RenderThemeMac::~RenderThemeMac): Delete m_mediaControlBackgroundImage.
271         (WebCore::RenderThemeMac::paintCapsLockIndicator): Use LocalCurrentGraphicsContext here too, since we use it in all other painting methods.
272         (WebCore::RenderThemeMac::paintSliderTrack): Added case for MediaSliderAppearance.
273         (WebCore::RenderThemeMac::adjustSliderThumbSize): Added case for MediaSliderThumbAppearance.
274         (WebCore::RenderThemeMac::paintMediaBackground): Draws the new artwork for the controls.
275         (WebCore::RenderThemeMac::paintMediaFullscreenButton): ditto.
276         (WebCore::RenderThemeMac::paintMediaMuteButton): ditto.
277         (WebCore::RenderThemeMac::paintMediaPlayButton): ditto.
278         (WebCore::RenderThemeMac::paintMediaSeekBackButton): ditto.
279         (WebCore::RenderThemeMac::paintMediaSeekForwardButton): ditto.
280         (WebCore::RenderThemeMac::paintMediaSliderThumb): ditto.
281         * rendering/RenderThemeSafari.cpp: Draws the new artwork on Windows.
282         (WebCore::RenderThemeSafari::paintSliderTrack):
283         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
284         (WebCore::RenderThemeSafari::paintMediaBackground):
285         (WebCore::RenderThemeSafari::paintMediaFullscreenButton):
286         (WebCore::RenderThemeSafari::paintMediaMuteButton):
287         (WebCore::RenderThemeSafari::paintMediaPlayButton):
288         (WebCore::RenderThemeSafari::paintMediaSeekBackButton):
289         (WebCore::RenderThemeSafari::paintMediaSeekForwardButton):
290         (WebCore::RenderThemeSafari::paintMediaSliderThumb):
291         * rendering/RenderThemeSafari.h:
292
293 2008-01-07  Timothy Hatcher  <timothy@apple.com>
294
295         Reviewed by Darin Adler.
296
297         Fix ASSERTION FAILED: dstOffset + srcSegmentLength == static_cast<int>(data.size())
298         when the replacment string is a different length.
299
300         * platform/text/StringImpl.cpp:
301         (WebCore::StringImpl::replace): Move the parenthesis to be around only the subtraction in
302         the Vector size calculation, correcting the order of math operations.
303
304 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
305
306         Reviewed by Eric. Hopefully fix build with mac tiger after the unicode-range addition. NSInteger not available there.
307
308         * platform/graphics/mac/FontCacheMac.mm:
309
310 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
311
312         Reviewed by Oliver. Fix build error introduced by Dan's unicode-range support patch & enabling SVG_FONTS by default.
313
314         * css/CSSFontSelector.cpp:
315         (WebCore::CSSFontSelector::getFontData):
316
317 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
318
319         Not reviewed. Next try to fix wx/mac leopard build.
320
321         * css/CSSFontSelector.cpp: Need to wrap a SVG* include in ENABLE(SVG) blocks, as this port doesn't build this generated file.
322         * svg/SVGFontFaceElement.cpp:
323         (WebCore::SVGFontFaceElement::createFontData): Fix double<->float conversion issue.
324         * webcore-base.bkl: Undo svg/ include.
325
326 2008-01-07  Dan Bernstein  <mitz@apple.com>
327
328         Reviewed by Dave Hyatt.
329
330         - <rdar://problem/5665216> Support the unicode-range property in @font-face rules
331
332         * GNUmakefile.am:
333         * WebCore.pro:
334         * WebCore.vcproj/WebCore.vcproj:
335         * WebCore.xcodeproj/project.pbxproj:
336         * WebCoreSources.bkl:
337         * bindings/objc/DOM.mm:
338         * bridge/mac/WebCoreAXObject.mm:
339         * css/CSSComputedStyleDeclaration.cpp:
340         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
341         * css/CSSFontFace.cpp:
342         (WebCore::CSSFontFace::fontLoaded): Changed to call the owning segmented
343         font face.
344         (WebCore::CSSFontFace::getFontData):
345         * css/CSSFontFace.h:
346         (WebCore::CSSFontFace::CSSFontFace):
347         (WebCore::CSSFontFace::setSegmentedFontFace):
348         * css/CSSFontFaceSource.cpp:
349         (WebCore::CSSFontFaceSource::pruneTable): Removed the calls to
350         GlyphPageTreeNode::pruneTreeCustomFontData because the fonts in the
351         font table are not exposed in the glyph page tree. Only the segmented
352         font is, and that is taken care of by the segmented font face.
353         (WebCore::CSSFontFaceSource::getFontData):
354         * css/CSSFontFaceSource.h:
355         * css/CSSFontSelector.cpp:
356         (WebCore::CSSFontSelector::addFontFaceRule): Changed to collect
357         @font-face rules with the same family and traits into a single
358         segmented font face, instead of just retaining the most recent one.
359         (WebCore::CSSFontSelector::fontLoaded):
360         (WebCore::CSSFontSelector::getFontData):
361         * css/CSSFontSelector.h:
362         * css/CSSGrammar.y:
363         * css/CSSParser.cpp:
364         (WebCore::CSSParser::parseValue):
365         (WebCore::CSSParser::parseFontFaceUnicodeRange): Added. Parses a unicode
366         range value.
367         * css/CSSParser.h:
368         * css/CSSPrimitiveValue.h:
369         (WebCore::CSSPrimitiveValue::):
370         * css/CSSPropertyNames.in:
371         * css/CSSSegmentedFontFace.cpp: Added.
372         (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
373         (WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace):
374         (WebCore::CSSSegmentedFontFace::pruneTable):
375         (WebCore::CSSSegmentedFontFace::isLoaded):
376         (WebCore::CSSSegmentedFontFace::isValid):
377         (WebCore::CSSSegmentedFontFace::fontLoaded):
378         (WebCore::CSSSegmentedFontFace::overlayRange):
379         (WebCore::CSSSegmentedFontFace::getFontData):
380         * css/CSSSegmentedFontFace.h: Added.
381         (WebCore::FontFaceRange::FontFaceRange):
382         (WebCore::FontFaceRange::from):
383         (WebCore::FontFaceRange::to):
384         (WebCore::FontFaceRange::fontFace):
385         (WebCore::CSSSegmentedFontFace::fontSelector):
386         * css/CSSStyleSelector.cpp:
387         (WebCore::CSSStyleSelector::applyProperty):
388         * css/CSSUnicodeRangeValue.cpp: Added.
389         (WebCore::CSSUnicodeRangeValue::~CSSUnicodeRangeValue):
390         (WebCore::CSSUnicodeRangeValue::cssText):
391         * css/CSSUnicodeRangeValue.h: Added.
392         (WebCore::CSSUnicodeRangeValue::CSSUnicodeRangeValue):
393         (WebCore::CSSUnicodeRangeValue::from):
394         (WebCore::CSSUnicodeRangeValue::to):
395         * css/SVGCSSFontFace.cpp:
396         (WebCore::SVGCSSFontFace::getFontData):
397         * css/SVGCSSFontFace.h:
398         * editing/Editor.cpp:
399         (WebCore::Editor::fontForSelection):
400         * editing/Editor.h:
401         * page/mac/FrameMac.mm:
402         * page/mac/WebCoreFrameBridge.mm:
403         (-[WebCoreFrameBridge fontForSelection:]):
404         * platform/graphics/Font.cpp:
405         (WebCore::WidthIterator::advance):
406         (WebCore::Font::glyphDataForCharacter):
407         (WebCore::Font::primaryFont): Changed to return the simple font data
408         used for the space character.
409         (WebCore::Font::fontDataAt):
410         (WebCore::Font::fontDataForCharacters):
411         (WebCore::Font::drawGlyphBuffer):
412         * platform/graphics/Font.h:
413         * platform/graphics/FontCache.cpp:
414         (WebCore::FontCache::getCachedFontData):
415         (WebCore::FontCache::getFontData):
416         * platform/graphics/FontCache.h:
417         * platform/graphics/FontData.cpp: Renamed to SimpleFontData.cpp
418         * platform/graphics/FontData.h: Renamed to SimpleFontData.cpp.
419         * platform/graphics/FontDataBaseClass.cpp: Added. This will be renamed
420         FontData.cpp.
421         (WebCore::FontData::~FontData):
422         * platform/graphics/FontDataBaseClass.h: Added. This will be renamed
423         FontData.h.
424         * platform/graphics/FontFallbackList.cpp:
425         (WebCore::FontFallbackList::determinePitch):
426         (WebCore::FontFallbackList::fontDataAt):
427         (WebCore::FontFallbackList::fontDataForCharacters):
428         * platform/graphics/FontFallbackList.h:
429         (WebCore::FontFallbackList::primaryFont):
430         * platform/graphics/FontSelector.h:
431         * platform/graphics/GlyphBuffer.h:
432         (WebCore::GlyphBuffer::fontDataAt):
433         (WebCore::GlyphBuffer::swap):
434         (WebCore::GlyphBuffer::add):
435         * platform/graphics/GlyphPageTreeNode.cpp:
436         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
437         (WebCore::GlyphPageTreeNode::initializePage): Added code to initialize
438         pages for segmented font data.
439         (WebCore::GlyphPageTreeNode::getChild):
440         (WebCore::GlyphPageTreeNode::pruneCustomFontData):
441         * platform/graphics/GlyphPageTreeNode.h:
442         (WebCore::GlyphPage::setGlyphDataForCharacter):
443         (WebCore::GlyphPage::setGlyphDataForIndex):
444         (WebCore::GlyphPageTreeNode::getRootChild):
445         * platform/graphics/SegmentedFontData.cpp: Added.
446         (WebCore::SegmentedFontData::~SegmentedFontData):
447         (WebCore::SegmentedFontData::fontDataForCharacter):
448         (WebCore::SegmentedFontData::containsCharacters):
449         (WebCore::SegmentedFontData::isCustomFont):
450         (WebCore::SegmentedFontData::isLoading):
451         (WebCore::SegmentedFontData::isSegmented):
452         * platform/graphics/SegmentedFontData.h: Added.
453         (WebCore::FontDataRange::FontDataRange):
454         (WebCore::FontDataRange::from):
455         (WebCore::FontDataRange::to):
456         (WebCore::FontDataRange::fontData):
457         (WebCore::SegmentedFontData::appendRange):
458         (WebCore::SegmentedFontData::numRanges):
459         (WebCore::SegmentedFontData::rangeAt):
460         * platform/graphics/SimpleFontData.cpp: Copied from WebCore/platform/graphics/FontData.cpp.
461         (WebCore::SimpleFontData::SimpleFontData):
462         (WebCore::SimpleFontData::~SimpleFontData):
463         (WebCore::SimpleFontData::ascent):
464         (WebCore::SimpleFontData::descent):
465         (WebCore::SimpleFontData::widthForGlyph):
466         (WebCore::SimpleFontData::fontDataForCharacter):
467         (WebCore::SimpleFontData::isSegmented):
468         * platform/graphics/SimpleFontData.h: Copied from WebCore/platform/graphics/FontData.h.
469         (WebCore::SimpleFontData::isCustomFont):
470         (WebCore::SimpleFontData::isLoading):
471         * platform/graphics/cairo/GraphicsContextCairo.cpp:
472         (WebCore::GraphicsContext::setPlatformFont):
473         * platform/graphics/gtk/FontCacheGtk.cpp:
474         (WebCore::FontCache::getFontDataForCharacters):
475         * platform/graphics/gtk/FontDataGtk.cpp: Renamed to
476         SimpleFontDataGtk.cpp.
477         * platform/graphics/gtk/FontGtk.cpp:
478         (WebCore::Font::drawGlyphs):
479         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
480         (WebCore::GlyphPage::fill):
481         * platform/graphics/gtk/SimpleFontDataGtk.cpp: Copied from WebCore/platform/graphics/gtk/FontDataGtk.cpp.
482         (WebCore::SimpleFontData::platformInit):
483         (WebCore::SimpleFontData::platformDestroy):
484         (WebCore::SimpleFontData::smallCapsFontData):
485         (WebCore::SimpleFontData::containsCharacters):
486         (WebCore::SimpleFontData::determinePitch):
487         (WebCore::SimpleFontData::platformWidthForGlyph):
488         (WebCore::SimpleFontData::setFont):
489         * platform/graphics/mac/FontCacheMac.mm:
490         (WebCore::FontCache::getFontDataForCharacters):
491         * platform/graphics/mac/FontDataMac.mm: Renamed to SimpleFontDataMac.mm.
492         * platform/graphics/mac/FontMac.mm:
493         (WebCore::initializeATSUStyle):
494         (WebCore::overrideLayoutOperation):
495         (WebCore::ATSULayoutParameters::initialize):
496         (WebCore::Font::drawGlyphs):
497         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
498         (WebCore::GlyphPage::fill):
499         * platform/graphics/mac/SimpleFontDataMac.mm: Copied from WebCore/platform/graphics/mac/FontDataMac.mm.
500         (WebCore::initFontData):
501         (WebCore::SimpleFontData::platformInit):
502         (WebCore::SimpleFontData::platformDestroy):
503         (WebCore::SimpleFontData::smallCapsFontData):
504         (WebCore::SimpleFontData::containsCharacters):
505         (WebCore::SimpleFontData::determinePitch):
506         (WebCore::SimpleFontData::platformWidthForGlyph):
507         (WebCore::SimpleFontData::checkShapesArabic):
508         * platform/graphics/qt/FontDataQt.cpp: Renamed to SimpleFontDataQt.cpp.
509         * platform/graphics/qt/GlyphPageTreeNodeQt.cpp:
510         (WebCore::GlyphPageTreeNode::pruneTreeCustomFontData):
511         * platform/graphics/qt/SimpleFontDataQt.cpp: Copied from WebCore/platform/graphics/qt/FontDataQt.cpp.
512         * platform/graphics/win/FontCacheWin.cpp:
513         (WebCore::FontCache::getFontDataForCharacters):
514         * platform/graphics/win/FontDataWin.cpp: Renamed to
515         SimpleFontDataWin.cpp.
516         * platform/graphics/win/FontWin.cpp:
517         (WebCore::Font::drawGlyphs):
518         * platform/graphics/win/GlyphPageTreeNodeWin.cpp:
519         (WebCore::GlyphPage::fill):
520         * platform/graphics/win/SimpleFontDataWin.cpp: Copied from WebCore/platform/graphics/win/FontDataWin.cpp.
521         (WebCore::SimpleFontData::setShouldApplyMacAscentHack):
522         (WebCore::SimpleFontData::platformInit):
523         (WebCore::SimpleFontData::platformDestroy):
524         (WebCore::SimpleFontData::smallCapsFontData):
525         (WebCore::SimpleFontData::containsCharacters):
526         (WebCore::SimpleFontData::determinePitch):
527         (WebCore::SimpleFontData::platformWidthForGlyph):
528         (WebCore::SimpleFontData::scriptFontProperties):
529         * platform/graphics/wx/FontCacheWx.cpp:
530         (WebCore::FontCache::getFontDataForCharacters):
531         * platform/graphics/wx/FontDataWx.cpp: Renamed to SimpleFontDataWx.cpp.
532         * platform/graphics/wx/FontWx.cpp:
533         (WebCore::Font::drawGlyphs):
534         * platform/graphics/wx/GlyphMapWx.cpp:
535         (WebCore::GlyphPage::fill):
536         * platform/graphics/wx/SimpleFontDataWx.cpp: Copied from WebCore/platform/graphics/wx/FontDataWx.cpp.
537         (WebCore::SimpleFontData::platformInit):
538         (WebCore::SimpleFontData::platformDestroy):
539         (WebCore::SimpleFontData::smallCapsFontData):
540         (WebCore::SimpleFontData::containsCharacters):
541         (WebCore::SimpleFontData::determinePitch):
542         (WebCore::SimpleFontData::platformWidthForGlyph):
543         * platform/mac/FileChooserMac.mm:
544         * platform/mac/PopupMenuMac.mm:
545         * platform/mac/WebCoreTextRenderer.mm:
546         * platform/win/PopupMenuWin.cpp:
547         * platform/win/UniscribeController.cpp:
548         (WebCore::UniscribeController::advance):
549         (WebCore::UniscribeController::itemizeShapeAndPlace):
550         (WebCore::UniscribeController::shapeAndPlaceItem):
551         (WebCore::UniscribeController::shape):
552         * platform/win/UniscribeController.h:
553         * svg/SVGFont.cpp:
554         (WebCore::Font::drawGlyphsWithSVGFont):
555         * svg/SVGFontElement.cpp:
556         (WebCore::SVGFontElement::collectGlyphs):
557         * svg/SVGFontFaceElement.cpp:
558         (WebCore::SVGFontFaceElement::createFontData):
559         * svg/SVGFontFaceElement.h:
560         * svg/SVGGlyphElement.cpp:
561
562 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
563
564         Not reviewed. Try to fix mac build by forcing SVGNames regeneration.
565
566         * svg/svgtags.in:
567
568 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
569
570         Not reviewed. Proposed build fix for wx.
571
572         * webcore-base.bkl:
573
574 2008-01-07  Dan Bernstein  <mitz@apple.com>
575
576         64-bit build fix
577
578         * platform/graphics/mac/FontCustomPlatformData.cpp:
579         (WebCore::FontCustomPlatformData::fontPlatformData): Have to use a
580         cast here since FMGetFontFromATSFontRef() is not available on 64-bit.
581
582 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
583
584         Reviewed by Oliver. Parts reviewed by Eric, David Hyatt & Dan & Alexey.
585         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15741 (REGRESSION: svg/W3C-SVG-1.1/fonts-elem-03-b.svg shows worse behavior on TOT)
586
587         Display SVG Fonts, fill svg/SVGFont.cpp with life by adding all needed code to
588         measure & render glyphs contained in SVG Fonts, including ligature lookup support.
589
590         Implement floatWidth/selectionRectForText for SVG Fonts, fixing text selection.
591
592         Support horiz-origin-x/y, horiz-adv-x, vert-adv-y, vert-origin-x/y & arabic-form.
593         Implement simple algorithm to determine the arabic forms for a string (initial, isolated, medial, terminal).
594
595         Removed drawGlyphsWithSVGFont - create a new function drawTextWithSVGFont instead.
596         This doesn't involve creating/using a 'GlyphBuffer' object anymore, which is not
597         required for SVG Fonts anyway (we already know all our offsets/advances/etc..)
598
599         Don't call it from drawSimpleText anymore, but directly in drawText - as Dan suggested.
600
601         <glyph> elements now register themselves in the SVGFontElement's glyph cache.
602         (insertedIntoDocument / removedFromDocument take care of this)
603
604         The cache is built once now, and is kept updated - it's not rebuild anymore
605         on painting (!) - which was a crude hack for testing.
606
607         W3C testcase which include SVG Fonts:
608         svg/W3C-SVG-1.1/animate-elem-03-t.svg (Fixed, of course not the anim itself, but it's SVG Fonts usage)
609         svg/W3C-SVG-1.1/animate-elem-24-t.svg (Ditto)
610         svg/W3C-SVG-1.1/animate-elem-36-t.svg (Ditto)
611         svg/W3C-SVG-1.1/animate-elem-40-t.svg (Ditto)
612         svg/W3C-SVG-1.1/fonts-kern-01-t.svg (missing <vkern>/<hkern> support)
613         svg/W3C-SVG-1.1/fonts-desc-02-t.svg (Fixed, tests CSS font matching based on font-variant attribute)
614         svg/W3C-SVG-1.1/fonts-elem-01-t.svg (Fixed, basic SVG font test)
615         svg/W3C-SVG-1.1/fonts-elem-02-t.svg (Fixed, accuracy test for embedded SVG font)
616         svg/W3C-SVG-1.1/fonts-elem-05-t.svg (Fixed, checks horiz-origin-x support, note: W3C reference image is wrong)
617         svg/W3C-SVG-1.1/fonts-elem-06-t.svg (Fixed, checks horiz-adv-x support)
618         svg/W3C-SVG-1.1/fonts-glyph-02-t.svg (Fixed, checks arabic-form support)
619         svg/W3C-SVG-1.1/fonts-glyph-03-t.svg (Fixed, checks glyph matching based on xml:lang)
620         svg/W3C-SVG-1.1/masking-mask-01-b.svg (Fixed, SVG Fonts & masking)
621         svg/W3C-SVG-1.1/pservers-grad-08-b.svg (Fixed, SVG Fonts & gradient on fill/stroke)
622         svg/W3C-SVG-1.1/render-elems-06-t.svg (Fixed, simple 'fill' property test)
623         svg/W3C-SVG-1.1/render-elems-07-t.svg (Fixed, simple 'stroke' property test - shows SVG Font interprets stroke-width in glyph coordinate system, as demanded by spec)
624         svg/W3C-SVG-1.1/render-elems-08-t.svg (Fixed, simple 'fill' & 'stroke' property test)
625         svg/W3C-SVG-1.1/render-groups-01-b.svg (missing <vkern>/<hkern> support)
626         svg/W3C-SVG-1.1/render-groups-03-t.svg (Ditto)
627         svg/W3C-SVG-1.1/text-altglyph-01-b.svg (no <altGlyph> support yet)
628         svg/W3C-SVG-1.1/text-text-04-t.svg (Fixed, absolute placing of characters pixel perfect now)
629         svg/W3C-SVG-1.1/text-text-05-t.svg (FIXME: problem with text-anchor)
630         svg/W3C-SVG-1.1/text-text-06-t.svg (highlights problem with ligatures & absolute positioned characters)
631
632         Questionable testcases:
633         svg/W3C-SVG-1.1/fonts-glyph-04-t.svg (tests that glyph selection is done in the order in the definition of the font element.)
634         I am not sure why this behaviour is desired, no comment given in spec - doesn't make much sense to me, ignoring it for now.
635
636         Several other batik testcases fixed, which use SVG Fonts in combination with gradients & filters.
637
638         * css/CSSFontSelector.cpp:
639         (WebCore::CSSFontSelector::addFontFaceRule):
640         (WebCore::CSSFontSelector::getFontData):
641         * platform/graphics/Font.cpp:
642         (WebCore::Font::lineSpacing):
643         (WebCore::Font::xHeight):
644         (WebCore::Font::canUseGlyphCache):
645         (WebCore::Font::drawGlyphBuffer):
646         (WebCore::Font::drawText):
647         (WebCore::Font::floatWidth):
648         (WebCore::Font::selectionRectForText):
649         * platform/graphics/Font.h:
650         (WebCore::TextRun::TextRun):
651         (WebCore::TextRun::activePaintServer):
652         (WebCore::TextRun::setActivePaintServer):
653         * platform/graphics/FontData.cpp:
654         (WebCore::FontData::lineSpacing):
655         (WebCore::FontData::lineGap):
656         (WebCore::FontData::xHeight):
657         * platform/graphics/FontData.h:
658         * platform/graphics/win/FontWin.cpp:
659         (WebCore::Font::drawGlyphs):
660         * rendering/RenderSVGText.cpp:
661         (WebCore::RenderSVGText::relativeBBox):
662         * rendering/SVGInlineTextBox.cpp:
663         (WebCore::SVGInlineTextBox::paintCharacters):
664         * rendering/SVGInlineTextBox.h:
665         * rendering/SVGRootInlineBox.cpp:
666         (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
667         * svg/SVGFont.cpp:
668         (WebCore::):
669         (WebCore::processArabicFormDetection):
670         (WebCore::charactersWithArabicForm):
671         (WebCore::isCompatibleArabicForm):
672         (WebCore::isCompatibleGlyph):
673         (WebCore::svgFontAndFontFaceElementForFontData):
674         (WebCore::SVGTextRunWalker::SVGTextRunWalker):
675         (WebCore::SVGTextRunWalker::walk):
676         (WebCore::floatWidthUsingSVGFontCallback):
677         (WebCore::floatWidthMissingGlyphCallback):
678         (WebCore::floatWidthOfSubStringUsingSVGFont):
679         (WebCore::Font::floatWidthUsingSVGFont):
680         (WebCore::drawTextUsingSVGFontCallback):
681         (WebCore::drawTextMissingGlyphCallback):
682         (WebCore::Font::drawTextUsingSVGFont):
683         (WebCore::Font::selectionRectForTextUsingSVGFont):
684         * svg/SVGFontElement.cpp:
685         (WebCore::SVGFontElement::SVGFontElement):
686         (WebCore::SVGFontElement::addGlyphToCache):
687         (WebCore::SVGFontElement::removeGlyphFromCache):
688         (WebCore::SVGFontElement::firstMissingGlyphElement):
689         (WebCore::SVGFontElement::glyphIdentifiersForString):
690         * svg/SVGFontElement.h:
691         (WebCore::SVGFontElement::maximumHashKeyLength):
692         * svg/SVGFontFaceElement.cpp:
693         (WebCore::SVGFontFaceElement::createFontData):
694         (WebCore::SVGFontFaceElement::rebuildFontFace):
695         (WebCore::SVGFontFaceElement::associatedFontElement):
696         * svg/SVGFontFaceElement.h:
697         * svg/SVGGlyphElement.cpp:
698         (WebCore::SVGGlyphElement::insertedIntoDocument):
699         (WebCore::SVGGlyphElement::removedFromDocument):
700         (WebCore::parseArabicForm):
701         (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes):
702         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
703         * svg/SVGGlyphElement.h:
704         (WebCore::SVGGlyphIdentifier::):
705         (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
706         (WebCore::SVGGlyphIdentifier::inheritedValue):
707         (WebCore::SVGGlyphIdentifier::operator==):
708         (WebCore::SVGGlyphElement::~SVGGlyphElement):
709
710 2008-01-07  David Hyatt  <hyatt@apple.com>
711
712         Fix for bug 13095, CSS3 multiple backgrounds don't work on table cells.
713
714         Reviewed by Dan
715
716         * rendering/RenderBox.h:
717         * rendering/RenderTableCell.cpp:
718         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
719
720 2008-01-07  Holger Freyther  <zecke@selfish.org>
721
722         Reviewed by Alp Toker.
723
724         * Fix indention
725
726         * platform/gtk/ContextMenuGtk.cpp:
727         (WebCore::ContextMenu::~ContextMenu):
728
729 2008-01-07  Holger Freyther  <zecke@selfish.org>
730
731         Reviewed by Alp Toker.
732
733         * The ContextMenuController is going to live longer than the ContextMenu. It is
734         going to live as long as the WebCore::Page is around where the ContextMenu, specially
735         in the case of a SubMenu, is gone before we popup the menu.
736
737         * platform/gtk/ContextMenuGtk.cpp:
738         (WebCore::menuItemActivated):
739         (WebCore::ContextMenu::appendItem):
740
741 2008-01-07  Holger Freyther  <zecke@selfish.org>
742
743         Reviewed by Alp Toker.
744
745         * Fix SubMenu handling
746         * Do not connect to the activated signal if we are a separator or submenu
747         * Change our type from ActionType to SubMenuType when we have a submenu
748         * Initialize the SubMenu
749
750         * platform/gtk/ContextMenuGtk.cpp:
751         (WebCore::ContextMenu::appendItem):
752         * platform/gtk/ContextMenuItemGtk.cpp:
753         (WebCore::ContextMenuItem::ContextMenuItem):
754         (WebCore::ContextMenuItem::createNativeMenuItem):
755         (WebCore::ContextMenuItem::setSubMenu):
756
757 2008-01-07  Holger Freyther  <zecke@selfish.org>
758
759         Reviewed by Alp Toker.
760
761         * Qt and Gtk must know if a ContextMenuItem is checkable. Add a new ContextMenuItemType for checkable
762         actions.
763         * Use this information in the Gtk platform to create a GtkCheckMenuItem when needed.
764         * Update the ContextMenuController to accept CheckableActionTypes as well.
765         * Change ContextMenu.cpp to use the CheckableActionType. The information if a item is checkable
766         was extracted from ContextMenu::checkOrEnableIfNeeded.
767         * Update the Qt and Windows port.
768
769
770         * page/ContextMenuController.cpp:
771         * platform/ContextMenu.cpp:
772         (WebCore::createAndAppendFontSubMenu):
773         (WebCore::createAndAppendSpellingAndGrammarSubMenu):
774         (WebCore::createAndAppendSpellingSubMenu):
775         (WebCore::createAndAppendWritingDirectionSubMenu):
776         * platform/ContextMenuItem.h:
777         * platform/gtk/ContextMenuItemGtk.cpp:
778         (WebCore::ContextMenuItem::ContextMenuItem):
779         (WebCore::ContextMenuItem::createNativeMenuItem):
780
781 2008-01-07  Luca Bruno  <lethalman88@gmail.com>
782
783         Reviewed by Alp Toker.
784
785         http://bugs.webkit.org/show_bug.cgi?id=16745
786         [GTK] Context menu doesn't feel or look native - no icons
787
788         Use GTK+ stock icons for menu items where possible.
789
790         * platform/gtk/ContextMenuItemGtk.cpp:
791         (WebCore::gtkStockIDFromContextMenuAction):
792         (WebCore::ContextMenuItem::createNativeMenuItem):
793         (WebCore::ContextMenuItem::setAction):
794
795 2008-01-07  Dan Bernstein  <mitz@apple.com>
796
797         Reviewed by John Sullivan.
798
799         - make the ATSUI code path work with custom fonts rather than crash
800
801         * platform/graphics/mac/FontCustomPlatformData.cpp:
802         (WebCore::FontCustomPlatformData::fontPlatformData):
803         * platform/graphics/mac/FontMac.mm:
804         (WebCore::initializeATSUStyle):
805
806 2008-01-07  Thiago Macieira  <thiago.macieira@trolltech.com>
807
808         Reviewed by Simon.
809
810         abort() now emits the signals, so disconnect them before you abort()
811
812         * platform/network/qt/QNetworkReplyHandler.cpp:
813         (WebCore::QNetworkReplyHandler::abort):
814
815 2008-01-07  Simon Hausmann  <hausmann@webkit.org>
816
817         Reviewed by Lars.
818
819         Use a faster and safer way of flattening the form data.
820
821         * platform/network/qt/QNetworkReplyHandler.cpp:
822         (WebCore::QNetworkReplyHandler::start):
823
824 2008-01-07  Simon Hausmann  <hausmann@webkit.org>
825
826         Reviewed by Lars.
827
828         Ported of the network backend of the Qt platform to Qt 4.4's new networking API.
829
830         * WebCore.pro:
831         * platform/network/ResourceHandleInternal.h:
832         * platform/network/qt/QNetworkReplyHandler.cpp: Added.
833         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
834         (WebCore::QNetworkReplyHandler::abort):
835         (WebCore::QNetworkReplyHandler::finish):
836         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
837         (WebCore::QNetworkReplyHandler::forwardData):
838         (WebCore::QNetworkReplyHandler::start):
839         * platform/network/qt/QNetworkReplyHandler.h: Added.
840         (WebCore::QNetworkReplyHandler::reply):
841         * platform/network/qt/ResourceHandleQt.cpp:
842         (WebCore::ResourceHandle::start):
843         (WebCore::ResourceHandle::cancel):
844         (WebCore::ResourceHandle::loadResourceSynchronously):
845         * platform/network/qt/ResourceRequest.h:
846         (WebCore::ResourceRequest::ResourceRequest):
847         * platform/network/qt/ResourceRequestQt.cpp: Added.
848         (WebCore::ResourceRequest::toNetworkRequest):
849         * platform/qt/MIMETypeRegistryQt.cpp:
850         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
851         * platform/qt/PlugInInfoStoreQt.cpp:
852         (WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):
853         (WebCore::PlugInInfoStore::pluginCount):
854         (WebCore::PlugInInfoStore::pluginNameForMIMEType):
855
856 2008-01-07  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
857
858         Reviewed by Lars.
859
860         * Remove m_dirtyRegion as it is not used as we pass every dirty region
861         directly to the ChromeClient
862
863         * platform/qt/ScrollViewQt.cpp:
864         (WebCore::ScrollView::paint):
865
866 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
867
868         Reviewed by Oliver.
869
870         Small CG paint server cleanups - use more GraphicsContext method where possible.
871
872         * svg/graphics/cg/CgSupport.cpp:
873         (WebCore::applyStrokeStyleToContext):
874         (WebCore::strokeBoundingBox):
875         * svg/graphics/cg/CgSupport.h:
876         * svg/graphics/cg/RenderPathCg.cpp:
877         (WebCore::RenderPath::strokeContains):
878         * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
879         (WebCore::SVGPaintServerGradient::setup):
880         * svg/graphics/cg/SVGPaintServerPatternCg.cpp:
881         (WebCore::SVGPaintServerPattern::setup):
882         * svg/graphics/cg/SVGPaintServerSolidCg.cpp:
883         (WebCore::SVGPaintServerSolid::setup):
884
885 2008-01-06  Nikolas Zimmermann  <zimmermann@kde.org>
886
887         Reviewed by Dan.
888
889         Use new helper function isArabicChar() - which also calls ublock_getCode() == UBLOCK_ARABIC on mac.
890
891         * platform/graphics/mac/FontMac.mm:
892         (WebCore::ATSULayoutParameters::initialize):
893
894 2008-01-06  Andrew Wellington  <proton@wiretapped.net>
895
896         Reviewed by Darin.
897         
898         DOMRange doesn't correctly re-size when inserting items (Acid3)
899         http://bugs.webkit.org/show_bug.cgi?id=16764
900         
901         Update the offset for the range when inserting items into the range.
902
903         Test: fast/dom/Range/range-modifycontents.html
904
905         * dom/Range.cpp:
906         (WebCore::Range::insertNode):
907
908 2008-01-06  Alexey Proskuryakov  <ap@webkit.org>
909
910         Reviewed by Darin.
911
912         http://bugs.webkit.org/show_bug.cgi?id=16731
913         Incorrect node type for whitespace when setting innerHTML in an XHTML document
914
915         Test: fast/dom/xhtml-fragment-whitespace.xhtml
916
917         * dom/XMLTokenizer.cpp: (WebCore::parseXMLDocumentFragment):
918         Use balancedCharactersHandler for ignorable whitespace.
919
920 2008-01-06  Alexey Proskuryakov  <ap@webkit.org>
921
922         Reviewed by Darin.
923
924         http://bugs.webkit.org/show_bug.cgi?id=16701
925         <rdar://problem/5666580> REGRESSION: URL-encoded space (%20) in livejournal url
926         causes page load error
927
928         Test: http/tests/misc/location-with-space.php
929
930         * platform/network/cf/ResourceRequestCFNet.cpp:
931         (WebCore::ResourceRequest::doUpdatePlatformRequest): Do update its URL, too.
932
933 2008-01-06  Andrew Wellington  <proton@wiretapped.net>
934
935         Reviewed by Darin.
936         
937         DOMRange.cloneContents does not work (Acid3 bug)
938         http://bugs.webkit.org/show_bug.cgi?id=16748
939         
940         When cloning an empty range, return an empty DocmentFragment instead of
941         null or undefined.
942
943         Test: fast/dom/Range/range-clone-empty.html
944
945         * dom/Range.cpp:
946         (WebCore::Range::processContents):
947
948 2008-01-06  Luca Bruno  <lethalman88@gmail.com>
949
950         Reviewed by Alp Toker.
951
952         Remove curl handles immediately if the timer is not running.
953
954         * platform/network/curl/ResourceHandleManager.cpp:
955         (WebCore::ResourceHandleManager::cancel):
956
957 2008-01-06  Alp Toker  <alp@atoker.com>
958
959         Reviewed by Eric.
960
961         Cairo canvas refcounting fix. Reference the surface in the constructor
962         to match its destruction in the destructor.
963
964         Fixes a crash triggered by leaving this page:
965           http://philip.html5.org/tests/canvas/misc/globalalpha-pattern.html
966
967         * html/CanvasPattern.cpp:
968         (WebCore::CanvasPattern::CanvasPattern):
969
970 2008-01-06  Eric Seidel  <eric@webkit.org>
971
972         Reviewed by darin.
973
974         Make attr selectors case-insensitive for certain HTML attributes
975         http://bugs.webkit.org/show_bug.cgi?id=15470
976
977         Test: fast/css/html-attr-case-sensitivity.html
978
979         * css/CSSStyleSelector.cpp:
980         (WebCore::addLocalNameToSet):
981         (WebCore::createHtmlCaseInsensitiveAttributesSet):
982         (WebCore::htmlAttributeHasCaseInsensitiveValue):
983         (WebCore::CSSStyleSelector::checkOneSelector):
984
985 2008-01-06  Eric Seidel  <eric@webkit.org>
986
987         Reviewed by Sam.
988
989         Fix :checked matching type='text' and add test case
990         http://bugs.webkit.org/show_bug.cgi?id=16750
991
992         Test: fast/dom/HTMLInputElement/checked-pseudo-selector.html
993
994         * html/HTMLInputElement.h: isChecked() can only be true for RADIO or CHECKBOX
995
996 2008-01-05  Sam Weinig  <sam@webkit.org>
997
998         Reviewed by Eric Seidel.
999
1000         Patch for http://bugs.webkit.org/show_bug.cgi?id=16758
1001         ASSERT when using TreeWalker methods for a current node outside of the root (Acid3)
1002
1003         - Ensure that returned nodes are within the root node, or return 0, in adherence with the spec.
1004
1005         Test: fast/dom/TreeWalker/TreeWalker-currentNode.html
1006
1007         * dom/TreeWalker.cpp:
1008         (WebCore::TreeWalker::parentNode):
1009         (WebCore::TreeWalker::firstChild):
1010         (WebCore::TreeWalker::lastChild):
1011         (WebCore::TreeWalker::previousSibling):
1012         (WebCore::TreeWalker::nextSibling):
1013         (WebCore::TreeWalker::previousNode):
1014         (WebCore::TreeWalker::nextNode):
1015
1016 2008-01-04  Oliver Hunt  <oliver@apple.com>
1017
1018         Reviewed by Beth Dakin.
1019
1020         Fix bounds computation bugs responsible for http://bugs.webkit.org/show_bug.cgi?id=16015
1021         and other image repaint bugs.
1022
1023         We now cache the full local bounds for the <image> element, as otherwise certain
1024         combinations of attribute changes could result in incorrect dirty rects.
1025         Additionally we no longer use any of the integer bounds fields on RenderObject for
1026         determining repaint bounds (this was the principle cause of bug #16015).
1027
1028         I also removed the outline painting code as it was both wrong, and not correctly
1029         repainted.  I feel safe doing this as no other browser or viewer supports outline
1030         properties on svg elements.
1031
1032         I was unable to make a testcase for this unfortunately, despite seemingly deterministic 
1033         behaviour :(
1034
1035         * rendering/RenderSVGImage.cpp:
1036         (WebCore::RenderSVGImage::layout):
1037         (WebCore::RenderSVGImage::paint):
1038         (WebCore::RenderSVGImage::nodeAtPoint):
1039         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
1040         * rendering/RenderSVGImage.h:
1041
1042 2008-01-04  Beth Dakin  <bdakin@apple.com>
1043
1044         Reviewed by Oliver.
1045
1046         Fix for http://bugs.webkit.org/show_bug.cgi?id=16704 input with 
1047         type="hidden" matches :enabled/:disabled (Acid3 bug)
1048
1049         Prevent :enabled and :disabled from applying to input type="hidden" 
1050
1051         * css/CSSStyleSelector.cpp:
1052         (WebCore::CSSStyleSelector::checkOneSelector): Rather than 
1053         allowing :enabled and :disabled to apply to all controls, only 
1054         allow it to apply to non-"hidden" controls
1055         * dom/Element.h:
1056         (WebCore::Element::isInputTypeHidden): 
1057         * html/HTMLInputElement.h:
1058         (WebCore::HTMLInputElement::isInputTypeHidden):
1059
1060 2008-01-04  Sam Weinig  <sam@webkit.org>
1061
1062         Reviewed by Oliver Hunt.
1063
1064         - Match the spec when calling getFloatValue, getStringValue, getCounterValue,
1065           getRectValue and getRGBColorValue of CSSPrimitiveValue by throwing exceptions
1066           if the type of the CSSPrimitiveValue is not the same as the type requested.
1067         - Fix the intermittent assertion failure seen in svg/css/glyph-orientation-rounding-test.xhtml
1068
1069         Test: fast/css/CSSPrimitiveValue-exceptions.html
1070
1071         * css/CSSPrimitiveValue.cpp:
1072         (WebCore::CSSPrimitiveValue::getDoubleValue):
1073         (WebCore::CSSPrimitiveValue::getStringValue):
1074         (WebCore::CSSPrimitiveValue::getCounterValue):
1075         (WebCore::CSSPrimitiveValue::getRectValue):
1076         (WebCore::CSSPrimitiveValue::getRGBColorValue):
1077         (WebCore::CSSPrimitiveValue::getPairValue):
1078         * css/CSSPrimitiveValue.h:
1079         (WebCore::CSSPrimitiveValue::getFloatValue):
1080         (WebCore::CSSPrimitiveValue::getIntValue):
1081         (WebCore::CSSPrimitiveValue::getCounterValue):
1082         (WebCore::CSSPrimitiveValue::getRectValue):
1083         (WebCore::CSSPrimitiveValue::getDashboardRegionValue):
1084         * css/CSSPrimitiveValue.idl:
1085
1086 2008-01-04  Antti Koivisto  <antti@apple.com>
1087
1088         Reviewed by Darin.
1089         
1090         Windows part of <rdar://problem/5647034>
1091         Media tests crash if an old version of QuickTime is installed
1092
1093         Check QuickTime version on Windows too.
1094
1095         * platform/graphics/MediaPlayer.cpp:
1096         (WebCore::MediaPlayer::isAvailable):
1097         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
1098         (WebCore::MediaPlayerPrivate::isAvailable):
1099         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
1100         (WebCore::MediaPlayerPrivate::isAvailable):
1101         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
1102         * platform/graphics/win/QTMovieWin.cpp:
1103         (QTMovieWin::initializeQuickTime):
1104
1105 2008-01-04  Darin Adler  <darin@apple.com>
1106
1107         Reviewed by Maciej and Alice.
1108
1109         - fix <rdar://problem/4404302> Borders where there should be none (canadasmountains.com)
1110
1111         Test: fast/images/border.html
1112
1113         * html/HTMLImageElement.cpp:
1114         (WebCore::HTMLImageElement::parseMappedAttribute): Change the code that handles cases
1115         where the border value is not a number to use the value "0" for the border width instead
1116         of not setting the border width and style at all. This matches other browsers, and makes
1117         more sense.
1118
1119 2008-01-04  Antti Koivisto  <antti@apple.com>
1120
1121         Try to fix 64-bit build
1122
1123         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1124         (WebCore::MediaPlayerPrivate::isAvailable):
1125
1126 2008-01-04  Stephanie  <slewis@apple.com>
1127
1128         Reviewed by Oliver.
1129
1130         WARNING: NO TEST CASES ADDED OR CHANGED
1131
1132         Fix another stringImpl leak.
1133
1134         * platform/text/StringImpl.cpp: remove an extra allocation
1135         (WebCore::StringImpl::StringImpl):
1136
1137 2008-01-04  Alice Liu  <alice.liu@apple.com>
1138
1139         Reviewed by Mitz.
1140
1141         * platform/graphics/win/FontCacheWin.cpp:
1142         fix loop condition that was causing crash
1143
1144 2008-01-04  Timothy Hatcher  <timothy@apple.com>
1145
1146         Reviewed by Adam Roben.
1147
1148         <rdar://problem/5671059> Always show the Timeline and Console buttons in the Inspector
1149
1150         * page/inspector/inspector.css: Remove styles related to the toggle button
1151           and make the area always visible. 
1152         * page/inspector/inspector.html: Remove the toggle button.
1153         * page/inspector/inspector.js: Remove code to toggle the status area.
1154
1155 2008-01-04  Alexey Proskuryakov  <ap@webkit.org>
1156
1157         Reviewed by Adam Roben.
1158
1159         Temporarily restore BackwardDelete for Windows nightlies to work correctly.
1160
1161         * editing/EditorCommand.cpp: (WebCore::CommandEntry::):
1162
1163 2008-01-04  Alexey Proskuryakov  <ap@webkit.org>
1164
1165         Reviewed by Darin.
1166
1167         <rdar://problem/5611712> xsl:sort does not use a case folding sort, and the 'case-order' attribute is ignored (16077)
1168
1169         Enable the fix on Windows.
1170
1171         * xml/XSLTProcessor.cpp: (WebCore::XSLTProcessor::transformToString):
1172         Always set a custom sort function, even if it doesn't implement proper collation on the platform.
1173
1174         * xml/XSLTUnicodeSort.cpp:
1175         (WebCore::xsltUnicodeSortFunction):
1176         * xml/XSLTUnicodeSort.h:
1177         If the platform does not use ICU, or ICU has collation support disabled, fall back to binary comparison.
1178
1179 2008-01-04  Antti Koivisto  <antti@apple.com>
1180
1181         Fix build.
1182
1183         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1184
1185 2008-01-04  Antti Koivisto  <antti@apple.com>
1186
1187         Reviewed by Darin.
1188         
1189         Partial fix for <rdar://problem/5647034>
1190         Media tests crash if an old version of QuickTime is installed
1191
1192         Disable media support if QuickTime is not current enough (>=7.3).
1193         
1194         Windows patch coming soon.
1195
1196         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1197         (WebCore::createJSHTMLWrapper):
1198         * bindings/js/kjs_window.cpp:
1199         (KJS::Window::getValueProperty):
1200         * html/HTMLElementFactory.cpp:
1201         (WebCore::audioConstructor):
1202         (WebCore::videoConstructor):
1203         (WebCore::sourceConstructor):
1204         * platform/graphics/MediaPlayer.cpp:
1205         (WebCore::MediaPlayer::isAvailable):
1206         * platform/graphics/MediaPlayer.h:
1207         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1208         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1209         (WebCore::MediaPlayerPrivate::isAvailable):
1210
1211 2008-01-04  Timothy Hatcher  <timothy@apple.com>
1212
1213         Reviewed by Darin Adler.
1214
1215         <rdar://problem/5604409> JavaScript privilege escalation when Web Inspector accesses page unsafely (16011)
1216
1217         Check if the property is a getter before asking for the value.
1218         If the property is a getter, we no longer show the value.
1219
1220         * page/inspector/PropertiesSidebarPane.js:
1221         * page/inspector/inspector.css:
1222
1223 2008-01-04  Dan Bernstein  <mitz@apple.com>
1224
1225         Reviewed by Darin Adler.
1226
1227         - fix synthetic bold and italic on Windows
1228
1229         Covered by an existing test.
1230
1231         * platform/graphics/win/FontPlatformDataWin.cpp:
1232         (WebCore::FontPlatformData::FontPlatformData):
1233
1234 2008-01-04  Alp Toker  <alp@atoker.com>
1235
1236         GTK+ autotools build fix. Terminate empty rules.
1237
1238         * GNUmakefile.am:
1239
1240 2008-01-04  Lars Knoll  <lars@trolltech.com>
1241
1242         Reviewed by Simon.
1243
1244         Remove most dependencies of Widget/ScrollView onto native QWidgets.
1245
1246         This also brings the code closer in line with the Windows code. Seems
1247         to work nicely on first try :)
1248
1249         * page/qt/FrameQt.cpp:
1250         (WebCore::Frame::createScriptInstanceForWidget):
1251         * platform/Widget.h:
1252         * platform/qt/PlatformScreenQt.cpp:
1253         (WebCore::screenDepth):
1254         (WebCore::screenDepthPerComponent):
1255         (WebCore::screenIsMonochrome):
1256         (WebCore::screenRect):
1257         * platform/qt/PlatformScrollBarQt.cpp:
1258         (WebCore::PlatformScrollbar::thumbPosition):
1259         (WebCore::PlatformScrollbar::handleMouseMoveEvent):
1260         * platform/qt/ScrollViewQt.cpp:
1261         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
1262         (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
1263         (WebCore::ScrollView::updateContents):
1264         (WebCore::ScrollView::update):
1265         (WebCore::ScrollView::scrollRectIntoViewRecursively):
1266         (WebCore::ScrollView::updateScrollbars):
1267         (WebCore::ScrollView::addChild):
1268         (WebCore::ScrollView::removeChild):
1269         (WebCore::ScrollView::paint):
1270         * platform/qt/WidgetQt.cpp:
1271         (WebCore::WidgetPrivate::WidgetPrivate):
1272         (WebCore::WidgetPrivate::~WidgetPrivate):
1273         (WebCore::Widget::frameGeometry):
1274         (WebCore::Widget::setFrameGeometry):
1275         (WebCore::Widget::setCursor):
1276         (WebCore::Widget::show):
1277         (WebCore::Widget::hide):
1278         (WebCore::Widget::nativeWidget):
1279         (WebCore::Widget::setNativeWidget):
1280         (WebCore::Widget::suppressInvalidation):
1281         (WebCore::Widget::setSuppressInvalidation):
1282         (WebCore::Widget::invalidateRect):
1283         (WebCore::Widget::topLevel):
1284         (WebCore::Widget::containingWindow):
1285
1286 2008-01-04  Lars Knoll  <lars@trolltech.com>
1287
1288         Reviewed by Simon.
1289
1290         make QWebPage a QObject and get things to compile.
1291
1292         Nothing works currently though.
1293
1294         * platform/qt/ScrollViewQt.cpp:
1295         (WebCore::ScrollView::updateContents):
1296         (WebCore::ScrollView::update):
1297         * platform/qt/WidgetQt.cpp:
1298         (WebCore::Widget::qwidget):
1299         (WebCore::Widget::invalidateRect):
1300
1301 2008-01-04  Alp Toker  <alp@atoker.com>
1302
1303         Reviewed by Mark Rowe.
1304
1305         http://bugs.webkit.org/show_bug.cgi?id=16667
1306         make -j is failing with the autotools based system
1307
1308         Support parallel code generation. Nearly every use of explicit
1309         multiple targets was a potential concurrency bug, though in practice
1310         the bison rules were the first to be noticed because they took longer
1311         to complete and broke the build immediately.
1312
1313         * GNUmakefile.am:
1314
1315 2008-01-04  Alp Toker  <alp@atoker.com>
1316
1317         Reviewed by Mark Rowe.
1318
1319         Re-use a single static dummy surface rather than creating and
1320         destroying a surface for each CairoPath.
1321
1322         * platform/graphics/cairo/CairoPath.h:
1323         (WebCore::CairoPath::CairoPath):
1324
1325 2008-01-04  Mark Rowe  <mrowe@apple.com>
1326
1327         Tiger build fix.
1328
1329         * platform/Threading.h: The OSAtomic functions take non-volatile pointers on Tiger.
1330
1331 2008-01-03  Mark Rowe  <mrowe@apple.com>
1332
1333         Reviewed by Maciej Stachowiak.
1334
1335         Use platform-provided atomic operations in place of inline assembly to
1336         increase portability.
1337
1338         * platform/Threading.h:
1339         (WebCore::atomicIncrement):
1340         (WebCore::atomicDecrement):
1341
1342 2008-01-03  Oliver Hunt  <oliver@apple.com>
1343
1344         Reviewed by Maciej.
1345
1346         Fix <rdar://problem/5668517> REGRESSION: Major under painting issues in SVG (carto.net dock example)
1347
1348         We need to cache the absolute bounds of the <image>,
1349         as there's no reliable way to recompute the old bounding
1350         box one we have started layout.
1351
1352         * rendering/RenderSVGImage.cpp:
1353         (WebCore::RenderSVGImage::layout):
1354         (WebCore::RenderSVGImage::calculateAbsoluteBounds):
1355         * rendering/RenderSVGImage.h:
1356
1357 2008-01-03  Alp Toker  <alp@atoker.com>
1358
1359         Reviewed by Mark Rowe.
1360
1361         Support building in Scratchbox, which has a version of make that fails
1362         on wildcard syntax. Use a vpath to match IDL files instead.
1363
1364         * GNUmakefile.am:
1365
1366 2008-01-03  Jon Honeycutt  <jhoneycutt@apple.com>
1367
1368         Reviewed by Darin.
1369
1370         <rdar://problem/5504775> PDF page will not load first time after Adobe
1371         Reader install, unless browser is relaunched
1372
1373         Refresh and re-search the plugin database if the MIME type is not
1374         registered.
1375
1376         * plugins/win/PluginDatabaseWin.cpp:
1377         (WebCore::PluginDatabaseWin::isMIMETypeRegistered):
1378         * plugins/win/PluginDatabaseWin.h:
1379
1380 2008-01-03  Dan Bernstein  <mitz@apple.com>
1381
1382         Reviewed by Darin Adler.
1383
1384         - fix http://bugs.webkit.org/show_bug.cgi?id=16548
1385           <rdar://problem/5659452> REGRESSION(r28810): Font style and sizes are weird for Japanese text
1386
1387         * platform/graphics/win/FontCacheWin.cpp:
1388         (WebCore::linkedFontEnumProc): Added. This callback is used to fetch
1389         a valid LOGFONT for a given family.
1390         (WebCore::getLinkedFonts): Added. Returns a vector of font families
1391         linked to the given font family by the Windows registry key
1392         HKLM\Software\...\FontLink\SystemLink. The registry values typically
1393         differ based on the installed language version of Windows.
1394         (WebCore::FontCache::getFontDataForCharacters): Changed to not use MLang
1395         font mapping, which is Windows code page based, except for characters in
1396         the range U+2000..U+200F. Instead, this function gets the font Uniscribe
1397         would use for the character. However, that font might not actually
1398         contain the character, in which case GDI font linking would substitute a
1399         different font. Therefore, this function walks the linked font list
1400         until it finds a font that actually contains the character.
1401
1402 2008-01-03  Darin Adler  <darin@apple.com>
1403
1404         Reviewed by Mitz.
1405
1406         - fix http://bugs.webkit.org/show_bug.cgi?id=16723
1407           tables/mozilla/bugs/bug30418.html test failing due to problems updating dynamic border rules
1408
1409         Test: fast/table/border-changes.html
1410
1411         * html/HTMLTableElement.h:
1412         * html/HTMLTableElement.cpp:
1413         (WebCore::HTMLTableElement::parseMappedAttribute): Check the border type before and after
1414         parsing attributes, rather than doing this only for the rules attribute.
1415         (WebCore::HTMLTableElement::cellBorders): Added.
1416         (WebCore::HTMLTableElement::getSharedCellDecl): Changed to use cellBorders to factor out the
1417         rule about what type of borders to use.
1418
1419 2008-01-02  Sam Weinig  <sam@webkit.org>
1420
1421         Reviewed by Darin.
1422
1423         Pass the prototype of WebCore JS objects up the constructor chain
1424         rather than explicitly setting using setPrototype.  This removes many
1425         redundant settings of the prototype on construction.  To avoid a CG 
1426         hazard, the prototype must be constructed before calling the
1427         constructor of the JS object.
1428
1429         - JS objects that inherit from DOMObject, which all bindings objects
1430           (except Window) do, now can't implicitly have a jsNull prototype, but
1431           must explicitly pass it up the construction chain.
1432
1433         * bindings/js/JSCSSRuleCustom.cpp:
1434         (WebCore::toJS):
1435         * bindings/js/JSCSSValueCustom.cpp:
1436         (WebCore::toJS):
1437         * bindings/js/JSDocumentCustom.cpp:
1438         (WebCore::toJS):
1439         * bindings/js/JSEventCustom.cpp:
1440         (WebCore::toJS):
1441         * bindings/js/JSEventTargetNode.cpp:
1442         (WebCore::JSEventTargetNode::JSEventTargetNode):
1443         * bindings/js/JSEventTargetNode.h:
1444         * bindings/js/JSHTMLAllCollection.h:
1445         (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
1446         * bindings/js/JSHTMLAudioElementConstructor.cpp:
1447         (WebCore::JSHTMLAudioElementConstructor::JSHTMLAudioElementConstructor):
1448         * bindings/js/JSHTMLCollectionCustom.cpp:
1449         (WebCore::getNamedItems):
1450         (WebCore::toJS):
1451         * bindings/js/JSHTMLElementWrapperFactory.cpp:
1452         (WebCore::createJSHTMLWrapper):
1453         * bindings/js/JSHTMLFormElementCustom.cpp:
1454         (WebCore::JSHTMLFormElement::nameGetter):
1455         * bindings/js/JSHTMLInputElementBase.cpp:
1456         (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
1457         * bindings/js/JSHTMLInputElementBase.h:
1458         * bindings/js/JSHTMLOptionElementConstructor.cpp:
1459         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
1460         * bindings/js/JSLocation.cpp:
1461         (WebCore::JSLocation::JSLocation):
1462         * bindings/js/JSLocation.h:
1463         * bindings/js/JSNamedNodesCollection.cpp:
1464         (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
1465         * bindings/js/JSNamedNodesCollection.h:
1466         * bindings/js/JSNodeCustom.cpp:
1467         (WebCore::toJS):
1468         * bindings/js/JSSVGElementWrapperFactory.cpp:
1469         (WebCore::createJSSVGWrapper):
1470         * bindings/js/JSSVGPathSegCustom.cpp:
1471         (WebCore::toJS):
1472         * bindings/js/JSStyleSheetCustom.cpp:
1473         (WebCore::toJS):
1474         * bindings/js/JSXMLHttpRequest.cpp:
1475         (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
1476         (KJS::JSXMLHttpRequestConstructorImp::construct):
1477         (KJS::JSXMLHttpRequest::JSXMLHttpRequest):
1478         * bindings/js/JSXMLHttpRequest.h:
1479         * bindings/js/JSXSLTProcessor.cpp:
1480         (KJS::JSXSLTProcessor::JSXSLTProcessor):
1481         (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
1482         (KJS::XSLTProcessorConstructorImp::implementsConstruct):
1483         (KJS::XSLTProcessorConstructorImp::construct):
1484         * bindings/js/JSXSLTProcessor.h:
1485         * bindings/js/kjs_binding.h:
1486         (KJS::DOMObject::DOMObject):
1487         (KJS::cacheDOMObject):
1488         (KJS::cacheSVGDOMObject):
1489         * bindings/js/kjs_css.cpp:
1490         (WebCore::JSRGBColor::JSRGBColor):
1491         (WebCore::getJSRGBColor):
1492         * bindings/js/kjs_css.h:
1493         * bindings/js/kjs_events.cpp:
1494         (WebCore::JSClipboard::JSClipboard):
1495         (WebCore::toJS):
1496         * bindings/js/kjs_events.h:
1497         * bindings/js/kjs_html.cpp:
1498         (WebCore::ImageConstructorImp::ImageConstructorImp):
1499         * bindings/js/kjs_navigator.cpp:
1500         (KJS::Navigator::Navigator):
1501         (KJS::PluginBase::PluginBase):
1502         * bindings/js/kjs_navigator.h:
1503         * bindings/js/kjs_window.cpp:
1504         (KJS::Window::Window):
1505         (KJS::Window::location):
1506         (KJS::Window::getValueProperty):
1507         * bindings/js/kjs_window.h:
1508         * bindings/scripts/CodeGeneratorJS.pm:
1509
1510 2008-01-03  Holger Hans Peter Freyther  <zecke@selfish.org>
1511
1512         Reviewed by Alp.
1513
1514         -This is from http://bugs.webkit.org/show_bug.cgi?id=16115
1515
1516         Change the Gtk ContextMenuItem code to generate the GtkMenuItem
1517         or GtkCheckMenuItem on the fly. Currently we will create a
1518         GtkCheckMenuItem if the ContextMenuItem has been checked. What needs
1519         to be done is to change WebCore to tell the platform code if an item
1520         is checkable or not.
1521
1522         * platform/ContextMenuItem.h:
1523         (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
1524         * platform/gtk/ContextMenuGtk.cpp:
1525         (WebCore::ContextMenu::appendItem):
1526         * platform/gtk/ContextMenuItemGtk.cpp:
1527         (WebCore::ContextMenuItem::ContextMenuItem):
1528         (WebCore::ContextMenuItem::~ContextMenuItem):
1529         (WebCore::ContextMenuItem::createNativeMenuItem):
1530         (WebCore::ContextMenuItem::releasePlatformDescription):
1531         (WebCore::ContextMenuItem::type):
1532         (WebCore::ContextMenuItem::setType):
1533         (WebCore::ContextMenuItem::action):
1534         (WebCore::ContextMenuItem::setAction):
1535         (WebCore::ContextMenuItem::platformSubMenu):
1536         (WebCore::ContextMenuItem::setSubMenu):
1537         (WebCore::ContextMenuItem::setChecked):
1538
1539 2008-01-03  Dan Bernstein  <mitz@apple.com>
1540
1541         Rubber-stamped by Adam Roben.
1542
1543         - update the project hierarchy to match the on-disk organization of
1544           the platform directory.
1545
1546         * WebCore.vcproj/WebCore.vcproj:
1547
1548 2008-01-03  Adam Roben  <aroben@apple.com>
1549
1550         Fix a buffer overrun and a leak introduced in r29098
1551
1552         Reviewed by Mark.
1553
1554         * platform/text/StringImpl.cpp:
1555         (WebCore::StringImpl::StringImpl): Only allocate one buffer, and make
1556         it be big enough to hold the string contents plus the null terminator.
1557
1558 2008-01-03  Simon Hausmann  <hausmann@webkit.org>
1559
1560         Reviewed by Lars.
1561
1562         Added the first revision of QWebView and started moving functionality from QWebPave over to QWebView and QWebFrame.
1563
1564         * WebCore.pro:
1565
1566 2008-01-03  Alp Toker  <alp@atoker.com>
1567
1568         Suggested by Mark Rowe.
1569
1570         Fix indentation and remove trailing whitespace.
1571
1572         * platform/network/curl/ResourceHandleManager.cpp:
1573
1574 2008-01-03  Luca Bruno  <lethalman88@gmail.com>
1575
1576         Reviewed by Alp Toker.
1577
1578         Fix HTTP POST-based logins to sites like Facebook, GMail by ensuring
1579         that the two POST methods don't conflict.
1580
1581         * platform/network/curl/ResourceHandleManager.cpp:
1582         (WebCore::ResourceHandleManager::setupPOST):
1583
1584 2008-01-02  Darin Adler  <darin@apple.com>
1585
1586         - touched some files to try to get the Windows buildbot building again
1587
1588 2008-01-02  Dan Bernstein  <mitz@apple.com>
1589
1590         Reviewed by Sam Weinig.
1591
1592         - fix small caps rendering
1593
1594         Covered by an existing test.
1595
1596         * platform/graphics/win/FontDataWin.cpp:
1597         (WebCore::FontData::smallCapsFontData):
1598
1599 2008-01-02  Antti Koivisto  <antti@apple.com>
1600
1601         Reviewed by Oliver.
1602
1603         Calculate video position and size within the renderer box in WebCore. This
1604         way the aspect ratio calculation is not needed in each MediaPlayer implementation.
1605         
1606         This fixes video aspect ratio on Windows.
1607         
1608         Covered by an existing pixel test.
1609
1610         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1611         (WebCore::MediaPlayerPrivate::createQTMovieView):
1612         * rendering/RenderVideo.cpp:
1613         (WebCore::RenderVideo::videoBox):
1614         (WebCore::RenderVideo::paintReplaced):
1615         (WebCore::RenderVideo::updatePlayer):
1616         * rendering/RenderVideo.h:
1617
1618 2008-01-02  Ada Chan  <adachan@apple.com>
1619
1620         Fix windows build.
1621
1622         * WebCore.vcproj/WebCore.vcproj:
1623
1624 2008-01-02  John Sullivan  <sullivan@apple.com>
1625
1626         Reviewed by Dan Bernstein
1627         
1628         - fixed <rdar://problem/5579010> REGRESSION: Safari inserts newlines in tab names when U+2028 is present
1629
1630         * loader/DocumentLoader.cpp:
1631         (WebCore::canonicalizedTitle):
1632         in the code that replaces control characters with white space, also replace the unicode line separator
1633         and paragraph separator characters
1634
1635 2008-01-02  Darin Adler  <darin@apple.com>
1636
1637         - fix buffer overruns seen on buildbot
1638
1639         * platform/text/StringImpl.cpp:
1640         (WebCore::countCharacter): Added this.
1641         (WebCore::StringImpl::toCoordsArray): Use countCharacter instead of incorrect find expression.
1642         (WebCore::StringImpl::toLengthArray): Ditto.
1643         (WebCore::StringImpl::replace): Added assertions.
1644
1645 2008-01-02  Darin Adler  <darin@apple.com>
1646
1647         Reviewed by Maciej.
1648
1649         - fix http://bugs.webkit.org/show_bug.cgi?id=16657
1650           Acid3 failure since table.caption and table.thead do not work for nodes added by appendChild
1651         - fix http://bugs.webkit.org/show_bug.cgi?id=16659
1652           Acid3 expects HTMLTableElement.rows to include a <tr> element that is an immediate child of the <table>
1653
1654         Tests: dom/html/level2/html/HTMLCollection07.html
1655                dom/html/level2/html/HTMLCollection08.html
1656                dom/html/level2/xhtml/HTMLCollection07.xhtml
1657                dom/html/level2/xhtml/HTMLCollection08.xhtml
1658                fast/dom/HTMLTableElement/early-acid3-65-excerpt.html
1659                fast/dom/HTMLTableElement/early-acid3-66-excerpt.html
1660
1661         * GNUmakefile.am: Added HTMLTableRowsCollection.
1662         * WebCore.pro: Ditto.
1663         * WebCore.vcproj/WebCore.vcproj: Ditto.
1664         * WebCore.xcodeproj/project.pbxproj: Ditto.
1665         * WebCoreSources.bkl: Ditto.
1666
1667         * dom/XMLTokenizer.cpp: Took out stray include.
1668
1669         * html/HTMLCollection.cpp:
1670         (WebCore::HTMLCollection::itemAfter): Removed all the table rows code, since we now use
1671         a separate class for that collection. Also got rid of the distinct types for custom collections
1672         that don't need them (use Other for both).
1673         * html/HTMLCollection.h: Also made firstItem non-virtual because it doesn't need to be virtual.
1674
1675         * html/HTMLFormCollection.cpp:
1676         (WebCore::HTMLFormCollection::HTMLFormCollection): Use Other instead of FormElements
1677         for the HTMLCollection type.
1678
1679         * html/HTMLTableElement.cpp:
1680         (WebCore::HTMLTableElement::HTMLTableElement): Eliminated m_head, m_foot, m_firstBody, and m_caption.
1681         (WebCore::HTMLTableElement::caption): Added non-inline version. Finds the caption rather than
1682         keeping a pointer to it.
1683         (WebCore::HTMLTableElement::setCaption): Rewrote.
1684         (WebCore::HTMLTableElement::tHead): Ditto.
1685         (WebCore::HTMLTableElement::setTHead): Ditto.
1686         (WebCore::HTMLTableElement::tFoot): Ditto.
1687         (WebCore::HTMLTableElement::setTFoot): Ditto.
1688         (WebCore::HTMLTableElement::createTHead): Ditto.
1689         (WebCore::HTMLTableElement::deleteTHead): Ditto.
1690         (WebCore::HTMLTableElement::createTFoot): Ditto.
1691         (WebCore::HTMLTableElement::deleteTFoot): Ditto.
1692         (WebCore::HTMLTableElement::createCaption): Ditto.
1693         (WebCore::HTMLTableElement::deleteCaption): Ditto.
1694         (WebCore::HTMLTableElement::lastBody): Added.
1695         (WebCore::HTMLTableElement::insertRow): Rewrote to use a loop based on code in HTMLTableRowsCollection.
1696         This is different from the old code mainly in how it handles rows outside any section.
1697         (WebCore::HTMLTableElement::deleteRow): Ditto.
1698         (WebCore::HTMLTableElement::addChild): Removed code to set the various members. Keeping pointers to
1699         these was a possible source of serious bugs too, including crashes with stale pointers, although I
1700         didn't write any test cases to prove those bugs existed.
1701         (WebCore::HTMLTableElement::parseMappedAttribute): Changed the rules code to visit all cells, not
1702         just the cells of the first body. I believe this fixed rendering on some table tests. I think the code
1703         visits too many cells and also the use of recursion is overkill, but I didn't try to fix that.
1704         (WebCore::HTMLTableElement::rows): Changed to use the new HTMLTableRowsCollection.
1705         * html/HTMLTableElement.h: Changed functions to return PassRefPtr, which can be important if strange
1706         things like DOM mutation events take things ot of the tree before they are safely referenced by
1707         JavaScript wrappers. Also changed functions to take PassRefPtr and added exceptions. Removed unneeded
1708         firstTBody and setTBody functions and childrenChanged function override, as well as unused Rules and
1709         Frame enums. Removed m_head, m_foot, m_firstBody, and m_caption, and added lastBody function. Removed
1710         unneeded friend declaration for HTMLTableCellElement.
1711         * html/HTMLTableElement.idl: Allow the setteres for caption, tHead, and tFoot to raise exceptions.
1712
1713         * html/HTMLTableRowsCollection.cpp: Added. Implements the HTML 5 rule for which rows are in the
1714         collection in which order.
1715         * html/HTMLTableRowsCollection.h: Added.
1716
1717         * loader/FTPDirectoryDocument.cpp:
1718         (WebCore::FTPDirectoryTokenizer::appendEntry): Use the standard insertRow function instead of
1719         coming up with our own way of inserting a row. Simplifies things -- we can remove the code to
1720         create a tbody element.
1721
1722 2008-01-02  Darin Adler  <darin@apple.com>
1723
1724         Reviewed by Alice and Tim.
1725
1726         - try to fix GTK and Qt builds
1727
1728         * platform/win/ScrollViewWin.cpp:
1729         (WebCore::ScrollView::scroll): Improve logic slightly for the case of
1730         vertical scrolling when there's no vertical scroll bar.
1731
1732         * platform/gtk/ScrollViewGtk.cpp:
1733         (WebCore::ScrollView::scroll): Copy the code from Windows. Maybe this
1734         should be factored differently.
1735         * platform/qt/ScrollViewQt.cpp:
1736         (WebCore::ScrollView::scroll): Ditto.
1737
1738 2008-01-02  Darin Adler  <darin@apple.com>
1739
1740         Reviewed by Anders.
1741
1742         - http://bugs.webkit.org/show_bug.cgi?id=16712
1743           change StringImpl to take and return PassRefPtr instead of raw pointers
1744
1745         Also eliminated use of const StringImpl. Since StringImpl is immutable there
1746         is no distinction between a const and non-const one at the moment.
1747
1748         * WebCore.base.exp: Updated.
1749
1750         * css/CSSHelper.cpp:
1751         (WebCore::parseURL): Make String directly, not by making a StringImpl.
1752         * dom/Attr.cpp:
1753         (WebCore::Attr::createTextChild): Convert AtomicString to String with domString,
1754         not via StringImpl.
1755         (WebCore::Attr::setValue): Remove unneed call to impl() when passing a String
1756         to a function that takes a String.
1757
1758         * dom/CDATASection.cpp: Removed unused constructor.
1759         (WebCore::CDATASection::cloneNode): Added a now-needed .get().
1760         (WebCore::CDATASection::createNew): Changed function to take a PassRefPtr.
1761         * dom/CDATASection.h:
1762
1763         * dom/CharacterData.cpp:
1764         (WebCore::CharacterData::CharacterData): Removed unneeded initialization and
1765         ref() now that the string is a RefPtr. Also updated to not call "new StringImpl".
1766         (WebCore::CharacterData::~CharacterData): Removed unneeded deref() since it's
1767         a RefPtr.
1768         (WebCore::CharacterData::setData): More of that.
1769         (WebCore::CharacterData::substringData): Ditto.
1770         (WebCore::CharacterData::appendData): Ditto.
1771         (WebCore::CharacterData::insertData): Ditto.
1772         (WebCore::CharacterData::deleteData): Ditto.
1773         (WebCore::CharacterData::replaceData): Ditto.
1774         (WebCore::CharacterData::nodeValue): Ditto.
1775         (WebCore::CharacterData::dispatchModifiedEvent): Ditto.
1776         (WebCore::CharacterData::dump): Ditto.
1777         * dom/CharacterData.h: Changed to use a RefPtr. I could have used a String
1778         instead, but since String adds extra branches to handle 0, I figured it was
1779         more conservative to just use RefPtr. Later it would be good to figure out
1780         which is preferred style and be more consistent. Maybe we'll phase out
1781         StringImpl, or maybe we'll go the other way and use it more since it can be
1782         more efficient.
1783
1784         * dom/DOMImplementation.cpp:
1785         (WebCore::addString): Changed set to use String rather than StringImpl.
1786         (WebCore::isSVG10Feature): Ditto.
1787         (WebCore::isSVG11Feature): Ditto.
1788         (WebCore::DOMImplementation::createDocument): Replaced custom code to
1789         find a colon with a call to String::find.
1790
1791         * dom/Range.cpp:
1792         (WebCore::Range::insertNode): Updated since the result of splitText is now
1793         a PassRefPtr.
1794
1795         * dom/Text.cpp:
1796         (WebCore::Text::splitText): Updated since str is now a RefPtr. Also made the
1797         result of this function be a PassRefPtr.
1798         (WebCore::Text::createRenderer): Ditto.
1799         (WebCore::Text::createNew): Made the parameter and result both be PassRefPtr.
1800         * dom/Text.h:
1801
1802         * html/HTMLElement.cpp:
1803         (WebCore::HTMLElement::nodeName): Use String::upper.
1804
1805         * html/HTMLInputElement.cpp:
1806         (WebCore::numGraphemeClusters): Remove now-unneeded const.
1807         (WebCore::numCharactersInGraphemeClusters): Ditto.
1808
1809         * html/HTMLTokenizer.cpp:
1810         (WebCore::HTMLTokenizer::processToken): Updated for function name change.
1811
1812         * platform/text/AtomicString.cpp:
1813         (WebCore::CStringTranslator::translate): Updated since there is no longer
1814         a constructor that takes a string.
1815
1816         * platform/text/PlatformString.h: Added new constructors that take
1817         PassRefPtr and RefPtr. Removed misleading comment.
1818
1819         * platform/text/String.cpp:
1820         (WebCore::String::String): Changed to use StringImpl::create, which handles
1821         the empty string automatically.
1822         (WebCore::String::append): Ditto.
1823         (WebCore::String::charactersWithNullTermination): Similar.
1824         (WebCore::String::format): Ditto.
1825
1826         * platform/text/StringHash.h: Took out unneeded const.
1827
1828         * platform/text/StringImpl.cpp:
1829         (WebCore::deleteUCharVector): Changed to take a const pointer since the
1830         buffers are now const UChar buffers.
1831         (WebCore::StringImpl::StringImpl): Removed some constructors. Got rid of the
1832         separate init functions. The constructors are now private and used only in
1833         the create functions and one or two other places.
1834         (WebCore::StringImpl::containsOnlyWhitespace): Removed now-meaningless const.
1835         (WebCore::StringImpl::substring): Ditto. Also changed return value to be a
1836         PassRefPtr.
1837         (WebCore::StringImpl::characterStartingAt): Ditto.
1838         (WebCore::StringImpl::toLength): Ditto.
1839         (WebCore::StringImpl::toCoordsArray): Ditto.
1840         (WebCore::StringImpl::toLengthArray): Ditto.
1841         (WebCore::StringImpl::isLower): Ditto.
1842         (WebCore::StringImpl::lower): Ditto. Changed to use Vector and adopt so we
1843         don't have to use new directly here. Makes empty string handling more consistent.
1844         (WebCore::StringImpl::upper): Ditto.
1845         (WebCore::StringImpl::secure): Ditto.
1846         (WebCore::StringImpl::foldCase): Ditto.
1847         (WebCore::StringImpl::stripWhiteSpace): Ditto.
1848         (WebCore::StringImpl::simplifyWhiteSpace): Ditto.
1849         (WebCore::StringImpl::capitalize): Ditto.
1850         (WebCore::StringImpl::toInt): Removed now-meaningless const.
1851         (WebCore::StringImpl::toInt64): Ditto.
1852         (WebCore::StringImpl::toUInt64): Ditto.
1853         (WebCore::StringImpl::toDouble): Ditto.
1854         (WebCore::StringImpl::toFloat): Ditto.
1855         (WebCore::StringImpl::find): Ditto.
1856         (WebCore::StringImpl::reverseFind): Ditto.
1857         (WebCore::StringImpl::endsWith): Ditto.
1858         (WebCore::StringImpl::replace): Ditto.
1859         (WebCore::equal): Ditto.
1860         (WebCore::equalIgnoringCase): Ditto.
1861         (WebCore::StringImpl::ascii): Ditto.
1862         (WebCore::StringImpl::defaultWritingDirection): Ditto.
1863         (WebCore::StringImpl::createStrippingNullCharacters): Ditto.
1864         (WebCore::StringImpl::adopt): Added special case so this uses the shared
1865         empty string like other functions. Also optimized the common case where the
1866         vector happens to already have the right size so we don't do a fastRealloc
1867         at all in those cases.
1868         (WebCore::StringImpl::create): Added. These are now the public functions for
1869         creating new StringImpl objects. They all implement the shared empty string.
1870         (WebCore::StringImpl::createWithTerminatingNullCharacter):
1871         * platform/text/StringImpl.h:
1872
1873         * platform/text/cf/StringCF.cpp:
1874         (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
1875         * platform/text/cf/StringImplCF.cpp:
1876         (WebCore::StringImpl::createCFString): Removed now-obsolete const.
1877         * platform/text/mac/StringImplMac.mm:
1878         (WebCore::StringImpl::operator NSString *): Ditto.
1879         * platform/text/mac/StringMac.mm:
1880         (WebCore::String::String): Use StringImpl::create instead of new StringImpl.
1881         * platform/text/qt/StringQt.cpp:
1882         (WebCore::String::String): Ditto.
1883         * platform/text/wx/StringWx.cpp:
1884         (WebCore::String::String): Ditto.
1885         * rendering/RenderBR.cpp:
1886         (WebCore::RenderBR::RenderBR): Ditto.
1887
1888         * rendering/RenderSVGInlineText.cpp:
1889         (WebCore::RenderSVGInlineText::RenderSVGInlineText): Use PassRefPtr.
1890         * rendering/RenderSVGInlineText.h:
1891
1892         * rendering/RenderText.cpp:
1893         (WebCore::charactersAreAllASCII): Removed now-unneeded const.
1894         * rendering/RenderTextFragment.cpp:
1895         (WebCore::RenderTextFragment::originalText): Use RefPtr.
1896
1897 2008-01-02  Timothy Hatcher  <timothy@apple.com>
1898
1899         Reviewed by Oliver Hunt.
1900
1901         <rdar://problem/5618086> WebInspector does not expand the DOM tree after being closed
1902
1903         Closing the Web Inspector causes the DOM tree outline to be torn down, clearing the
1904         internal element lookup tables. The represented DOM node object still holds the identifier
1905         it was assigned, and a later call to findTreeElement will use that original identifier
1906         against a cleared lookup table. In that case we need to fallback on DOM ancestor lookup.
1907
1908         * page/inspector/treeoutline.js:
1909         (TreeOutline.prototype.findTreeElement): If the DOM node already had a __treeElementIdentifier,
1910         but the TreeOutline no longer has the element in the _knownTreeElements list do an ancestor lookup
1911         instead of an early return.
1912
1913 2008-01-02  Alice Liu  <alice.liu@apple.com>
1914
1915         Reviewed by Maciej.
1916
1917         Fixed <rdar://5283861> (problems scrolling in gmail message content area)
1918
1919         * platform/ScrollView.h:
1920         * platform/win/ScrollViewWin.cpp:
1921         (WebCore::ScrollView::scroll):
1922          Changed return value to bool to reflect success of scroll attempt
1923
1924 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
1925
1926         Fixed a typo (pointed out in review, but I somehow missed it at first).
1927
1928         * editing/EditorCommand.cpp: (WebCore::executeDelete):
1929
1930 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
1931
1932         Reviewed by Darin.
1933
1934         Resolved several FIXMEs in EditorCommand.
1935         Made recently added commands hidden from JS again.
1936         Removed BackwardDelete implementation, which used to be dead code, but got exposed now.
1937
1938         Tests: editing/execCommand/delete-no-scroll.html
1939                editing/execCommand/forward-delete-no-scroll.html
1940                editing/execCommand/insert-line-break-no-scroll.html
1941
1942         * editing/EditorCommand.cpp:
1943         (WebCore::executeDelete):
1944         (WebCore::executeForwardDelete):
1945         (WebCore::executeInsertLineBreak):
1946         (WebCore::supportedFromMenuOrKeyBinding):
1947         (WebCore::CommandEntry::):
1948
1949 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
1950
1951         Reviewed by Darin.
1952
1953         http://bugs.webkit.org/show_bug.cgi?id=14555
1954         action=mailto + method=get - The generated mailto URI is incorrect and the hvalues are encoded twice
1955
1956         http://bugs.webkit.org/show_bug.cgi?id=14774
1957         Submitted data only includes first input item
1958
1959         Reworked encoding of mailto URLs to match other browsers.
1960         Moved most of related logic from FrameLoader::submitForm() to HTMLFormElement::submit().
1961
1962         Tests: fast/forms/mailto/advanced-get.html
1963                fast/forms/mailto/advanced-put.html
1964                fast/forms/mailto/get-multiple-items-text-plain.html
1965                fast/forms/mailto/get-multiple-items-x-www-form-urlencoded.html
1966                fast/forms/mailto/get-multiple-items.html
1967                fast/forms/mailto/get-non-ascii.html
1968                fast/forms/mailto/get-non-ascii-text-plain.html
1969                fast/forms/mailto/get-overwrite-query.html
1970                fast/forms/mailto/post-append-query.html
1971                fast/forms/mailto/post-multiple-items-multipart-form-data.html
1972                fast/forms/mailto/post-multiple-items-text-plain.html
1973                fast/forms/mailto/post-multiple-items-x-www-form-urlencoded.html
1974                fast/forms/mailto/post-multiple-items.html
1975
1976         * html/HTMLFormElement.cpp:
1977         (WebCore::HTMLFormElement::submit):
1978         * loader/FrameLoader.cpp:
1979         (WebCore::FrameLoader::submitForm):
1980
1981 2008-01-02  Mark Rowe  <mrowe@apple.com>
1982
1983         Autotools build fix.
1984
1985         * GNUmakefile.am: Remove files before generating them, not after.
1986
1987 2008-01-02  Mark Rowe  <mrowe@apple.com>
1988
1989         Rubber-stamped by Alp Toker.
1990
1991         Add missing dependencies to some GNUmakefile.am rules.
1992
1993         * GNUmakefile.am:
1994
1995 2008-01-02  Mark Rowe  <mrowe@apple.com>
1996
1997         Reviewed by Alp Toker.
1998
1999         Autotools build fix.  Make can expand $@ to any of the targets for the rule,
2000         while we always want to use the name of the .cpp file as the output file.
2001
2002         * GNUmakefile.am:
2003
2004 2008-01-02  Luca Bruno  <lethalman88@gmail.com>
2005
2006         Reviewed by Alp Toker.
2007
2008         http://bugs.webkit.org/show_bug.cgi?id=16115
2009         [GTK] ContextMenu and ContextMenuItem lacks an implementation
2010
2011         Add context menu support.
2012
2013         Based on a patch by Holger Freyther.
2014
2015         * platform/gtk/ContextMenuGtk.cpp:
2016         (WebCore::menuItemActivated):
2017         (WebCore::ContextMenu::ContextMenu):
2018         (WebCore::ContextMenu::~ContextMenu):
2019         (WebCore::ContextMenu::appendItem):
2020         (WebCore::ContextMenu::setPlatformDescription):
2021         (WebCore::ContextMenu::releasePlatformDescription):
2022         * platform/gtk/ContextMenuItemGtk.cpp:
2023         (WebCore::ContextMenuItem::ContextMenuItem):
2024         (WebCore::ContextMenuItem::~ContextMenuItem):
2025         (WebCore::ContextMenuItem::releasePlatformDescription):
2026         (WebCore::ContextMenuItem::type):
2027         (WebCore::ContextMenuItem::action):
2028         (WebCore::ContextMenuItem::setAction):
2029         (WebCore::ContextMenuItem::platformSubMenu):
2030         (WebCore::ContextMenuItem::setSubMenu):
2031         (WebCore::ContextMenuItem::setChecked):
2032         (WebCore::ContextMenuItem::setEnabled):
2033
2034 2008-01-02  Alp Toker  <alp@atoker.com>
2035
2036         GTK+ autotools build fix. Track changes in r29073.
2037
2038         * GNUmakefile.am:
2039
2040 2008-01-01  Darin Adler  <darin@apple.com>
2041
2042         - fix release build
2043
2044         * bindings/js/kjs_binding.cpp:
2045         (KJS::setDOMException): Initialize to avoid uninitialized variable warning.
2046         Removed default so we get a warning if there's a missing case.
2047
2048 2008-01-01  David D. Kilzer  <ddkilzer@webkit.org>
2049
2050         Scripting MIME Types application/ecmascript, application/javascript not viewable
2051         <http://bugs.webkit.org/show_bug.cgi?id=11063>
2052
2053         Reviewed by Darin.
2054
2055         This patch consolidates the list of acceptable MIME types for JavaScript
2056         source into the MIMETypeRegistry class, and replaces checks for these
2057         types with a call to MIMETypeRegistry::isSupportedJavaScriptMIMEType().
2058
2059         No tests added since viewing JavaScript source is not testable.
2060
2061         * dom/DOMImplementation.cpp:
2062         (WebCore::DOMImplementation::isTextMIMEType): Use
2063         MIMETypeRegistry::isSupportedJavaScriptMIMEType() instead of a single
2064         hard-coded MIME type, "application/x-javascript".
2065
2066         * html/HTMLScriptElement.cpp:
2067         (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript): Moved list of
2068         JavaScript MIME types from here to
2069         MIMETypeRegistry::initialiseSupportedJavaScriptMIMETypes().
2070
2071         * platform/MIMETypeRegistry.cpp:
2072         (WebCore::initialiseSupportedJavaScriptMIMETypes): Added. List of
2073         MIME types came from HTMLScriptElement::shouldExecuteAsJavaScript().
2074         (WebCore::initialiseSupportedNonImageMimeTypes): Remove single
2075         hard-coded MIME type, "application/x-javascript", from the list.
2076         (WebCore::initialiseMIMETypeRegistry): Initialise
2077         supportedJavaScriptMIMETypes, then pre-populate supportedNonImageMIMETypes
2078         with values in supportedJavaScriptMIMETypes.
2079         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): Added.
2080
2081         * platform/MIMETypeRegistry.h: Added isSupportedJavaScriptMIMEType().
2082
2083 2008-01-01  Sam Weinig  <sam@webkit.org>
2084
2085         Reviewed by Darin.
2086
2087         Patch for http://bugs.webkit.org/show_bug.cgi?id=16691
2088         Use real JS objects for the rest of the DOMExceptions (EventException, RangeException, etc)
2089
2090         - Create JS objects for all the different types of exceptions, each with there own prototype and constructor.
2091         - Abstract all the logic and storage for exception classes in to an ExceptionBase class.
2092         - Move specialized ExceptionCodes into the exception classes. (ie. the EventExceptionCode enum is now in EventException).
2093
2094         Tests: fast/dom/DOMException/EventException.html
2095                fast/dom/DOMException/RangeException.html
2096                fast/dom/DOMException/XPathException.html
2097                http/tests/xmlhttprequest/XMLHttpRequestException.html
2098                svg/custom/SVGException.html
2099
2100         * DerivedSources.make:
2101         * WebCore.pro:
2102         * WebCore.vcproj/WebCore.vcproj:
2103         * WebCore.xcodeproj/project.pbxproj:
2104         * WebCoreSources.bkl:
2105         * bindings/js/JSSVGMatrixCustom.cpp:
2106         (WebCore::JSSVGMatrix::inverse):
2107         (WebCore::JSSVGMatrix::rotateFromVector):
2108         * bindings/js/kjs_binding.cpp:
2109         (KJS::setDOMException):
2110         * bindings/scripts/CodeGeneratorJS.pm: Use the constant values defined
2111         in the IDL as the ObjC bindings do.
2112         * bindings/scripts/CodeGeneratorObjC.pm:
2113         * dom/DOMCoreException.cpp: Removed.
2114         * dom/DOMCoreException.h:
2115         (WebCore::DOMCoreException::DOMCoreException):
2116         * dom/DOMCoreException.idl:
2117         * dom/Event.h:
2118         * dom/EventException.h: Copied from WebCore/dom/DOMCoreException.h.
2119         (WebCore::EventException::EventException):
2120         (WebCore::EventException::):
2121         * dom/EventException.idl: Copied from WebCore/dom/DOMCoreException.idl.
2122         * dom/EventTargetNode.cpp:
2123         (WebCore::EventTargetNode::dispatchEvent):
2124         * dom/ExceptionBase.cpp: Copied from WebCore/dom/DOMCoreException.cpp.
2125         (WebCore::ExceptionBase::ExceptionBase):
2126         (WebCore::ExceptionBase::toString):
2127         * dom/ExceptionBase.h: Copied from WebCore/dom/DOMCoreException.h.
2128         (WebCore::ExceptionBase::code):
2129         * dom/ExceptionCode.cpp:
2130         (WebCore::getExceptionCodeDescription):
2131         * dom/ExceptionCode.h:
2132         (WebCore::):
2133         * dom/Range.cpp:
2134         (WebCore::Range::insertNode):
2135         (WebCore::Range::checkNodeWOffset):
2136         (WebCore::Range::checkNodeBA):
2137         (WebCore::Range::selectNode):
2138         (WebCore::Range::selectNodeContents):
2139         (WebCore::Range::surroundContents):
2140         * dom/RangeException.h:
2141         (WebCore::RangeException::RangeException):
2142         (WebCore::RangeException::):
2143         * dom/RangeException.idl:
2144         * page/DOMWindow.idl:
2145         * svg/SVGColor.cpp:
2146         (WebCore::SVGColor::setRGBColor):
2147         * svg/SVGException.h:
2148         (WebCore::SVGException::SVGException):
2149         (WebCore::SVGException::):
2150         * svg/SVGException.idl:
2151         * svg/SVGLocatable.cpp:
2152         (WebCore::SVGLocatable::getTransformToElement):
2153         * xml/XMLHttpRequest.cpp:
2154         (WebCore::XMLHttpRequest::dispatchEvent):
2155         (WebCore::XMLHttpRequest::open):
2156         (WebCore::XMLHttpRequest::send):
2157         * xml/XMLHttpRequest.h:
2158         * xml/XMLHttpRequestException.h: Copied from WebCore/dom/DOMCoreException.h.
2159         (WebCore::XMLHttpRequestException::XMLHttpRequestException):
2160         (WebCore::XMLHttpRequestException::):
2161         * xml/XMLHttpRequestException.idl: Copied from WebCore/dom/DOMCoreException.idl.
2162         * xml/XPathEvaluator.h:
2163         * xml/XPathException.h: Copied from WebCore/dom/DOMCoreException.h.
2164         (WebCore::XPathException::XPathException):
2165         (WebCore::XPathException::):
2166         * xml/XPathException.idl: Copied from WebCore/dom/DOMCoreException.idl.
2167         * xml/XPathParser.cpp:
2168         (WebCore::XPath::Parser::parseStatement):
2169         * xml/XPathResult.cpp:
2170         (WebCore::XPathResult::convertTo):
2171         (WebCore::XPathResult::numberValue):
2172         (WebCore::XPathResult::stringValue):
2173         (WebCore::XPathResult::booleanValue):
2174         (WebCore::XPathResult::singleNodeValue):
2175         (WebCore::XPathResult::snapshotLength):
2176         (WebCore::XPathResult::iterateNext):
2177         (WebCore::XPathResult::snapshotItem):
2178
2179 2008-01-01  Sam Weinig  <sam@webkit.org>
2180
2181         Remove JSDomExceptionConstructor.lut.h from clean step
2182         as it no longer exists.
2183
2184         * GNUmakefile.am:
2185
2186 2008-01-01  Dan Bernstein  <mitz@apple.com>
2187
2188         - Windows build fix
2189
2190         * WebCore.vcproj/WebCore.vcproj:
2191
2192 2008-01-01  Sam Weinig  <sam@webkit.org>
2193
2194         Try again to fix the builds
2195
2196         * DerivedSources.make:
2197
2198 2008-01-01  Sam Weinig  <sam@webkit.org>
2199
2200         Fix non-mac builds.
2201
2202         * WebCore.pro:
2203         * WebCore.vcproj/WebCore.vcproj:
2204         * WebCoreSources.bkl:
2205
2206 2008-01-01  Eric Seidel  <eric@webkit.org>
2207
2208         Reviewed by Alexey.
2209
2210         Don't replace \ with / in data: urls
2211         http://bugs.webkit.org/show_bug.cgi?id=16692
2212
2213         Test: fast/loader/url-data-replace-backslash.html
2214
2215         * platform/KURL.cpp:
2216         (WebCore::KURL::init):
2217
2218 2008-01-01  Alp Toker  <alp@atoker.com>
2219
2220         GTK+ autotools build fix. Track changes in r29051, r29058 and pass the
2221         correct parameter to AM_INIT_AUTOMAKE.
2222
2223         * GNUmakefile.am:
2224
2225 2007-12-31  Sam Weinig  <sam@webkit.org>
2226
2227         Reviewed by Darin.
2228
2229         Patch for http://bugs.webkit.org/show_bug.cgi?id=16637
2230         Acid3 expects ExeceptionCode constants to be defined on DOMException objects
2231
2232         - Make DOMException a real JS object.
2233
2234         Test: fast/dom/DOMException/prototype-object.html
2235
2236         * DerivedSources.make:
2237         * WebCore.xcodeproj/project.pbxproj:
2238
2239         This is no longer needed as the autogenerated classes now includes the
2240         constructor.
2241         * bindings/js/JSDOMExceptionConstructor.cpp: Removed.
2242         * bindings/js/JSDOMExceptionConstructor.h: Removed.
2243
2244         Create on demand and use the new class for DOMExceptions.
2245         * bindings/js/kjs_binding.cpp:
2246         (KJS::setDOMException):
2247
2248         Remove no longer needed custom constructor getter.
2249         * bindings/js/kjs_window.cpp:
2250         (KJS::Window::getValueProperty):
2251
2252         Don't expose DOMCoreException as the name of class by special casing
2253         the user visible class name to be DOMException.
2254         * bindings/scripts/CodeGeneratorJS.pm:
2255
2256         The DOMException class/file needs to be named DOMCoreException because there is
2257         name conflict with one of the Objective-C bindings classes.  It should be renamed
2258         to DOMException when the Objective-C bindings are moved into WebKit.
2259         * dom/DOMCoreException.cpp: Added.
2260         (WebCore::DOMCoreException::DOMCoreException):
2261         (WebCore::DOMCoreException::toString):
2262         * dom/DOMCoreException.h: Added.
2263         (WebCore::DOMCoreException::):
2264         (WebCore::DOMCoreException::code):
2265         (WebCore::DOMCoreException::name):
2266         (WebCore::DOMCoreException::message):
2267         * dom/DOMCoreException.idl: Added.
2268         * page/DOMWindow.idl:
2269
2270 2007-12-31  Sam Weinig  <sam@webkit.org>
2271
2272         Re-enable querySelector and querySelectorAll and touch the necessary files to not
2273         kill the windows build.
2274
2275         * WebCore.vcproj/build-generated-files.sh:
2276         * bindings/scripts/CodeGeneratorCOM.pm:
2277         * dom/Document.idl:
2278         * dom/Element.idl:
2279
2280 2007-12-31  Darin Adler  <darin@apple.com>
2281
2282         - fix Windows build
2283
2284         * dom/Document.idl: Temporarily disable querySelector and querySelectorAll, since they are showing
2285         up as pure virtual functions. Sam can fix this later.
2286         * dom/Element.idl: Ditto.
2287
2288 2007-12-31  Dan Bernstein  <mitz@apple.com>
2289
2290         Reviewed by Darin Adler.
2291
2292         - fix http://bugs.webkit.org/show_bug.cgi?id=14134
2293           <rdar://problem/5655160> REGRESSION (r25353): Whitespace nodes ignored between inline list items
2294
2295         Test: fast/dynamic/create-renderer-for-whitespace-only-text.html
2296
2297         * dom/Node.cpp:
2298         (WebCore::Node::attach): Added code to check if this node's renderer
2299         has become the "previous renderer" of any sibling text node, and if so,
2300         ensure that that node gets a renderer if it now needs one.
2301         (WebCore::Node::createRendererIfNeeded): Removed the assertion that the
2302         node is not attached.
2303
2304 2007-12-31  Darin Adler  <darin@apple.com>
2305
2306         Reviewed by Mitz.
2307
2308         - fix http://bugs.webkit.org/show_bug.cgi?id=16641
2309           Acid3 reveals HTMLFormElement.elements fails to update when element name changes
2310
2311         Test: fast/dom/HTMLFormElement/elements-not-in-document.html
2312
2313         This was a bug specific to forms that are not in the document tree.
2314         The fix was to change the code to increment the document version number to match
2315         up with other document change tracking. Maybe at some point we can clean these up
2316         so we don't have so many competing change notification systems.
2317
2318         * dom/ContainerNode.cpp:
2319         (WebCore::ContainerNode::replaceChild): Removed bogus comment.
2320         (WebCore::ContainerNode::addChild): Added an explicit incDOMTreeVersion
2321         call here, since this code path bypasses the subtree-modified event code.
2322
2323         * dom/Element.cpp:
2324         (WebCore::Element::setAttribute): Remove the inDocument() check -- not all HTML
2325         collections are for things in the document.
2326         (WebCore::Element::setAttributeMap): Ditto.
2327
2328         * dom/EventTargetNode.cpp:
2329         (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent): Added a call to
2330         incDOMTreeVersion here; covers most cases of tree structure changes.
2331
2332         * dom/Node.cpp:
2333         (WebCore::Node::attach): Remove call to incDOMTreeVersion -- creating a renderer
2334         has nothing to do with changes to the DOM tree!
2335         (WebCore::Node::detach): Ditto.
2336
2337         * html/HTMLFormElement.cpp:
2338         (WebCore::HTMLFormElement::registerFormElement): Remove call to incDOMTreeVersion.
2339         This is handled at a lower level and doesn't need to be here.
2340         (WebCore::HTMLFormElement::removeFormElement): Ditto.
2341
2342 2007-12-31  Henry Mason  <hmason@mac.com>
2343
2344         Reviewed by Darin.
2345
2346         Patch for http://bugs.webkit.org/show_bug.cgi?id=14994
2347         Support for MessageEvent and cross-domain messaging
2348
2349         Test: http/tests/messaging/cross-domain-message-send.html
2350
2351         * DerivedSources.make:
2352         * WebCore.pro:
2353         * WebCore.vcproj/WebCore.vcproj:
2354         * WebCore.xcodeproj/project.pbxproj:
2355         * WebCoreSources.bkl:
2356         * bindings/js/JSDOMWindowCustom.cpp:
2357         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Allow cross-domain access to the
2358         postMessage function.
2359         (WebCore::JSDOMWindow::postMessage):
2360         * bindings/js/JSEventCustom.cpp:
2361         (WebCore::toJS):
2362         * dom/Event.cpp:
2363         (WebCore::Event::isMessageEvent):
2364         * dom/Event.h:
2365         * dom/EventNames.h: New event name
2366         * dom/MessageEvent.cpp: Added.
2367         * dom/MessageEvent.h: Added.
2368         * dom/MessageEvent.idl: Added.
2369         * page/DOMWindow.cpp:
2370         (WebCore::DOMWindow::postMessage): Added.
2371         * page/DOMWindow.h:
2372         * page/DOMWindow.idl:
2373
2374 2007-12-31  Darin Adler  <darin@apple.com>
2375
2376         Suggested by Antti.
2377
2378         - turn ENABLE_VIDEO back off for Windows until we can install QuickTime on the build bots
2379
2380         * WebCore.vcproj/WebCore.vcproj: Removed ENABLE_VIDEO.
2381         * WebCore.vcproj/build-generated-files.sh: Ditto.
2382
2383 2007-12-30  Alp Toker  <alp@atoker.com>
2384
2385         Reviewed by Dan Bernstein.
2386
2387         Silence warning.
2388
2389         * dom/NodeList.h:
2390
2391 2007-12-30  Sam Weinig  <sam@webkit.org>
2392
2393         Reviewed by Oliver Hunt.
2394
2395         Fix for http://bugs.webkit.org/show_bug.cgi?id=16387
2396         Variable names can be enumerated across domains
2397         <rdar://problem/5640454>
2398
2399         Test: http/tests/security/cross-frame-access-enumeration.html
2400
2401         * bindings/js/kjs_window.cpp:
2402         (KJS::Window::getPropertyNames): Override method to test same-origin policy.
2403         * bindings/js/kjs_window.h:
2404
2405 2007-12-30  Sam Weinig  <sam@webkit.org>
2406
2407         Reviewed by Oliver Hunt.
2408
2409         Patch for http://bugs.webkit.org/show_bug.cgi?id=10686
2410         event instanceof MouseEvent throws exception
2411
2412         Add JS constructors for all the Event types.
2413
2414         Test: fast/events/event-instanceof.html
2415
2416         * WebCore.xcodeproj/project.pbxproj:
2417         * dom/KeyboardEvent.idl:
2418         * dom/MouseEvent.idl:
2419         * dom/MutationEvent.idl:
2420         * dom/OverflowEvent.idl:
2421         * dom/ProgressEvent.idl:
2422         * dom/TextEvent.idl:
2423         * dom/UIEvent.idl:
2424         * dom/WheelEvent.idl:
2425         * page/DOMWindow.idl:
2426
2427 2007-12-30  David Kilzer  <ddkilzer@webkit.org>
2428
2429         Reviewed by Darin.
2430
2431         - fix http://bugs.webkit.org/show_bug.cgi?id=15359
2432           JPEG image not shown when height is specified as percentage inside a table
2433
2434         The problem occurs when a replaced element (image, canvas, etc.) with
2435         a percent-height attribute is contained by a table cell with an auto-
2436         or percent-height attribute.  If there are no other conditions to cause
2437         the table cell's height to expand, an available height of zero will
2438         always be returned.  In these cases, the intrinsic height of the
2439         replaced element should be used if it is greater than the available
2440         height of the table cell.
2441
2442         Tests: fast/replaced/table-percent-height.html
2443                tables/mozilla/bugs/bug137388-1.html
2444                tables/mozilla/bugs/bug137388-2.html
2445
2446         * rendering/RenderBox.cpp:
2447         (WebCore::RenderBox::calcReplacedHeightUsing):
2448
2449 2007-12-30  Luca Bruno  <lethalman88@gmail.com>
2450
2451         Reviewed by Alp Toker.
2452
2453         http://bugs.webkit.org/show_bug.cgi?id=16099
2454         Crash in CURL for empty POST
2455
2456         We have to set POST even when the data is empty, otherwise cURL will
2457         hang while waiting for a response.
2458
2459         * platform/network/curl/ResourceHandleManager.cpp
2460         (ResourceHandleManager::setupPOST): allow empty POST
2461
2462 2007-12-29  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
2463
2464         Reviewed by Alp Toker.
2465
2466         Move all SVG related stuff inside SVG block. Don't include
2467         SVGNames, SVGElementFactory, and XLinkNames when SVG is not
2468         enabled
2469
2470         * GNUmakefile.am:
2471
2472 2007-12-29  Alexey Proskuryakov  <ap@webkit.org>
2473
2474         Reviewed by Darin.
2475
2476         http://bugs.webkit.org/show_bug.cgi?id=14428
2477         FCKEditor: Images disappear on drag/drop and copy/paste
2478
2479         Test: editing/pasteboard/drag-image-in-about-blank-frame.html
2480
2481         * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Don't use "about:blank" as a
2482         base URL, just like we don't use an empty one.
2483
2484 2007-12-29  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
2485
2486         Reviewed by Alp Toker.
2487
2488         http://bugs.webkit.org/show_bug.cgi?id=16669
2489         autotools update and fixes
2490
2491         Autotools update and database/icon database inclusion guard fixes
2492
2493         * GNUmakefile.am:
2494           - Update autotools config as per -r29012 changes
2495           - Fix CSSGrammar.h/cpp generation (Seo Sanghyeon, sanxiyn)
2496         * dom/Document.cpp:
2497         * loader/icon/IconDatabase.h:
2498         * page/DOMWindow.cpp:
2499         * page/InspectorController.cpp:
2500         * page/Settings.cpp:
2501         * storage/Database.h:
2502           - Remove ENABLE(DATABASE) inclusion guard. Let the includer add the guard instead.
2503
2504 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
2505
2506         Reviewed by Alexey.
2507
2508         Respect horiz-origin-x / horiz-origin-y / vert-origin-x / vert-origin-y properties when drawing SVG Fonts.
2509         (Fixes fonts-elem-05-t.svg in a --svg-fonts build)
2510
2511         * svg/SVGFont.cpp:
2512         (WebCore::Font::drawGlyphsWithSVGFont):
2513
2514 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
2515
2516         Reviewed by Oliver.
2517
2518         Further SVG Font work. Parse all <glyph> attributes, using SVGGlyphElement::buildGlyphIdentifier.
2519         SVGFontElement::collectGlyphs() now uses this method. Per character advance values work well now.
2520
2521         * platform/graphics/FontData.cpp:
2522         (WebCore::SVGFontData::convertEmUnitToPixel): Add helper function.
2523         (WebCore::FontData::ascent):
2524         (WebCore::FontData::descent):
2525         * platform/graphics/FontData.h:
2526         * svg/SVGFont.cpp:
2527         (WebCore::isVerticalWritingMode): Add helper function.
2528         (WebCore::Font::drawGlyphsWithSVGFont):
2529         * svg/SVGFontElement.cpp:
2530         (WebCore::SVGFontElement::collectGlyphs): Simplified implementation - SVGGlyphIdentifier now build by SVGGlyphElement.
2531         * svg/SVGGlyphElement.cpp:
2532         (WebCore::parseArabicForm): Helper function.
2533         (WebCore::parseOrientation): Ditto.
2534         (WebCore::parsePathData): Ditto.
2535         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
2536         * svg/SVGGlyphElement.h:
2537         (WebCore::SVGGlyphElement::rendererIsNeeded):
2538
2539 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
2540
2541         Reviewed by Oliver.
2542
2543         Refactor SVGAnimationElement::parseValues into a generic function parseDelimitedString.
2544         SVGAnimationElement needs to parse semicolon-seperated strings, SVGGlyphElement comma-seperated.
2545
2546         * svg/SVGAnimationElement.cpp:
2547         (WebCore::SVGAnimationElement::parseMappedAttribute):
2548         * svg/SVGParserUtilities.cpp:
2549         (WebCore::parseDelimitedString):
2550         * svg/SVGParserUtilities.h:
2551
2552 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
2553
2554         Reviewed by Maciej.
2555
2556         Add new helper structure SVGFontData - FontData holds this object as OwnPtr.
2557         Store several attribute values there (horiz-adv-x, horiz-origin-x etc..)
2558
2559         To optimize for the common case ('FontData' used for HTML rendering) it feels
2560         better to hold one OwnPtr in FontData, than several floats.
2561
2562         Parse all <font> attributes in SVGFontFaceElement::createFontData.
2563
2564         * platform/graphics/FontData.cpp:
2565         (WebCore::SVGFontData::SVGFontData):
2566         (WebCore::FontData::FontData):
2567         (WebCore::FontData::ascent):
2568         (WebCore::FontData::descent):
2569         * platform/graphics/FontData.h:
2570         (WebCore::FontData::isSVGFont):
2571         (WebCore::FontData::svgFontData):
2572         * svg/SVGFont.cpp:
2573         (WebCore::Font::drawGlyphsWithSVGFont):
2574         * svg/SVGFontElement.cpp:
2575         * svg/SVGFontElement.h:
2576         (WebCore::SVGFontElement::rendererIsNeeded):
2577         * svg/SVGFontFaceElement.cpp:
2578         (WebCore::SVGFontFaceElement::unitsPerEm):
2579         (WebCore::SVGFontFaceElement::createFontData):
2580
2581 2007-12-28  Darin Adler  <darin@apple.com>
2582
2583         - try to fix Windows and WX builds (broken by SVG Fonts check-in)
2584
2585         * platform/graphics/win/FontWin.cpp:
2586         (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent, now that it requires it.
2587         I can't see how it can be right to require the font size for ascent and descent,
2588         but not for other metrics functions in FontData.
2589
2590         * platform/graphics/wx/FontWx.cpp:
2591         (WebCore::Font::drawGlyphs): Pass font size to FontData::ascent and FontData::descent.
2592
2593 2007-12-28  Dan Bernstein  <mitz@apple.com>
2594
2595         Reviewed by Mark Rowe.
2596
2597         - fix http://bugs.webkit.org/show_bug.cgi?id=16650
2598           <rdar://problem/5664872> REGRESSION (r28278-r28314): ATSUI uses LTR writing direction for all text runs
2599
2600         Covered by existing pixel tests.
2601
2602         * platform/graphics/mac/FontMac.mm:
2603         (WebCore::Font::drawComplexText): Corrected to maintain the style
2604         information in the adjusted text run when passing it to
2605         ATSUILayoutParameters. Prior to r28298 the style was passed separately.
2606
2607 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
2608
2609         Build fix, not reviewed.
2610
2611         Add wtf/OwnPtr.h include, to fix --svg-fonts build.
2612
2613         * css/SVGCSSFontFace.h:
2614
2615 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
2616
2617         Reviewed by Eric.
2618
2619         Fixes: http://bugs.webkit.org/show_bug.cgi?id=10649 (WebKit SVG needs SVG Fonts support)
2620
2621         Begin implementation of SVG Fonts module. Basic documents using SVG Fonts already work.
2622         Only local, in-document fonts who declare their glyphs using the <glyph d="..."> path syntax
2623         are supported. (<glyph> containing arbitary SVG content as child elements, not supported yet).
2624
2625         Limited to single char <-> glyph mapping, no ligatures supported yet.
2626         (ie. <glyph unicode='A'/> <glyph unicode='AB'/> - it ignores the 'AB' glyph definition for now)
2627
2628         Mark all SVG Font related classes & usages in ENABLE(SVG_FONTS) blocks.
2629
2630         No layout test changes for a --no-svg-fonts build, heavy changes if enabled. Because a lot of SVG Font
2631         attributes are not processed yet, the rendering looks wrong - hence disabled by default.)
2632
2633         * DerivedSources.make: Add SVGFontElement/SVGGlyphElement/SVGMissingGlyphElement
2634         * WebCore.pro: Updated build system.
2635         * WebCore.vcproj/WebCore.vcproj: Ditto.
2636         * WebCore.xcodeproj/project.pbxproj: Ditto.
2637         * bindings/js/JSSVGElementWrapperFactory.cpp: Add JSSVGFontElement/JSSVGGlyphElement/JSSVGMissingGlyphElement
2638         * bindings/objc/DOM.mm: Ditto (for DOMSVG*).
2639         (WebCore::createElementClassMap):
2640         * bindings/objc/DOMInternal.h: Ditto.
2641         * bindings/objc/DOMSVG.h: Ditto.
2642         * css/CSSFontFace.h: Mark three functions 'virtual', to be overriden by SVGCSSFontFace
2643         * css/CSSFontFaceSrcValue.h: Add functionality to identify as SVG CSS font face source.
2644         (WebCore::CSSFontFaceSrcValue::m_fontFaceElement): Hold a pointer to the font face which created it.
2645         (WebCore::CSSFontFaceSrcValue::svgFontFaceElement):
2646         (WebCore::CSSFontFaceSrcValue::setSVGFontFaceElement):
2647         * css/CSSFontSelector.cpp: Build 'SVGCSSFontFace' objects for local, in-document SVG fonts.
2648         (WebCore::CSSFontSelector::addFontFaceRule):
2649         * css/SVGCSSFontFace.cpp: Added. (Simplified implementation for SVG Fonts)
2650         (WebCore::SVGCSSFontFace::SVGCSSFontFace):
2651         (WebCore::SVGCSSFontFace::~SVGCSSFontFace):
2652         (WebCore::SVGCSSFontFace::isValid):
2653         (WebCore::SVGCSSFontFace::addSource):
2654         (WebCore::SVGCSSFontFace::getFontData):
2655         * css/SVGCSSFontFace.h: Added.
2656         * platform/graphics/cg/PathCG.cpp:
2657         (WebCore::Path::closeSubpath): Silence a CG warning when calling closeSubpath() on empty path.
2658         * platform/graphics/Font.cpp: Add some logic to call into SVG Font code when operating on SVG Fonts.
2659         (WebCore::Font::ascent): Pass font size to FontData::ascent() call
2660         (WebCore::Font::descent): Pass font size to FontData::descent() call
2661         (WebCore::Font::canUseGlyphCache): Always return true for SVG fonts here.
2662         (WebCore::Font::drawGlyphBuffer): Call drawGlyphsWithSVGFont (instead of drawGlyphs) if the primary font is a SVG font.
2663         * platform/graphics/Font.h: Add (SVG-only!) ability to store a RenderObject pointer, to the element which invoked the drawText() call.
2664         (WebCore::TextRun::TextRun):
2665         (WebCore::TextRun::referencingRenderObject):
2666         (WebCore::TextRun::setReferencingRenderObject):
2667         * platform/graphics/FontData.cpp:
2668         (WebCore::FontData::FontData):
2669         (WebCore::FontData::ascent):
2670         (WebCore::FontData::descent):
2671         * platform/graphics/FontData.h: Store a pointer to the SVGFontFaceElement, which created this FontData object - needed for drawGlyphsWithSVGFont().
2672         (WebCore::FontData::isSVGFont): Offer a way to determine wheter this is a FontData object, created by a SVGFontFaceElement.
2673         (WebCore::FontData::svgFontFace):
2674         * rendering/SVGInlineTextBox.cpp:
2675         (WebCore::SVGInlineTextBox::calculateGlyphWidth): Add assertion.
2676         * rendering/SVGRootInlineBox.cpp:
2677         (WebCore::svgTextRunForInlineTextBox): Always call 'setReferencingRenderObject(myRenderSVGText)' on the new TextRun
2678         * svg/SVGFont.cpp: Added.
2679         (WebCore::Font::drawGlyphsWithSVGFont): Outsourced implementation of SVG Fonts into it's own file.
2680         * svg/SVGFontElement.cpp: Added. (Note: this holds the GlyphHashMap which associates certain <glyph> objects with unicode values)
2681         (WebCore::SVGFontElement::SVGFontElement):
2682         (WebCore::SVGFontElement::~SVGFontElement):
2683         (WebCore::SVGFontElement::parseMappedAttribute):
2684         (WebCore::SVGFontElement::collectGlyphs):
2685         (WebCore::SVGFontElement::glyphIdentifierForGlyphCode):
2686         * svg/SVGFontElement.h: Added.
2687         (WebCore::GlyphHash::hash):
2688         (WebCore::GlyphHash::equal):
2689         (WebCore::GlyphHashTraits::deletedValue):
2690         (WebCore::SVGFontElement::rendererIsNeeded):
2691         (WebCore::SVGFontElement::contextElement):
2692         * svg/SVGFontElement.idl: Added.
2693         * svg/SVGFontFaceElement.cpp: Build SVG specific 'FontData' object
2694         (WebCore::SVGFontFaceElement::unitsPerEm):
2695         (WebCore::SVGFontFaceElement::fontFamily):
2696         (WebCore::SVGFontFaceElement::createFontData): Builds SVG specified 'FontData' object with the markup specified ascent/descent values etc..
2697         (WebCore::SVGFontFaceElement::rebuildFontFace): Construct CSSFontFaceSrc object (marked as 'isSVGFontFaceSrc') to satisfy CSSFontSelector::addFontFaceRule.
2698         (WebCore::SVGFontFaceElement::insertedIntoDocument): Rebuild font face.
2699         (WebCore::SVGFontFaceElement::glyphIdentifierForGlyphCode): Allows drawGlyphsWithSVGFont to access the glyph hash map living in the SVGFontElement.
2700         * svg/SVGFontFaceElement.h: Fixed code formatting issues & wrap in ENABLE(SVG_FONTS) blocks.
2701         * svg/SVGFontFaceElement.idl: Ditto.
2702         * svg/SVGFontFaceFormatElement.cpp: Ditto.
2703         * svg/SVGFontFaceFormatElement.h: Ditto.
2704         * svg/SVGFontFaceFormatElement.idl: Ditto.
2705         * svg/SVGFontFaceNameElement.cpp: Ditto.
2706         * svg/SVGFontFaceNameElement.h: Ditto.
2707         * svg/SVGFontFaceNameElement.idl: Ditto.
2708         * svg/SVGFontFaceSrcElement.cpp: Ditto.
2709         * svg/SVGFontFaceSrcElement.h: Ditto.
2710         * svg/SVGFontFaceSrcElement.idl: Ditto.
2711         * svg/SVGFontFaceUriElement.cpp: Ditto.
2712         * svg/SVGFontFaceUriElement.h: Ditto.
2713         * svg/SVGFontFaceUriElement.idl: Ditto.
2714         * svg/SVGDefinitionSrcElement.cpp: Ditto.
2715         * svg/SVGDefinitionSrcElement.h: Ditto.
2716         * svg/SVGDefinitionSrcElement.idl: Ditto.
2717         * svg/SVGGlyphElement.cpp: Added.
2718         (WebCore::SVGGlyphElement::SVGGlyphElement):
2719         (WebCore::SVGGlyphElement::parseMappedAttribute):
2720         (WebCore::SVGGlyphElement::childrenChanged):
2721         * svg/SVGGlyphElement.h: Added.
2722         (WebCore::SVGGlyphElement::rendererIsNeeded):
2723         (WebCore::SVGGlyphIdentifier::): Structure holding all data to represent a SVG glyph (origin, advance, orientation etc..)
2724         (WebCore::SVGGlyphIdentifier::SVGGlyphIdentifier):
2725         * svg/SVGGlyphElement.idl: Added.
2726         * svg/SVGMissingGlyphElement.cpp: Added. (stub implementation)
2727         (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
2728         (WebCore::SVGMissingGlyphElement::parseMappedAttribute):
2729         (WebCore::SVGMissingGlyphElement::childrenChanged):
2730         * svg/SVGMissingGlyphElement.h: Added.
2731         (WebCore::SVGMissingGlyphElement::rendererIsNeeded):
2732         * svg/SVGMissingGlyphElement.idl: Added.
2733         * svg/svgtags.in: Wrap all SVGFont* elements in ENABLE(SVG_FONTS) block - to assure --no-svg-fonts compilation works (which is the default for now!).
2734
2735 2007-12-27  Dan Bernstein  <mitz@apple.com>
2736
2737         Reviewed by Alexey Proskuryakov.
2738
2739         - fix http://bugs.webkit.org/show_bug.cgi?id=16628
2740           ASSERTION FAILED: m_resizeLayer (running layout tests)
2741
2742         * rendering/RenderLayer.cpp:
2743         (WebCore::RenderLayer::~RenderLayer): Avoid calling
2744         EventHandler::resizeLayerDestroyed() if the document is being destroyed.
2745
2746 2007-12-27  Dan Bernstein  <mitz@apple.com>
2747
2748         Reviewed by Oliver Hunt.
2749
2750         - fix http://bugs.webkit.org/show_bug.cgi?id=16603
2751           <rdar://problem/5664199> Crash when resizing text field
2752
2753         Test: fast/layers/resize-layer-deletion-crash.html
2754
2755         The event handler has only a weak reference to the layer that is
2756         currently in resize mode, so it is the layer's responsibility to let
2757         the event handler know if it has been destroyed while in that mode.
2758
2759         * page/EventHandler.cpp:
2760         (WebCore::EventHandler::resizeLayerDestroyed): Added. Resets
2761         m_resizeLayer to 0.
2762         * page/EventHandler.h:
2763         * rendering/RenderLayer.cpp:
2764         (WebCore::RenderLayer::~RenderLayer): Added a call to
2765         EventHandler::resizeLayerDestroyed() if the layer is in resize mode.
2766
2767 2007-12-27  Collin Jackson  <webkit@collinjackson.com>
2768
2769         Reviewed by Sam Weinig.
2770
2771         http://bugs.webkit.org/show_bug.cgi?id=16539
2772         <rdar://problem/5659269>
2773
2774         The same-origin check was missing in the implementation of 
2775         setTimeout, setInterval, addEventListener, and removeEventListener.
2776
2777         Suppose <http://www.badguy.com/> contains an iframe to 
2778         <http://www.goodguy.com/>. Now www.badguy.com can steal
2779         www.goodguy.com cookies by running this code:
2780
2781         setTimeout.call(frames[0], "alert(document.cookie)", 1000);
2782
2783         This patch changes the behavior so that setTimeout to does 
2784         nothing and returns an undefined value if the caller is not
2785         permitted to script the window whose setTimeout method is being
2786         called. The same applies to setInterval, addEventListener, and 
2787         removeEventListener.
2788
2789         Tests: http/tests/security/cross-frame-access-call.html
2790
2791         * bindings/js/kjs_window.cpp:
2792         (KJS::WindowProtoFuncSetTimeout::callAsFunction)
2793         (KJS::WindowProtoFuncSetInterval::callAsFunction)
2794         (KJS::WindowProtoFuncAddEventListener::callAsFunction)
2795         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction)
2796
2797 2007-12-27  Dan Bernstein  <mitz@apple.com>
2798
2799         Reviewed by Dave Hyatt and Sam Weinig.
2800
2801         - fix <rdar://problem/5605937> Inspector: Disclosure triangle not drawn in node's properties panel until click
2802
2803         Test: fast/layers/add-layer-with-nested-stacking.html
2804         Test: fast/layers/remove-layer-with-nested-stacking.html
2805
2806         * rendering/RenderLayer.cpp:
2807         (WebCore::RenderLayer::addChild): If the new child is overflow-only
2808         but has children of its own, dirty the stacking context's z-order lists
2809         since the grandchildren might need to be in them.
2810         (WebCore::RenderLayer::removeChild): Similarly for the old child.
2811
2812 2007-12-27  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
2813
2814         Reviewed by Alp Toker.
2815
2816         http://bugs.webkit.org/show_bug.cgi?id=16353
2817         [GTK] Check for deprecated API use (G_DISABLE_DEPRECATED etc.)
2818
2819         Added the flags mentioned in the bug only when doing 'debug'
2820         builds. -DGST_DISABLE_DEPRECATED only added when video is enabled.
2821
2822         * GNUmakefile.am:
2823         * WebCore.pro:
2824
2825 2007-12-27  Dan Bernstein  <mitz@apple.com>
2826
2827         Reviewed by Eric Seidel.
2828
2829         - fix http://bugs.webkit.org/show_bug.cgi?id=16490
2830           ASSERT in ~FrameView while viewing/reloading WICD test case
2831
2832         Test: fast/dynamic/paused-event-dispatch.html
2833
2834         * page/FrameView.cpp:
2835         (WebCore::FrameView::~FrameView):
2836         (WebCore::FrameView::layout): Changed to always pause event dispatch and
2837         always resume event dispatch, regardless of whether the post-layout
2838         task timer is active. However, if it is active, assert that event
2839         dispatch is still paused.
2840
2841 2007-12-27  Alexey Proskuryakov  <ap@webkit.org>
2842
2843         Reviewed by Maciej.
2844
2845         http://bugs.webkit.org/show_bug.cgi?id=14500
2846         need to be more generous about charset declaration with meta tag
2847         
2848         http://bugs.webkit.org/show_bug.cgi?id=12526
2849         <rdar://problem/4867183> Safari ignores encoding description "charset=Shift_JIS" in invalid html
2850
2851         <rdar://problem/4892428> Unlike other browsers, WebKit ignores <meta> charset definitions outside the head
2852
2853         <rdar://problem/5643774> REGRESSION: Text is garbled when clicking a link inside an Arabic website
2854
2855         Tests: fast/encoding/ahram-org-eg.html
2856                fast/encoding/bandai-co-jp-releases.html
2857                fast/encoding/floraexpress-ru.html
2858                fast/encoding/hanarei-blog32-fc2-com.html
2859                fast/encoding/yahoo-mail.html
2860
2861         * loader/TextResourceDecoder.cpp:
2862         (WebCore::TextResourceDecoder::checkForHeadCharset): Don't stop looking for <meta> until we've
2863         seen at least 512 bytes of input.
2864
2865 2007-12-26  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
2866
2867         Reviewed by Alp Toker.
2868
2869         http://bugs.webkit.org/show_bug.cgi?id=16390
2870         Use autotools or GNU make as the build system for the GTK port
2871
2872         * GNUmakefile.am: Added.
2873
2874 2007-12-26  Alexey Proskuryakov  <ap@webkit.org>
2875
2876         Reviewed by Sam Weinig.
2877
2878         http://bugs.webkit.org/show_bug.cgi?id=16609
2879         Make manual-tests/xmlhttprequest-contenttype-empty.html test automatic
2880
2881         * manual-tests/xmlhttprequest-contenttype-empty.html: Removed (moved to LayoutTests/http).
2882
2883 2007-12-26  Mark Rowe  <mrowe@apple.com>
2884
2885         Windows build fix.
2886
2887         * platform/Threading.h:
2888
2889 2007-12-25  Rob Buis  <buis@kde.org>
2890
2891         Reviewed by Eric.
2892
2893         http://bugs.webkit.org/show_bug.cgi?id=15514
2894         <clipPath> with <use> not respected
2895         http://bugs.webkit.org/show_bug.cgi?id=16557
2896         SVG circle elements have been clipped away completely, instead of partially.
2897
2898         Add toClipPath to get clip path data for the clipping paths. Implement it for <use>, thereby allowing clip paths using use.
2899
2900         * svg/SVGClipPathElement.cpp:
2901         (WebCore::SVGClipPathElement::canvasResource):
2902         * svg/SVGStyledTransformableElement.h:
2903         (WebCore::SVGStyledTransformableElement::toClipPath):
2904         * svg/SVGUseElement.cpp:
2905         (WebCore::isDirectReference):
2906         (WebCore::SVGUseElement::toClipPath):
2907         * svg/SVGUseElement.h:
2908
2909 2007-12-25  Sam Weinig  <sam@webkit.org>
2910
2911         Reviewed by Eric Seidel.
2912
2913         Clean up the files relating to NodeLists.
2914
2915         * dom/ChildNodeList.cpp:
2916         (WebCore::ChildNodeList::ChildNodeList):
2917         (WebCore::ChildNodeList::length):
2918         (WebCore::ChildNodeList::item):
2919         (WebCore::ChildNodeList::nodeMatches):
2920         * dom/ChildNodeList.h:
2921         * dom/DynamicNodeList.cpp:
2922         (WebCore::DynamicNodeList::itemForwardsFromCurrent):
2923         (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
2924         (WebCore::DynamicNodeList::itemWithName):
2925         * dom/DynamicNodeList.h:
2926         (WebCore::DynamicNodeList::needsNotifications):
2927         * dom/NameNodeList.cpp:
2928         (WebCore::NameNodeList::NameNodeList):
2929         (WebCore::NameNodeList::rootNodeAttributeChanged):
2930         (WebCore::NameNodeList::nodeMatches):
2931         * dom/NameNodeList.h:
2932         * dom/NodeList.h:
2933         * dom/SelectorNodeList.h:
2934
2935 2007-12-25  Sam Weinig  <sam@webkit.org>
2936
2937         Fix non-mac builds.
2938
2939         * WebCore.pro:
2940         * WebCore.vcproj/WebCore.vcproj:
2941         * WebCoreSources.bkl:
2942
2943 2007-12-25  Sam Weinig  <sam@webkit.org>
2944
2945         Rubber stamped by Eric Seidel.
2946
2947         Move TagNodeList into its own file.
2948
2949         * WebCore.xcodeproj/project.pbxproj:
2950         * dom/Node.cpp:
2951         * dom/TagNodeList.cpp: Copied from dom/Node.cpp.
2952         (WebCore::TagNodeList::TagNodeList):
2953         * dom/TagNodeList.h: Copied from dom/Node.cpp.
2954
2955 2007-12-25  Sam Weinig  <sam@webkit.org>
2956
2957         Reviewed by Eric Seidel.
2958
2959         Simplify the NodeList architecture.
2960         - Rename recursiveItem() to item(), since it is not recursive.
2961         - Make recursiveLength() iterative and rename to length().
2962         - Remove now unneeded overrides of item() and length() that used 
2963           to call the recursive variants.
2964
2965         * dom/ClassNodeList.cpp:
2966         * dom/ClassNodeList.h:
2967         * dom/DynamicNodeList.cpp:
2968         (WebCore::DynamicNodeList::length):
2969         (WebCore::DynamicNodeList::item):
2970         (WebCore::DynamicNodeList::rootNodeAttributeChanged): Move implementation 
2971         into the .cpp file since virtual methods can't be inlined.
2972         * dom/DynamicNodeList.h:
2973         * dom/NameNodeList.cpp:
2974         * dom/NameNodeList.h:
2975         * dom/Node.cpp:
2976
2977 2007-12-25  Alp Toker  <alp@atoker.com>
2978
2979         More complete GTK+/Qt/Wx/Win build fixes for breakage introduced in
2980         r28981.
2981
2982         * WebCore.pro:
2983         * WebCore.vcproj/WebCore.vcproj:
2984         * WebCoreSources.bkl:
2985
2986 2007-12-25  Alp Toker  <alp@atoker.com>
2987
2988         Win build fix for breakage introduced in r28981.
2989
2990         * WebCore.vcproj/WebCore.vcproj:
2991
2992 2007-12-25  Alp Toker  <alp@atoker.com>
2993
2994         Wx build fix for breakage introduced in r28981.
2995
2996         * WebCoreSources.bkl:
2997
2998 2007-12-25  Alp Toker  <alp@atoker.com>
2999
3000         GTK+/Qt build fix for breakage introduced in r28981.
3001
3002         * WebCore.pro:
3003
3004 2007-12-25  David Smith  <catfish.man@gmail.com> and Sam Weinig  <sam@webkit.org>
3005
3006         Reviewed by Oliver.
3007         
3008         - http://bugs.webkit.org/show_bug.cgi?id=16587
3009         Implement the most useful part of the W3C Selectors API.
3010
3011         * WebCore.xcodeproj/project.pbxproj:
3012         * css/CSSStyleSelector.h: Make Node a friend of CSSStyleSelector so it can use checkSelector()
3013         * dom/ChildNodeList.cpp:
3014         (WebCore::ChildNodeList::ChildNodeList): Change to being a DynamicNodeList
3015         * dom/ChildNodeList.h:
3016         * dom/ClassNodeList.cpp:
3017         (WebCore::ClassNodeList::ClassNodeList): Change to being a DynamicNodeList
3018         * dom/ClassNodeList.h:
3019         * dom/Document.idl: Add the new functions
3020         * dom/DynamicNodeList.cpp: Copied from WebCore/dom/NodeList.cpp.
3021         (WebCore::DynamicNodeList::DynamicNodeList): Rename NodeList to DynamicNodeList, to differentiate it from the new StaticNodeList
3022         (WebCore::DynamicNodeList::~DynamicNodeList):
3023         (WebCore::DynamicNodeList::recursiveLength):
3024         (WebCore::DynamicNodeList::itemForwardsFromCurrent):
3025         (WebCore::DynamicNodeList::itemBackwardsFromCurrent):
3026         (WebCore::DynamicNodeList::recursiveItem):
3027         (WebCore::DynamicNodeList::itemWithName):
3028         (WebCore::DynamicNodeList::rootNodeChildrenChanged):
3029         (WebCore::DynamicNodeList::Caches::Caches):
3030         (WebCore::DynamicNodeList::Caches::reset):
3031         * dom/DynamicNodeList.h: Copied from WebCore/dom/NodeList.h.
3032         (WebCore::DynamicNodeList::rootNodeAttributeChanged):
3033         * dom/Element.idl: Add the new functions
3034         * dom/NameNodeList.cpp: Change to being a DynamicNodeList
3035         (WebCore::NameNodeList::NameNodeList):
3036         * dom/NameNodeList.h:
3037         (WebCore::NameNodeList::rootNodeAttributeChanged):
3038         * dom/Node.cpp:
3039         (WebCore::TagNodeList::TagNodeList): Change to being a DynamicNodeList
3040         (WebCore::Node::registerDynamicNodeList):
3041         (WebCore::Node::unregisterDynamicNodeList):
3042         (WebCore::Node::getElementsByName):
3043         (WebCore::Node::getElementsByClassName):
3044         (WebCore::Node::querySelector): new
3045         (WebCore::Node::querySelectorAll): new
3046         * dom/Node.h:
3047         * dom/NodeList.cpp: Removed.
3048         * dom/NodeList.h: This is now an abstract superclass of DynamicNodeList and StaticNodeList
3049         (WebCore::NodeList::NodeList):
3050         (WebCore::NodeList::~NodeList):
3051         * dom/SelectorNodeList.cpp: Added.
3052         (WebCore::SelectorNodeList::SelectorNodeList): New StaticNodeList subclass that filters elements by CSS selector
3053         * dom/SelectorNodeList.h: Added.
3054         * dom/StaticNodeList.cpp: Added.
3055         (WebCore::StaticNodeList::length):
3056         (WebCore::StaticNodeList::item):
3057         (WebCore::StaticNodeList::itemWithName):
3058         * dom/StaticNodeList.h: Added.
3059         (WebCore::StaticNodeList::StaticNodeList):
3060         (WebCore::StaticNodeList::~StaticNodeList):
3061
3062 2007-12-25  Mark Rowe  <mrowe@apple.com>
3063
3064         Reviewed by Sam Weinig.
3065
3066         Implement a lock-free ThreadSafeShared for i386, x86_64, ppc and ppc64.
3067         http://bugs.webkit.org/show_bug.cgi?id=16596
3068
3069         This is a 1.7x as fast as the lock-based implementation on x86 for a single-threaded use
3070         of ThreadSafeShared but is closer to 280x as fast when there is heavy concurrent multi-threaded
3071         access to a single ThreadSafeShared object.
3072
3073         The atomic operations are based on those used by the Boost C++ library's shared_ptr implementation.
3074
3075         * platform/Threading.h:
3076         (WebCore::atomicIncrement):
3077         (WebCore::atomicDecrement):
3078         (WebCore::ThreadSafeShared::ThreadSafeShared):
3079         (WebCore::ThreadSafeShared::ref): Use lock-free operations if available.
3080         (WebCore::ThreadSafeShared::deref): Ditto.
3081         (WebCore::ThreadSafeShared::hasOneRef):
3082         (WebCore::ThreadSafeShared::refCount):
3083         (WebCore::ThreadSafeShared::isThreadSafe):
3084
3085 2007-12-24  Darin Adler  <darin@apple.com>
3086
3087         * platform/text/PlatformString.h: Removed now-incorrect comment.
3088         Added a comment about copy().
3089         * platform/text/StringImpl.h: Added a comment about copy().
3090
3091 2007-12-24  Darin Adler  <darin@apple.com>
3092
3093         Reviewed by Maciej.
3094
3095         - http://bugs.webkit.org/show_bug.cgi?id=16550
3096           make StringImpl immutable
3097
3098         I tried to keep the changes to a minimum. In some cases there is
3099         room for optimization -- I didn't try to add in the "single ref count"
3100         optimizations and there might be a tiny bit more string copying than
3101         we had before.
3102
3103         * WebCore.base.exp: Updated.
3104
3105         * dom/CharacterData.cpp:
3106         (WebCore::CharacterData::appendData): Changed to use String since
3107         StringImpl doesn't have mutating functions any more.
3108         (WebCore::CharacterData::insertData): Ditto.
3109         (WebCore::CharacterData::deleteData): Ditto.
3110         (WebCore::CharacterData::replaceData): Ditto.
3111         * dom/Text.cpp:
3112         (WebCore::Text::splitText): Changed to use substring instead of
3113         remove since StringImpl does't have mutating functions any more.
3114         * editing/CompositeEditCommand.cpp:
3115         (WebCore::CompositeEditCommand::deleteInsignificantText): Changed
3116         to use String instead of StringImpl so we can use remove.
3117
3118         * platform/text/PlatformString.h: Removed newUninitialized.
3119         Added append that takes a character pointer and length.
3120
3121         * platform/text/String.cpp:
3122         (WebCore::String::insert): Added an implementation that does not
3123         rely on an underlying StringImpl function.
3124         (WebCore::String::append): Ditto.
3125         (WebCore::String::truncate): Ditto.
3126         (WebCore::String::remove): Ditto.
3127         (WebCore::String::charactersWithNullTermination): Added an
3128         implementation that uses the new StringImpl null termination feature,
3129         which does not require modifying a string.
3130
3131         * platform/text/StringImpl.cpp:
3132         (WebCore::isSpace): Fix comment.
3133         (WebCore::StringImpl::StringImpl): Added a new constructor that makes
3134         a string with a trailing null character.
3135         (WebCore::StringImpl::substring): Marked const.
3136         (WebCore::StringImpl::replace): Marked const; had to add quite a few
3137         const_cast. Also rewrote one of these to work without modifying the
3138         existing string.
3139
3140         * platform/text/StringImpl.h: Fixed a mistake where the empty string had
3141         m_hasTerminatingNullCharacter uninitialized. Added a type and constructor
3142         for creating strings that have a trailing null character. Added a
3143         hasTerminatingNullCharacter function. Removed newUninitialized,
3144         charactersWithNullTermination, append, insert, truncate, and remove.
3145         Marked lots of other functions const.
3146
3147         * platform/text/TextCodecLatin1.cpp:
3148         (WebCore::TextCodecLatin1::decode): Rewrote to use a Vector instead of
3149         newUninitialized.
3150         * platform/text/TextCodecUTF16.cpp:
3151         (WebCore::TextCodecUTF16::decode): Ditto.
3152         * platform/text/TextCodecUserDefined.cpp:
3153         (WebCore::TextCodecUserDefined::decode): Ditto.
3154
3155         * rendering/RenderStyle.cpp:
3156         (WebCore::RenderStyle::setContent): Changed to use String since
3157         StringImpl doesn't have mutating functions any more.
3158
3159 2007-12-24  Alexey Proskuryakov  <ap@webkit.org>
3160
3161         Reviewed by Oliver.
3162
3163         Fix fast/events/arrow-keys-on-body.html, failing on Windows.
3164
3165         * platform/win/KeyEventWin.cpp:
3166         (WebCore::isKeypadEvent):
3167         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3168         Use HIWORD() macro instead of shifting the value explicitly (no change in behavior).
3169
3170 2007-12-23  Alexey Proskuryakov  <ap@webkit.org>
3171
3172         Fix Debug and Release QTMovieWin bulds.
3173
3174         * WebCore.vcproj/QTMovieWin.vcproj:
3175         * WebCore.vcproj/debug.vsprops:
3176         * WebCore.vcproj/debug_internal.vsprops:
3177         * WebCore.vcproj/release.vsprops:
3178         Use LibraryConfigSuffix instead of WebKitConfigSuffix for pthreadVC2.
3179         Build release import lib into \lib, not \bin.
3180
3181 2007-12-23  Alp Toker  <alp@atoker.com>
3182
3183         Reviewed by Holger Freyther.
3184
3185         http://bugs.webkit.org/show_bug.cgi?id=15382
3186         [CAIRO] Canvas pattern support
3187
3188         http://bugs.webkit.org/show_bug.cgi?id=16577
3189         Merge Cairo enhancements from Apollo project
3190
3191         Add support for canvas patterns.
3192
3193         Make Image::nativeImageForCurrentFrame() public.
3194
3195         Fix some typos along the way.
3196
3197         The globalAlpha canvas fixes are not included in this patch as
3198         they're slightly more intrusive and may conflict conceptually with
3199         GraphicsContext::setAlpha().
3200
3201         * html/CanvasPattern.cpp:
3202         (WebCore::CanvasPattern::CanvasPattern):
3203         (WebCore::CanvasPattern::~CanvasPattern):
3204         (WebCore::CanvasPattern::createPattern):
3205         * html/CanvasPattern.h:
3206         (WebCore::CanvasPattern::platformImage):
3207         * html/CanvasRenderingContext2D.cpp:
3208         (WebCore::CanvasRenderingContext2D::setShadow):
3209         (WebCore::CanvasRenderingContext2D::applyShadow):
3210         (WebCore::CanvasRenderingContext2D::drawImage):
3211         (WebCore::CanvasRenderingContext2D::createPattern):
3212         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
3213         (WebCore::CanvasRenderingContext2D::applyFillPattern):
3214         * platform/graphics/Image.h:
3215         (WebCore::Image::nativeImageForCurrentFrame):
3216
3217 2007-12-23  Kevin Ollivier  <kevino@theolliviers.com>
3218
3219         Reviewed by Eric Seidel.
3220
3221         Remove getWxBitmap as we have nativeImageForCurrentFrame now,
3222         and don't draw a border in fillRect.
3223
3224         * platform/graphics/BitmapImage.h:
3225         * platform/graphics/wx/GraphicsContextWx.cpp:
3226         (WebCore::GraphicsContext::fillRect):
3227         * platform/graphics/wx/ImageWx.cpp:
3228
3229 2007-12-23  Alp Toker  <alp@atoker.com>
3230
3231         Reviewed by Holger Freyther.
3232
3233         http://bugs.webkit.org/show_bug.cgi?id=16577
3234         Merge Cairo enhancements from Apollo project
3235
3236         This patch is based on initial merging work by Brent Fulgham. Adobe's
3237         code has been modified in a few places to better suit the existing
3238         coding style.
3239
3240         Implement more clipping and drawing functions.
3241
3242         Save and restore the fill rule manually when clipping.
3243
3244         Avoid image surface creation when the image buffer has height zero.
3245
3246         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3247         (WebCore::GraphicsContext::clip):
3248         (WebCore::GraphicsContext::addInnerRoundedRectClip):
3249         (WebCore::GraphicsContext::addPath):
3250         (WebCore::GraphicsContext::clipOut):
3251         (WebCore::GraphicsContext::clipOutEllipseInRect):
3252         (WebCore::GraphicsContext::fillRoundedRect):
3253         * platform/graphics/cairo/ImageSourceCairo.cpp:
3254         (WebCore::ImageSource::createFrameAtIndex):
3255
3256 2007-12-23  Nikolas Zimmermann  <zimmermann@kde.org>
3257
3258         Reviewed by Mark.
3259
3260         Fix wrong placed ifdef - wrapping SVGDefsElement, instead of SVGDefinitionSrcElement in SVG_FONTS block.
3261
3262         * bindings/objc/DOM.mm:
3263         (WebCore::createElementClassMap):
3264
3265 2007-12-22  Alp Toker  <alp@atoker.com>
3266
3267         GTK+ build fix
3268
3269         GTK_TARGET_OTHER_APP is not available in older GTK+ versions. Pass
3270         empty target flags for now.
3271
3272         Check GTK+, not GLib versions, since they are different.
3273
3274         * platform/gtk/PasteboardGtk.cpp:
3275         (WebCore::Pasteboard::documentFragment):
3276
3277 2007-12-22  Luca Bruno  <lethalman88@gmail.com>
3278
3279         Reviewed by Alp Toker.
3280
3281         http://bugs.webkit.org/show_bug.cgi?id=16311
3282         [Gtk] Copy rich text to clipboard as text/plain and text/html.
3283
3284         Hook into the WebView to get the correct clipboard object on the
3285         appropriate display. This is necessary because GTK+ does not have
3286         global clipboards.
3287
3288         * WebCore.pro:
3289         * platform/Pasteboard.h:
3290         (WebCore::Pasteboard::setHelper): added for GTK
3291         (WebCore::Pasteboard::m_helper): private added for GTK
3292         * platform/gtk/PasteboardGtk.cpp:
3293         (WebCore::PasteboardSelectionData): added to support GTK selection data callback
3294         (WebCore::clipboard_get_contents_cb): added
3295         (WebCore::clipboard_clear_contents_cb): added
3296         (WebCore::Pasteboard::~Pasteboard):
3297         (WebCore::Pasteboard::setHelper):
3298         (WebCore::Pasteboard::writeSelection): copy rich text
3299         (WebCore::Pasteboard::documentFragment): 
3300         (WebCore::Pasteboard::plainText): 
3301         * platform/gtk/PasteboardHelper.h: Added.
3302
3303 2007-12-22  Nikolas Zimmermann  <zimmermann@kde.org>
3304
3305         Reviewed by Oliver.
3306
3307         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15966 (Crash in SVGRootInlineBox::walkTextChunks() on mouse hover)
3308
3309         Add new isSVGRootInlineBox() function to InlineBox to be able to differentiate between RootInlineBox/SVGRootInlineBox.
3310         SVG assumed it's root inline box (for <text> elements) is always of type SVGRootInlineBox, which is not the case
3311         for HTML text in <foreignObject>. Text selection doesn't work so far as line box offsets are wrong - which is visible
3312         in Web Inspector.
3313
3314         * rendering/InlineBox.h:
3315         (WebCore::InlineBox::isSVGRootInlineBox):
3316         * rendering/SVGInlineTextBox.cpp:
3317         (WebCore::SVGInlineTextBox::svgRootInlineBox):
3318         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
3319         (WebCore::SVGInlineTextBox::selectionRect):
3320         * rendering/SVGRenderTreeAsText.cpp:
3321         (WebCore::writeSVGInlineTextBox):
3322         * rendering/SVGRootInlineBox.h:
3323         (WebCore::SVGRootInlineBox::isSVGRootInlineBox):
3324
3325 2007-12-22  Alp Toker  <alp@atoker.com>
3326
3327         LOW_BANDWIDTH_DISPLAY build fix
3328
3329         Track recent KURL DeprecatedString changes.
3330
3331         * loader/FrameLoader.cpp:
3332         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
3333
3334 2007-12-22  Dan Bernstein  <mitz@apple.com>
3335
3336         - Windows build fix
3337
3338         * WebCore.vcproj/WebCore.vcproj:
3339
3340 2007-12-22  Xan Lopez  <xan@gnome.org>
3341
3342         Reviewed by Alp Toker.
3343
3344         Add missing return 0 to fix a compile warning.
3345
3346         * page/gtk/FrameGtk.cpp:
3347         (WebCore::Frame::createScriptInstanceForWidget):
3348
3349 2007-12-21  Antti Koivisto  <antti@apple.com>
3350
3351         Reviewed by Darin, Adam and Steve.
3352
3353         Add media playback support for Windows.
3354         
3355         The implementation uses low level QuickTime API. DLL is
3356         needed to work around CF use in both WebKit and QuickTime.
3357         
3358         This makes Windows build depend on the QuickTime SDK 
3359         
3360         http://developer.apple.com/quicktime/download/
3361         
3362         but not QuickTime itself.
3363         
3364         QTMovieWinTimer contains some copy code from SharedTimerWin. It
3365         is used in the QuickTime access DLL which can't use WebCore
3366         SharedTimer due to dependency problems.
3367
3368         * WebCore.vcproj/QTMovieWin.vcproj: Added.
3369         * WebCore.vcproj/WebCore.vcproj:
3370         * WebCore.vcproj/build-generated-files.sh:
3371         * html/HTMLMediaElement.cpp:
3372         (WebCore::HTMLMediaElement::setSrc):
3373         * platform/graphics/MediaPlayer.cpp:
3374         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: Added.
3375         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
3376         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
3377         (WebCore::MediaPlayerPrivate::load):
3378         (WebCore::MediaPlayerPrivate::play):
3379         (WebCore::MediaPlayerPrivate::pause):
3380         (WebCore::MediaPlayerPrivate::duration):
3381         (WebCore::MediaPlayerPrivate::currentTime):
3382         (WebCore::MediaPlayerPrivate::seek):
3383         (WebCore::MediaPlayerPrivate::doSeek):
3384         (WebCore::MediaPlayerPrivate::cancelSeek):
3385         (WebCore::MediaPlayerPrivate::seekTimerFired):
3386         (WebCore::MediaPlayerPrivate::setEndTime):
3387         (WebCore::MediaPlayerPrivate::startEndPointTimerIfNeeded):
3388         (WebCore::MediaPlayerPrivate::endPointTimerFired):
3389         (WebCore::MediaPlayerPrivate::paused):
3390         (WebCore::MediaPlayerPrivate::seeking):
3391         (WebCore::MediaPlayerPrivate::naturalSize):
3392         (WebCore::MediaPlayerPrivate::hasVideo):
3393         (WebCore::MediaPlayerPrivate::setVolume):
3394         (WebCore::MediaPlayerPrivate::setMuted):
3395         (WebCore::MediaPlayerPrivate::setRate):
3396         (WebCore::MediaPlayerPrivate::dataRate):
3397         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
3398         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
3399         (WebCore::MediaPlayerPrivate::maxTimeLoaded):
3400         (WebCore::MediaPlayerPrivate::bytesLoaded):
3401         (WebCore::MediaPlayerPrivate::totalBytesKnown):
3402         (WebCore::MediaPlayerPrivate::totalBytes):
3403         (WebCore::MediaPlayerPrivate::cancelLoad):
3404         (WebCore::MediaPlayerPrivate::updateStates):
3405         (WebCore::MediaPlayerPrivate::didEnd):
3406         (WebCore::MediaPlayerPrivate::setRect):
3407         (WebCore::MediaPlayerPrivate::setVisible):
3408         (WebCore::MediaPlayerPrivate::paint):
3409         (WebCore::MediaPlayerPrivate::getSupportedTypes):
3410         (WebCore::MediaPlayerPrivate::movieEnded):
3411         (WebCore::MediaPlayerPrivate::movieLoadStateChanged):
3412         (WebCore::MediaPlayerPrivate::movieTimeChanged):
3413         (WebCore::MediaPlayerPrivate::movieNewImageAvailable):
3414         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: Added.
3415         (WebCore::MediaPlayerPrivate::networkState):
3416         (WebCore::MediaPlayerPrivate::readyState):
3417         * platform/graphics/win/QTMovieWin.cpp: Added.
3418         (updateTaskTimer):
3419         (QTMovieWinPrivate::QTMovieWinPrivate):
3420         (QTMovieWinPrivate::~QTMovieWinPrivate):
3421         (taskTimerFired):
3422         (QTMovieWinPrivate::startTask):
3423         (QTMovieWinPrivate::endTask):
3424         (QTMovieWinPrivate::task):
3425         (QTMovieWinPrivate::registerDrawingCallback):
3426         (QTMovieWinPrivate::drawingComplete):
3427         (QTMovieWinPrivate::createGWorld):
3428         (QTMovieWinPrivate::setSize):
3429         (QTMovieWinPrivate::deleteGWorld):
3430         (QTMovieWin::QTMovieWin):
3431         (QTMovieWin::~QTMovieWin):
3432         (QTMovieWin::play):
3433         (QTMovieWin::pause):
3434         (QTMovieWin::rate):
3435         (QTMovieWin::setRate):
3436         (QTMovieWin::duration):
3437         (QTMovieWin::currentTime):
3438         (QTMovieWin::setCurrentTime):
3439         (QTMovieWin::setVolume):
3440         (QTMovieWin::setMuted):
3441         (QTMovieWin::dataSize):
3442         (QTMovieWin::maxTimeLoaded):
3443         (QTMovieWin::loadState):
3444         (QTMovieWin::getNaturalSize):
3445         (QTMovieWin::setSize):
3446         (QTMovieWin::setVisible):
3447         (QTMovieWin::paint):
3448         (QTMovieWin::load):
3449         (movieDrawingCompleteProc):
3450         (initializeSupportedTypes):
3451         (QTMovieWin::countSupportedTypes):
3452         (QTMovieWin::getSupportedType):
3453         (QTMovieWin::initializeQuickTime):
3454         (DllMain):
3455         * platform/graphics/win/QTMovieWin.h: Added.
3456         * platform/graphics/win/QTMovieWinTimer.cpp: Added.
3457         (TimerWindowWndProc):
3458         (initializeOffScreenTimerWindow):
3459         (setSharedTimerFiredFunction):
3460         (timerFired):
3461         (setSharedTimerFireDelay):
3462         (stopSharedTimer):
3463         (setSharedTimerInstanceHandle):
3464         (systemTime):
3465         * platform/graphics/win/QTMovieWinTimer.h: Added.
3466         * rendering/RenderMedia.cpp:
3467         (WebCore::MediaControlPlayButtonElement::update):
3468
3469 2007-12-21  Brent Fulgham  <bfulgham@gmail.com>
3470
3471         Reviewed by Alp Toker.
3472
3473         http://bugs.webkit.org/show_bug.cgi?id=16558
3474         Cairo WebCore Rendering Fails on arc drawing
3475
3476         Fix for bug reported (and patched) by Apollo team in which
3477         arcs were draw in reverse (resulting in inverted images).
3478         Review of the source found that the 'clockwise' term was
3479         actually meant to mean 'anticlockwise' so the IDL and
3480         supporting classes have been changed to match this. 
3481
3482         * html/CanvasRenderingContext2D.cpp:
3483         (WebCore::CanvasRenderingContext2D::arc):
3484         * html/CanvasRenderingContext2D.idl:
3485         * platform/graphics/cairo/PathCairo.cpp:
3486         (WebCore::Path::addArc):
3487         (WebCore::Path::addEllipse):
3488         * platform/graphics/Path.h:
3489
3490 2007-12-21  Alexey Proskuryakov  <ap@webkit.org>
3491
3492         Reviewed by Oliver.
3493
3494         <rdar://problem/5629995> Incorrect display of Danish characters on web site.
3495
3496         Test: http/tests/xmlhttprequest/response-encoding.html
3497
3498         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData):
3499         Default to UTF-8 for HTML, too. It's unfortunate that we have to use different
3500         rules for main content and XHR responses, but this matches both IE and Firefox.
3501
3502 2007-12-20  Jon Honeycutt  <jhoneycutt@apple.com>
3503
3504         Reviewed by Kevin Decker.
3505
3506         <rdar://problem/5655797> REGRESSION(304-306A10) Safari does not find
3507         shockwave plugin on freshly installed OS
3508
3509         Look for Director plugin in its native directory.
3510
3511         * plugins/win/PluginDatabaseWin.cpp:
3512         (WebCore::PluginDatabaseWin::getPluginsInPaths): The Director plugin
3513         doesn't start with "np," so special case its filename.
3514         (WebCore::addMacromediaPluginPaths): Add Flash and "Shockwave 10"
3515         directories to the plugin paths.
3516         (WebCore::PluginDatabaseWin::defaultPluginPaths):
3517
3518 2007-12-20  Peter Kasting  <zerodpx@gmail.com>
3519
3520         Reviewed by Alp Toker.
3521
3522         http://bugs.webkit.org/show_bug.cgi?id=16508
3523         Fix regression in GIFImageDecoder.cpp: "Haeberli hack" led to wrongly
3524         decoded transparent areas.
3525
3526         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3527         (WebCore::GIFImageDecoder::haveDecodedRow):
3528         * platform/image-decoders/gif/GIFImageDecoder.h:
3529         * platform/image-decoders/gif/GIFImageReader.cpp:
3530         (GIFImageReader::output_row):
3531
3532 2007-12-20  Justin Garcia  <justin.garcia@apple.com>
3533
3534         Reviewed by Oliver Hunt.
3535
3536         <rdar://problem/5543472> GoogleDocs: Safari hangs when creating a list from a particular selection
3537         
3538         Still need to fix similar issues with the other operations that iterate 
3539         over selected paragraphs, like FormatBlock, Indent and Outdent (<rdar://problem/5658933>).
3540
3541         * editing/IndentOutdentCommand.cpp:
3542         (WebCore::IndentOutdentCommand::indentRegion): Added a FIXME.
3543         * editing/IndentOutdentCommand.h: Removed an unused function.
3544         * editing/InsertListCommand.cpp:
3545         (WebCore::InsertListCommand::modifyRange): 
3546         Renamed visibleStart to startOfSelection and visibleEnd to endOfSelection.
3547         Call the new selectionForParagraphIteration, which a) prevents operations like this
3548         one from being performed on a table that isn't fully selected (where the selection
3549         starts just before the table and ends inside it), and b) helps prevent paragraph
3550         iteration from going past the end of the selection.
3551         Call the new startOfNextParagraph, instead of using endOfParagraph(v).next(),
3552         since when v is in the last paragraph of the last cell of a table, that expression 
3553         will return the position after the table, not the start of the next paragraph.
3554         * editing/htmlediting.cpp:
3555         (WebCore::enclosingListChild): Don't go above a table cell, so that list operations
3556         take effect inside the table cell where they are performed.
3557         (WebCore::selectionForParagraphIteration): Added, see above.
3558         (WebCore::indexForVisiblePosition): Moved from IndentOutdentCommand.cpp.
3559         * editing/htmlediting.h:
3560         * editing/visible_units.cpp:
3561         (WebCore::startOfNextParagraph): Added, see above.
3562         * editing/visible_units.h:
3563         * editing/TextIterator.h:
3564         (WebCore::TextIterator::exitNode): Added a FIXME.
3565
3566 2007-12-20  Alp Toker  <alp@atoker.com>
3567