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