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