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