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