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