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