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