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