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