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