1 2008-02-29 Brent Fulgham <bfulgham@gmail.com>
3 http://bugs.webkit.org/show_bug.cgi?id=17483
4 Implement scrollbars on Windows (Cairo)
6 Reviewed by Adam Roben.
8 * platform/win/PlatfromScrollBarWin.cpp: Duplicate implementation
9 from PlatformScrollBarWinSafari.cpp, then modify to use the
10 native Windows theme engine. Use SOFT_LINK. Use platform
11 'GetSystemMetrics' call to decide size of scrollbars and buttons.
13 2008-02-29 Adam Roben <aroben@apple.com>
17 * WebCore.vcproj/WebCore.vcproj: Remove bridge/* from the include path
18 and the post-build event, and add page/win to each. Also let VS have
19 its way with the order of the files.
20 * page/win/PageWin.cpp: Copied from bridge/win/PageWin.cpp in r30673
21 * page/win/GlobalHistoryWin.cpp: Copied from
22 bridge/win/GlobalHistoryWin.cpp in r30673
24 2008-02-29 Anders Carlsson <andersca@apple.com>
28 * WebCore.xcodeproj/project.pbxproj:
30 2008-02-29 Mark Rowe <mrowe@apple.com>
32 Reviewed by Tim Hatcher.
36 * platform/graphics/mac/SimpleFontDataMac.mm:
37 (WebCore::pathFromFont): Provide stub implementation of pathFromFont for 64-bit as
38 FMGetATSFontRefFromFont is not available.
40 2008-02-29 Mark Rowe <mrowe@apple.com>
42 Build fix. Only declare pathFromFont in debug builds as it is unused in release builds.
44 * platform/graphics/mac/SimpleFontDataMac.mm:
46 2008-02-29 Anders Carlsson <andersca@apple.com>
50 Copy the remaining files in bridge/ over to page/
52 * WebCore.vcproj/WebCore.vcproj:
53 * WebCore.xcodeproj/project.pbxproj:
55 * bridge/AXObjectCache.h: Removed.
56 * bridge/EditorClient.h: Removed.
57 * bridge/GlobalHistory.h: Removed.
58 * bridge/win: Removed.
59 * bridge/win/FrameCGWin.cpp: Removed.
60 * bridge/win/FrameCairoWin.cpp: Removed.
61 * bridge/win/FrameWin.cpp: Removed.
62 * bridge/win/FrameWin.h: Removed.
63 * bridge/win/GlobalHistoryWin.cpp: Removed.
64 * bridge/win/PageWin.cpp: Removed.
65 * page/AXObjectCache.h: Copied from bridge/AXObjectCache.h.
66 * page/EditorClient.h: Copied from bridge/EditorClient.h.
67 * page/GlobalHistory.h: Copied from bridge/GlobalHistory.h.
68 * page/win/FrameCGWin.cpp: Copied from bridge/win/FrameCGWin.cpp.
69 * page/win/FrameCairoWin.cpp: Copied from bridge/win/FrameCairoWin.cpp.
70 * page/win/FrameWin.cpp: Copied from bridge/win/FrameWin.cpp.
71 * page/win/FrameWin.h: Copied from bridge/win/FrameWin.h.
73 2008-02-29 Robert Blaut <webkit@blaut.biz>
75 Reviewed by Darin Adler.
77 - fix http://bugs.webkit.org/show_bug.cgi?id=17532
78 Webkit imports styles from <link> element which doesn't have rel=stylesheet defined
80 Test: fast/html/link-rel-stylesheet.html
82 * html/HTMLLinkElement.cpp:
83 (WebCore::HTMLLinkElement::process):
85 2008-02-29 Mark Rowe <mrowe@apple.com>
87 Reviewed by Anders Carlsson.
89 Replace use of WKPathFromFont with implementation in terms of public API.
91 * WebCore.base.exp: Remove unused symbol.
92 * platform/graphics/mac/SimpleFontDataMac.mm:
93 (WebCore::initFontData):
94 (WebCore::pathFromFont): Implement pathFromFont in terms of public API.
95 (WebCore::SimpleFontData::platformInit):
96 * platform/mac/WebCoreSystemInterface.h: Remove unused symbol.
97 * platform/mac/WebCoreSystemInterface.mm: Ditto.
99 2008-02-29 Anders Carlsson <andersca@apple.com>
103 Move a bunch of files from bridge/mac to page/mac.
105 * WebCore.xcodeproj/project.pbxproj:
106 * bridge/mac: Removed.
107 * bridge/mac/AXObjectCacheMac.mm: Removed.
108 * bridge/mac/GlobalHistoryMac.mm: Removed.
109 * bridge/mac/WebCoreAXObject.h: Removed.
110 * bridge/mac/WebCoreAXObject.mm: Removed.
111 * bridge/mac/WebCoreScriptDebugger.h: Removed.
112 * bridge/mac/WebCoreScriptDebugger.mm: Removed.
113 * page/mac/AXObjectCacheMac.mm: Copied from bridge/mac/AXObjectCacheMac.mm.
114 * page/mac/GlobalHistoryMac.mm: Copied from bridge/mac/GlobalHistoryMac.mm.
115 * page/mac/WebCoreAXObject.h: Copied from bridge/mac/WebCoreAXObject.h.
116 * page/mac/WebCoreAXObject.mm: Copied from bridge/mac/WebCoreAXObject.mm.
117 * page/mac/WebCoreScriptDebugger.h: Copied from bridge/mac/WebCoreScriptDebugger.h.
118 * page/mac/WebCoreScriptDebugger.mm: Copied from bridge/mac/WebCoreScriptDebugger.mm.
120 2008-02-29 David Hyatt <hyatt@apple.com>
122 Fix for http://bugs.webkit.org/show_bug.cgi?id=17559, media query tests crashing under
123 guard malloc. Pass along the style selector so it can be accessed, since it has not yet
124 been assigned into the document's member variable.
128 * css/CSSStyleSelector.cpp:
129 (WebCore::CSSRuleSet::addRulesFromSheet):
130 * css/MediaQueryEvaluator.cpp:
131 (WebCore::MediaQueryEvaluator::eval):
132 * css/MediaQueryEvaluator.h:
134 2008-02-29 David Hyatt <hyatt@apple.com>
136 <rdar://problem/5755916> REGRESSION: Loading HTML5 spec is 5x slower on TOT than in 3.0.4
138 Improve the performance of dynamic sibling and CSS3 selectors so that there is no slowdown any more.
139 Be more precise in terms of what nodes we mark dirty.
143 * css/CSSStyleSelector.cpp:
144 (WebCore::CSSStyleSelector::checkSelector):
146 (WebCore::Element::recalcStyle):
147 (WebCore::checkForSiblingStyleChanges):
148 (WebCore::Element::childrenChanged):
149 (WebCore::Element::finishParsingChildren):
150 * rendering/RenderStyle.cpp:
151 (WebCore::RenderStyle::RenderStyle):
152 * rendering/RenderStyle.h:
153 (WebCore::RenderStyle::childrenAffectedByPositionalRules):
154 (WebCore::RenderStyle::childrenAffectedByDirectAdjacentRules):
155 (WebCore::RenderStyle::setChildrenAffectedByDirectAdjacentRules):
157 2008-02-29 Alexey Proskuryakov <ap@webkit.org>
161 <rdar://problem/5766352> REGRESSION (r27151): XMLHttpRequest.abort() resets response status
163 Test: http/tests/xmlhttprequest/status-after-abort.html
165 * xml/XMLHttpRequest.cpp:
166 (WebCore::XMLHttpRequest::getStatus):
167 (WebCore::XMLHttpRequest::getStatusText):
168 Changed to match Firefox more closely (IE just raises an exception in most of those cases).
170 2008-02-29 Dan Bernstein <mitz@apple.com>
172 Reviewed by Darin Adler.
174 - fix a bug where explicit embedding past the end of a line could
175 affect text that line
177 Test: fast/text/embed-at-end-of-pre-wrap-line.html
179 * rendering/bidi.cpp:
180 (WebCore::RenderBlock::skipWhitespace): Removed calls to
181 setAdjustEmbedding().
182 (WebCore::RenderBlock::findNextLineBreak): Added calls to
183 setAdjustEmbedding() around skipWhitespace() only where needed.
185 2008-02-29 Mark Rowe <mrowe@apple.com>
187 Reviewed by Oliver Hunt.
189 Don't use WKSupportsMultipartXMixedReplace on Leopard as multipart/x-mixed-replace is always handled by NSURLRequest.
191 * platform/mac/WebCoreSystemInterface.h: Don't declare WKSupportsMultipartXMixedReplace on Leopard.
192 * platform/mac/WebCoreSystemInterface.mm: Ditto.
193 * platform/network/mac/ResourceRequestMac.mm:
194 (WebCore::ResourceRequest::doUpdatePlatformRequest): Don't call WKSupportsMultipartXMixedReplace on Leopard.
195 * WebCore.Tiger.exp: Move Tiger-only symbol here.
198 2008-02-29 Mark Rowe <mrowe@apple.com>
200 Rubber-stamped by Eric Seidel.
202 Remove unneeded includes of WebCoreSystemInterface.h.
204 * loader/mac/LoaderNSURLExtras.m:
205 * page/mac/FrameMac.mm:
206 * page/mac/WebCoreFrameBridge.mm:
207 * platform/MIMETypeRegistry.cpp:
208 * platform/graphics/mac/ImageMac.mm:
209 * platform/mac/PasteboardMac.mm:
211 2008-02-29 Mark Rowe <mrowe@apple.com>
213 Reviewed by Oliver Hunt and Oliver Hunt.
215 <rdar://problem/4753845> WebKit should use CGEventSourceSecondsSinceLastEventType in place of WKSecondsSinceLastInputEvent SPI.
217 * platform/mac/SystemTimeMac.cpp: Replace use of WKSecondsSinceLastInputEvent with CGEventSourceSecondsSinceLastEventType.
218 * platform/mac/WebCoreSystemInterface.h: Remove unused symbol.
219 * platform/mac/WebCoreSystemInterface.mm: Ditto.
220 * WebCore.base.exp: Ditto.
222 2008-02-28 Mark Rowe <mrowe@apple.com>
224 Reviewed by Dave Hyatt.
226 Make use of new CGFont APIs on Leopard rather than making a WebKitSystemInterface call.
228 * DerivedSources.make: Add Tiger-only symbols to the export file when running on Tiger.
229 * WebCore.Tiger.exp: Added. Move Tiger-only symbol here from WebCore.base.exp.
231 * platform/graphics/mac/SimpleFontDataMac.mm:
232 (WebCore::SimpleFontData::platformInit): Use Leopard APIs when building on Leopard.
233 * platform/mac/WebCoreSystemInterface.h: Don't declare wkGetFontMetrics on Leopard as it is unused.
234 * platform/mac/WebCoreSystemInterface.mm: Ditto.
236 2008-02-28 Matt Lilek <webkit@mattlilek.com>
238 Reviewed by Tim Hatcher.
240 Bug 16535: Stylesheets loaded with @import are not editable
241 http://bugs.webkit.org/show_bug.cgi?id=16535
242 <rdar://problem/5712899>
244 Sheets loaded using @import were incorrectly being flagged as non-editable
245 user agent sheets because their parent sheet doesn't have an ownerNode. We now
246 check to make sure sheets also don't have a href before restricting their editability.
248 * page/inspector/StylesSidebarPane.js:
250 2008-02-28 Rodney Dawes <dobey@wayofthemonkey.com>
252 Reviewed by Adam Roben.
254 Copy PluginPackageWin.cpp to shared PluginPackage.cpp.
255 Add PluginPackage.cpp to build configurations.
256 Remove PluginPackage destructor from TemporaryLinkStubs.cpp.
257 Use cross-platform pathGetFilename method.
258 Remove platform-specific code from shared PluginPackage implementation.
259 Remove shared code from PluginPackageWin.cpp.
263 * WebCoreSources.bkl:
264 * WebCore.vcproj/WebCore.vcproj:
265 * platform/gtk/TemporaryLinkStubs.cpp:
266 * platform/qt/TemporaryLinkStubs.cpp:
267 * platform/wx/TemporaryLinkStubs.cpp:
268 * plugins/PluginPackage.cpp:
269 * plugins/win/PluginPackageWin.cpp:
271 2008-02-28 Justin Garcia <justin.garcia@apple.com>
273 Reviewed by Darin Adler.
275 <rdar://problem/4930986> REGRESSION: Paste As Quotation pastes black text instead of blue
277 Add a second style span at copy time to hold document default styles. This helps us
278 differentiate between those and user applied styles at paste time, where we'll want
279 to let Mail's Paste As Quotation blockquote override document default styles, but
282 * css/CSSComputedStyleDeclaration.cpp:
283 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed the unit type used
284 for -webkit-text-stroke-width from CSS_NUMBER to CSS_PX, to match other properties that
285 are thick | medium | thin | <length>. Before, there was a mismatch between the unit
286 type of -webkit-text-stroke-width property values in a CSSComputedStyleDeclaration for
287 an element and that element's inlineStyleDecl(), causing identical values to always appear
289 * editing/ReplaceSelectionCommand.cpp:
290 (WebCore::ReplaceSelectionCommand::handlePasteAsQuotationNode): Fixed. Don't just change
291 the class to an empty string, completely remove it, it's no longer needed.
292 (WebCore::handleStyleSpansBeforeInsertion): Moved the optimization from doApply here.
293 (WebCore::ReplaceSelectionCommand::handleStyleSpans):
294 Added, replaces removeRedundantStyles.
295 We aren't (yet) removing all redundant styles, just those on style spans, so I removed the
296 unused code and renamed the function.
297 There won't be more than two style spans that we need to consider, the one with the
298 source document's default styles and styles on the commonAncestor of the copied Range,
299 so don't look for more than two.
300 Let elements that wrap the incoming fragment override the source document's styles.
301 (WebCore::ReplaceSelectionCommand::doApply): Moved code to handleStyleSpansBeforeInsertion
302 and call the renamed handleStyleSpans.
303 * editing/ReplaceSelectionCommand.h:
304 * editing/markup.cpp:
305 (WebCore::removeDefaultStyles): Added. Don't add document defaults to the style span
306 that holds user applied styles, since they'll be added to their own style span.
307 (WebCore::createMarkup):
308 Add a second style span that holds just the document defaults. This lets us differentiate
309 between those and user applied styles at paste time.
310 Mail blockquotes are just another type of special element, moved their handling there. This
311 also lets paste code make assumptions about the position of the two style spans (they are
312 *always* parent-child).
314 2008-02-28 Brent Fulgham <bfulgham@gmail.com>
316 http://bugs.webkit.org/show_bug.cgi?id=17576
317 Modify RenderThemeWin to use SOFT_LINK
319 Reviewed by Adam Roben.
321 * rendering/RenderThemeWin.h: Remove unneeded library handle
322 * rendering/RenderThemeWin.cpp: Change to use SOFT_LINK
323 rather than hand-coded load library calls.
325 2008-02-28 Dan Bernstein <mitz@apple.com>
327 Reviewed by Darin Adler.
329 - fix http://bugs.webkit.org/show_bug.cgi?id=17590
330 ASSERTION FAILED: subject in jsRegExpExecute()
332 * page/mac/FrameMac.mm:
333 (WebCore::Frame::matchLabelsAgainstElement): Added an early return in
334 case the element name is empty.
336 2008-02-28 Justin Garcia <justin.garcia@apple.com>
338 Reviewed by Dan Bernstein
340 Small editing speed up.
343 (WebCore::Position::upstream): Don't check for a change in editability
344 if the current node hasn't changed.
345 (WebCore::Position::downstream): Ditto.
347 2008-02-27 Dan Bernstein <mitz@apple.com>
349 Reviewed by John Sullivan.
351 - fix <rdar://problem/5607547> Single letter surrounded by soft hyphens can disappear
353 Test: fast/text/soft-hyphen-2.html
355 * rendering/bidi.cpp:
356 (WebCore::chopMidpointsAt): Changed to iterate midpoints backwards, so
357 that if there are two midpoints at the given position, only the last one
360 2008-02-27 Dan Bernstein <mitz@apple.com>
362 Reviewed by Darin Adler.
364 - make centered text in right-to-left blocks spill over to the left
366 Test: fast/text/align-center-rtl-spill.html
368 * rendering/bidi.cpp:
369 (WebCore::RenderBlock::computeHorizontalPositionsForLine):
371 2008-02-27 Dan Bernstein <mitz@apple.com>
373 Reviewed by Darin Adler.
375 - more bidi.cpp cleanup
377 * platform/text/BidiResolver.h:
378 (WebCore::BidiCharacterRun::destroy): Added. Overridden by BidiRun .
379 (WebCore::BidiResolver<Iterator, Run>::addRun): Moved BidiState::addRun()
381 (WebCore::BidiResolver<Iterator, Run>::appendRun): Changed to use
383 (WebCore::BidiResolver<Iterator, Run>::deleteRuns): Changed to use
384 destroy(), avoiding the need to specialize this method in BidiState.
385 * rendering/bidi.cpp:
386 (WebCore::BidiRun::destroy): Removed the RenderArena parameter.
387 (WebCore::BidiState::deleteRuns): Removed now-unnecessary specialization.
388 (WebCore::BidiState::addRun): Removed now-unnecessary specialization.
389 (WebCore::RenderBlock::createLineBoxes):
390 (WebCore::RenderBlock::constructLine):
391 (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added a FIXME.
392 (WebCore::RenderBlock::computeVerticalPositionsForLine):
393 (WebCore::buildCompactRuns):
394 (WebCore::RenderBlock::layoutInlineChildren):
395 (WebCore::RenderBlock::determineStartPosition):
396 (WebCore::RenderBlock::determineEndPosition):
397 (WebCore::RenderBlock::matchedEndLine):
398 (WebCore::skipNonBreakingSpace):
399 (WebCore::RenderBlock::skipWhitespace):
400 (WebCore::shouldSkipWhitespaceAfterStartObject):
402 (WebCore::BidiRun): Added m_ prefixes to several member variables.
404 2008-02-27 Sam Weinig <sam@webkit.org>
408 Fix for <rdar://problem/5768769>
410 - Don't allow cross-origin calls using window.functionName.call(otherFrame)
413 * bindings/js/JSLocation.cpp:
414 (WebCore::jsLocationProtoFuncToString): Do same-origin check.
415 * bindings/js/kjs_window.cpp:
416 (KJS::windowProtoFuncAToB): Ditto.
417 (KJS::windowProtoFuncBToA): Ditto.
418 (KJS::windowProtoFuncOpen): Ditto.
419 (KJS::windowProtoFuncClearTimeout): Ditto.
420 * bindings/scripts/CodeGeneratorJS.pm: Ditto.
422 2008-02-27 David Hyatt <hyatt@apple.com>
424 More cleanup in preparation for fixing the HTML5 spec performance regression.
426 Reviewed by Sam Weinig
429 (WebCore::Attr::childrenChanged):
431 * dom/ContainerNode.cpp:
432 (WebCore::ContainerNode::insertBefore):
433 (WebCore::ContainerNode::replaceChild):
434 (WebCore::ContainerNode::removeChild):
435 (WebCore::ContainerNode::removeChildren):
436 (WebCore::ContainerNode::appendChild):
437 (WebCore::ContainerNode::addChild):
438 (WebCore::ContainerNode::childrenChanged):
439 * dom/ContainerNode.h:
441 (WebCore::Document::childrenChanged):
444 (WebCore::Element::childrenChanged):
447 (WebCore::Node::childrenChanged):
448 * html/HTMLObjectElement.cpp:
449 (WebCore::HTMLObjectElement::childrenChanged):
450 * html/HTMLObjectElement.h:
451 * html/HTMLOptGroupElement.cpp:
452 (WebCore::HTMLOptGroupElement::childrenChanged):
453 * html/HTMLOptGroupElement.h:
454 * html/HTMLOptionElement.cpp:
455 (WebCore::HTMLOptionElement::childrenChanged):
456 * html/HTMLOptionElement.h:
457 * html/HTMLScriptElement.cpp:
458 (WebCore::HTMLScriptElement::childrenChanged):
459 * html/HTMLScriptElement.h:
460 * html/HTMLSelectElement.cpp:
461 (WebCore::HTMLSelectElement::childrenChanged):
462 * html/HTMLSelectElement.h:
463 * html/HTMLStyleElement.cpp:
464 (WebCore::HTMLStyleElement::childrenChanged):
465 * html/HTMLStyleElement.h:
466 * html/HTMLTextAreaElement.cpp:
467 (WebCore::HTMLTextAreaElement::childrenChanged):
468 * html/HTMLTextAreaElement.h:
469 * html/HTMLTitleElement.cpp:
470 (WebCore::HTMLTitleElement::childrenChanged):
471 * html/HTMLTitleElement.h:
472 * svg/SVGClipPathElement.cpp:
473 (WebCore::SVGClipPathElement::childrenChanged):
474 * svg/SVGClipPathElement.h:
475 * svg/SVGDefinitionSrcElement.cpp:
476 (WebCore::SVGDefinitionSrcElement::childrenChanged):
477 * svg/SVGDefinitionSrcElement.h:
478 * svg/SVGFontFaceElement.cpp:
479 (WebCore::SVGFontFaceElement::childrenChanged):
480 * svg/SVGFontFaceElement.h:
481 * svg/SVGFontFaceFormatElement.cpp:
482 (WebCore::SVGFontFaceFormatElement::childrenChanged):
483 * svg/SVGFontFaceFormatElement.h:
484 * svg/SVGFontFaceSrcElement.cpp:
485 (WebCore::SVGFontFaceSrcElement::childrenChanged):
486 * svg/SVGFontFaceSrcElement.h:
487 * svg/SVGFontFaceUriElement.cpp:
488 (WebCore::SVGFontFaceUriElement::childrenChanged):
489 * svg/SVGFontFaceUriElement.h:
490 * svg/SVGGElement.cpp:
491 (WebCore::SVGGElement::childrenChanged):
493 * svg/SVGGradientElement.cpp:
494 (WebCore::SVGGradientElement::childrenChanged):
495 * svg/SVGGradientElement.h:
496 * svg/SVGMarkerElement.cpp:
497 (WebCore::SVGMarkerElement::childrenChanged):
498 * svg/SVGMarkerElement.h:
499 * svg/SVGMaskElement.cpp:
500 (WebCore::SVGMaskElement::childrenChanged):
501 * svg/SVGMaskElement.h:
502 * svg/SVGPatternElement.cpp:
503 (WebCore::SVGPatternElement::childrenChanged):
504 * svg/SVGPatternElement.h:
505 * svg/SVGStyleElement.cpp:
506 (WebCore::SVGStyleElement::childrenChanged):
507 * svg/SVGStyleElement.h:
508 * svg/SVGStyledElement.cpp:
509 (WebCore::SVGStyledElement::childrenChanged):
510 * svg/SVGStyledElement.h:
511 * svg/SVGTitleElement.cpp:
512 (WebCore::SVGTitleElement::childrenChanged):
513 * svg/SVGTitleElement.h:
514 * svg/SVGUseElement.cpp:
515 (WebCore::SVGUseElement::childrenChanged):
516 * svg/SVGUseElement.h:
518 2008-02-27 Julien Chaffraix <julien.chaffraix@gmail.com>
522 http://bugs.webkit.org/show_bug.cgi?id=17481
523 Several consecutive calls to XMLHttpRequest::open should dispatch only one readyState event
525 Test: http/tests/xmlhttprequest/xmlhttprequest-multiple-open.html
527 * xml/XMLHttpRequest.cpp:
528 (WebCore::XMLHttpRequest::open):
530 2008-02-27 Sriram Neelakandan <sriram.neelakandan@gmail.com>
532 Reviewed, tweaked and landed by ap.
534 http://bugs.webkit.org/show_bug.cgi?id=17487
535 HTMLInput mysteriously fails to work if ICU dat file is missing
537 * platform/text/TextBreakIteratorICU.cpp: (WebCore::setUpIterator): Assert that the iterator
540 2008-02-27 Adam Roben <aroben@apple.com>
542 Windows build fix after r30616
544 * platform/win/ClipboardWin.cpp:
546 2008-02-27 Nikolas Zimmermann <zimmermann@kde.org>
550 Small style cleanup, and obvious fix: SVGGElement reacted on
551 'clipPathUnits' changes, which is a funny copy&paste error.
553 * svg/SVGGElement.cpp:
554 (WebCore::SVGGElement::parseMappedAttribute):
555 (WebCore::SVGGElement::svgAttributeChanged):
556 (WebCore::SVGGElement::createRenderer):
558 2008-02-27 Nikolas Zimmermann <zimmermann@kde.org>
562 Cleanup coding style. Still on my way to fix dynamic updates of all SVG elements.
563 Currently at SVGF*. SVGDefs/DescElement don't need any dyn update fixes but cleanups.
565 * svg/SVGDefsElement.cpp:
566 (WebCore::SVGDefsElement::createRenderer):
567 * svg/SVGDefsElement.h:
568 * svg/SVGDescElement.h:
570 2008-02-26 Antti Koivisto <antti@apple.com>
574 Fix <rdar://problem/5761326>
575 REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang)
577 Generate better code with VS:
578 - Use ALWAYS_INLINE macro to guarantee versions of allowsAccessFrom() are reduced to single functions
579 - Refactor error reporting so that there is no need to construct/destruct Strings in common cases
580 - Add a separate version of the function for cases where error messages are not wanted
582 * bindings/js/JSDOMWindowCustom.cpp:
583 (WebCore::JSDOMWindow::customGetOwnPropertySlot):
584 * bindings/js/kjs_window.cpp:
585 (KJS::Window::allowsAccessFrom):
586 (KJS::Window::allowsAccessFromNoErrorMessage):
587 (KJS::Window::allowsAccessFromPrivate):
588 (KJS::Window::crossDomainAccessErrorMessage):
589 * bindings/js/kjs_window.h:
591 2008-02-26 Sam Weinig <sam@webkit.org>
593 Reviewed by Dave Hyatt.
595 - remove DeprecatedCString, DeprecatedArray, and ArrayImpl.
599 * WebCore.vcproj/WebCore.vcproj:
600 * WebCore.xcodeproj/project.pbxproj:
601 * WebCoreSources.bkl:
602 * platform/ArrayImpl.cpp: Removed.
603 * platform/ArrayImpl.h: Removed.
604 * platform/DeprecatedArray.h: Removed.
605 * platform/DeprecatedCString.cpp: Removed.
606 * platform/DeprecatedCString.h: Removed.
607 * platform/text/CString.cpp:
608 (WebCore::CString::length):
609 * platform/text/CString.h:
611 2008-02-26 David Hyatt <hyatt@apple.com>
613 Cleanup of childrenChanged in preparation for fixing the HTML5 spec slowdown.
615 Reviewed by Sam Weinig
618 (WebCore::Attr::childrenChanged):
619 * dom/ContainerNode.cpp:
620 (WebCore::ContainerNode::insertBefore):
621 (WebCore::ContainerNode::replaceChild):
622 (WebCore::ContainerNode::removeChild):
623 (WebCore::ContainerNode::removeChildren):
624 (WebCore::ContainerNode::appendChild):
625 (WebCore::ContainerNode::addChild):
626 (WebCore::ContainerNode::childrenChanged):
627 * dom/ContainerNode.h:
628 * dom/EventTargetNode.cpp:
629 (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent):
630 * dom/EventTargetNode.h:
631 * dom/NamedAttrMap.cpp:
632 (WebCore::NamedAttrMap::addAttribute):
633 (WebCore::NamedAttrMap::removeAttribute):
635 2008-02-26 Darin Adler <darin@apple.com>
639 - remove use of DeprecatedCString from Windows pasteboard code
641 * platform/win/ClipboardUtilitiesWin.cpp:
642 (WebCore::createGlobalData): Added an overload for Vector<char>.
643 Streamlined the logic a bit.
644 (WebCore::append): Added. Helper functions for appending to a
646 (WebCore::markupToCF_HTML): Rewrote to use Vector<char> instead
647 of DeprecatedCString. Also simplified the logic a bit and used
648 macros to handle the integer width.
649 (WebCore::urlToMarkup): Use Vector<UChar> instead of String.
650 (WebCore::replaceNewlinesWithWindowsStyleNewlines): Tweaked.
651 * platform/win/ClipboardUtilitiesWin.h: Update type of return
652 value from markupToCF_HTML. Did a bit of streamlining too.
653 * platform/win/ClipboardWin.cpp:
654 (WebCore::writeURL): Update for above changes.
655 (WebCore::ClipboardWin::declareAndWriteDragImage): Ditto.
656 (WebCore::ClipboardWin::writeRange): Ditto.
657 * platform/win/PasteboardWin.cpp:
658 (WebCore::Pasteboard::writeSelection): Ditto.
659 (WebCore::Pasteboard::writeURL): Ditto.
661 2008-02-26 Timothy Hatcher <timothy@apple.com>
663 Reviewed by Adam Roben.
665 <rdar://problem/5712777> REGRESSION: Arrow up/down in inspector
666 source list does not scroll when item at edge is reached (16572)
668 Use scrollIntoViewIfNeeded() instead of the hand-rolled scrollToElement
669 we were using in utilities.js.
671 * page/inspector/DocumentPanel.js: Use scrollIntoViewIfNeeded instead of scrollToElement.
672 * page/inspector/Resource.js: Ditto.
673 * page/inspector/inspector.js: Ditto.
674 * page/inspector/SourcePanel.js: Use scrollIntoViewIfNeeded instead
675 of scrollIntoView, so the source line is centered in the view if needed.
676 * page/inspector/utilities.js: Removed scrollToElement().
678 2008-02-26 David Hyatt <hyatt@apple.com>
682 http://bugs.webkit.org/show_bug.cgi?id=17485
684 Refine our behavior for empty inlines so that they work more correctly with margins/borders/padding.
685 Fixes a regression on huffingtonpost.com.
687 New tests added to fast/inline
689 * rendering/InlineFlowBox.cpp:
690 (WebCore::InlineFlowBox::computeLogicalBoxHeights):
691 (WebCore::InlineFlowBox::placeBoxesVertically):
692 (WebCore::InlineFlowBox::shrinkBoxesWithNoTextChildren):
693 * rendering/RenderFlow.cpp:
694 (WebCore::RenderFlow::calcMargins):
695 * rendering/RenderFlow.h:
696 * rendering/RenderObject.h:
697 (WebCore::RenderObject::hasHorizontalBordersPaddingOrMargin):
698 (WebCore::RenderObject::hasHorizontalBordersOrPadding):
699 * rendering/bidi.cpp:
700 (WebCore::getBorderPaddingMargin):
701 (WebCore::RenderBlock::layoutInlineChildren):
702 (WebCore::inlineFlowRequiresLineBox):
704 2008-02-26 Sam Weinig <sam@webkit.org>
708 * platform/text/PlatformString.h:
709 (WebCore::reverseFind):
711 2008-02-26 Dan Bernstein <mitz@apple.com>
713 Reviewed by Darin Adler.
715 - fix http://bugs.webkit.org/show_bug.cgi?id=17555
716 <rdar://problem/5766016> REGRESSION (r27351): Thumbnails positioned wrong on Getty Images results page
718 Test: fast/dynamic/subtree-table-cell-height.html
720 * rendering/RenderObject.cpp:
721 (WebCore::objectIsRelayoutBoundary): Exclude table cells, since their
722 height depends on their contents even if the CSS height property is
725 2008-02-25 Sam Weinig <sam@webkit.org>
727 Reviewed by Dan Bernstein.
729 Make the cleanPath function in CSSStyleSelector more efficient by using
732 * css/CSSStyleSelector.cpp:
733 (WebCore::cleanPath): Make this function work on a Vector<UChar> instead
734 of a String. Also remove unnecessary reverseFind call that could be acomplished
736 (WebCore::checkPseudoState): Remove reserveCapacity calls now that we are using
738 * platform/text/PlatformString.h:
739 (WebCore::find): Make this find generic enough that it can be used for
741 (WebCore::reverseFind): Implement reverseFind so that it can be used
742 for with a UChar* and length.
743 * platform/text/StringImpl.cpp:
744 (WebCore::StringImpl::find): Use implementation in PlatformString.cpp
745 (WebCore::StringImpl::reverseFind): Ditto,
747 2008-02-26 Satoshi Nakagawa <artension@gmail.com>
749 Reviewed by Darin. Tweaked and landed by Alexey.
751 http://bugs.webkit.org/show_bug.cgi?id=17411
752 Ideographic comma and full stop should be treated as line-breakable characters
754 Test: fast/text/line-breaks-after-ideographic-comma-or-full-stop.html
756 * platform/text/CharacterNames.h: Added ideographicComma and ideographicFullStop.
757 * rendering/break_lines.cpp: (WebCore::shouldBreakAfter): Added a workaround for an issue in
758 Unicode 5.0 that is causing this.
760 2008-02-26 MorganL <morganl.webkit@yahoo.com>
762 Reviewed by eseidel. Landed by eseidel
764 Fix improperly initialized m_isUpToDate member variable.
765 Fixs 50+ layout tests when run on Tiger.
766 http://bugs.webkit.org/show_bug.cgi?id=17549
768 * platform/network/cf/ResourceResponse.h:
769 (WebCore::ResourceResponse::ResourceResponse):
770 * platform/network/mac/ResourceResponse.h:
771 (WebCore::ResourceResponse::ResourceResponse):
773 2008-02-25 Dan Bernstein <mitz@apple.com>
775 Reviewed by Sam Weinig.
777 - fix http://bugs.webkit.org/show_bug.cgi?id=17152
778 Paragraphs indented with :first-letter and text-align CSS render incorrectly
780 Test: fast/text/apply-start-width-after-skipped-text.html
782 * rendering/bidi.cpp:
783 (WebCore::RenderBlock::findNextLineBreak): Improved the logic for when
784 to figure in the padding, border and margin before a text node when the
785 line begins inside a text node.
787 2008-02-25 Kevin Ollivier <kevino@theolliviers.com>
789 Windows build fix for wx port.
791 * loader/FTPDirectoryDocument.cpp:
793 2008-02-25 Mark Rowe <mrowe@apple.com>
797 * platform/network/cf/ResourceResponseCFNet.cpp:
798 (WebCore::ResourceResponse::platformCompare): Implement platformCompare for ResourceResponseCFNet.cpp.
800 2008-02-25 Beth Dakin <bdakin@apple.com>
804 Fixed for <rdar://problem/5760530> REGRESSION: Assertion failure in
805 Document::removePendingSheet() from r30438
807 r30438 added a call to CachedResource::error() from inside
808 Loader::didReceiveData() if a CSS file 4xxs. There was an
809 assumption in the loader, though, that either error() would be
810 called, or didFinishLoading() would be called, so some work is
811 duplicated in each. Now that we are calling an error() on files
812 that will also make it to didFinishLoading() (since they succeeded
813 in the network layer), we need to make sure we do not duplicate the
814 work. CachedCSSStyleSheet::error() calls checkNotify, which ends up
815 decrementing the document's pending style sheet counter.
816 checkNotify() was still getting called, though, through the normal
817 didFinishLoading code path, and the counter was being decremented
821 (WebCore::Loader::didFinishLoading):
822 (WebCore::Loader::didReceiveData):
824 2008-02-25 Mark Rowe <mrowe@apple.com>
826 Fix the Gtk, wx and Qt builds.
828 * GNUmakefile.am: Add new files.
829 * WebCore.pro: Ditto.
830 * WebCoreSources.bkl: Ditto.
831 * platform/network/AuthenticationChallengeBase.h: Fix up argument types.
833 2008-02-25 MorganL <morganl.webkit@yahoo.com>
835 Reviewed by Darin Adler.
837 Eliminate some #ifdefs from headers in platform/network.
838 http://bugs.webkit.org/show_bug.cgi?id=17210
842 * WebCore.vcproj/WebCore.vcproj:
843 * WebCore.xcodeproj/project.pbxproj:
844 * dom/XMLTokenizer.cpp:
845 * loader/ResourceLoader.h:
846 * platform/network/AuthenticationChallenge.cpp: Removed.
847 * platform/network/AuthenticationChallenge.h: Removed.
848 * platform/network/AuthenticationChallengeBase.cpp: Copied from platform/network/AuthenticationChallenge.cpp.
849 (WebCore::AuthenticationChallengeBase::AuthenticationChallengeBase):
850 (WebCore::AuthenticationChallengeBase::previousFailureCount):
851 (WebCore::AuthenticationChallengeBase::proposedCredential):
852 (WebCore::AuthenticationChallengeBase::protectionSpace):
853 (WebCore::AuthenticationChallengeBase::failureResponse):
854 (WebCore::AuthenticationChallengeBase::error):
855 (WebCore::AuthenticationChallengeBase::isNull):
856 (WebCore::AuthenticationChallengeBase::nullify):
857 (WebCore::AuthenticationChallengeBase::compare):
858 * platform/network/AuthenticationChallengeBase.h: Copied from platform/network/AuthenticationChallenge.h.
859 (WebCore::AuthenticationChallengeBase::platformCompare):
860 (WebCore::operator==):
861 (WebCore::operator!=):
862 * platform/network/ResourceError.cpp: Removed.
863 * platform/network/ResourceError.h: Removed.
864 * platform/network/ResourceErrorBase.cpp: Copied from platform/network/ResourceError.cpp.
865 (WebCore::ResourceErrorBase::lazyInit):
866 (WebCore::ResourceErrorBase::compare):
867 * platform/network/ResourceErrorBase.h: Copied from platform/network/ResourceError.h.
868 (WebCore::ResourceErrorBase::isNull):
869 (WebCore::ResourceErrorBase::domain):
870 (WebCore::ResourceErrorBase::errorCode):
871 (WebCore::ResourceErrorBase::failingURL):
872 (WebCore::ResourceErrorBase::localizedDescription):
873 (WebCore::ResourceErrorBase::ResourceErrorBase):
874 (WebCore::ResourceErrorBase::platformLazyInit):
875 (WebCore::ResourceErrorBase::platformCompare):
876 (WebCore::operator==):
877 * platform/network/ResourceResponseBase.cpp:
878 (WebCore::ResourceResponseBase::isHTTP):
879 (WebCore::ResourceResponseBase::url):
880 (WebCore::ResourceResponseBase::setUrl):
881 (WebCore::ResourceResponseBase::mimeType):
882 (WebCore::ResourceResponseBase::setMimeType):
883 (WebCore::ResourceResponseBase::expectedContentLength):
884 (WebCore::ResourceResponseBase::setExpectedContentLength):
885 (WebCore::ResourceResponseBase::textEncodingName):
886 (WebCore::ResourceResponseBase::setTextEncodingName):
887 (WebCore::ResourceResponseBase::suggestedFilename):
888 (WebCore::ResourceResponseBase::setSuggestedFilename):
889 (WebCore::ResourceResponseBase::httpStatusCode):
890 (WebCore::ResourceResponseBase::setHTTPStatusCode):
891 (WebCore::ResourceResponseBase::httpStatusText):
892 (WebCore::ResourceResponseBase::setHTTPStatusText):
893 (WebCore::ResourceResponseBase::httpHeaderField):
894 (WebCore::ResourceResponseBase::setHTTPHeaderField):
895 (WebCore::ResourceResponseBase::httpHeaderFields):
896 (WebCore::ResourceResponseBase::isAttachment):
897 (WebCore::ResourceResponseBase::setExpirationDate):
898 (WebCore::ResourceResponseBase::expirationDate):
899 (WebCore::ResourceResponseBase::setLastModifiedDate):
900 (WebCore::ResourceResponseBase::lastModifiedDate):
901 (WebCore::ResourceResponseBase::lazyInit):
902 (WebCore::ResourceResponseBase::compare):
903 * platform/network/ResourceResponseBase.h:
904 (WebCore::ResourceResponseBase::ResourceResponseBase):
905 (WebCore::ResourceResponseBase::platformLazyInit):
906 (WebCore::ResourceResponseBase::platformCompare):
907 (WebCore::operator==):
908 * platform/network/cf/AuthenticationCF.cpp:
909 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
910 (WebCore::AuthenticationChallenge::platformCompare):
911 * platform/network/cf/AuthenticationChallenge.h: Added.
912 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
913 (WebCore::AuthenticationChallenge::sourceHandle):
914 (WebCore::AuthenticationChallenge::cfURLAuthChallengeRef):
915 * platform/network/cf/ResourceError.h: Added.
916 (WebCore::ResourceError::ResourceError):
917 * platform/network/cf/ResourceErrorCF.cpp:
918 (WebCore::ResourceError::ResourceError):
919 (WebCore::ResourceError::platformLazyInit):
920 (WebCore::ResourceError::platformCompare):
921 (WebCore::ResourceError::operator CFStreamError):
922 * platform/network/cf/ResourceResponse.h:
923 (WebCore::ResourceResponse::ResourceResponse):
924 * platform/network/cf/ResourceResponseCFNet.cpp:
925 (WebCore::ResourceResponse::platformLazyInit):
926 * platform/network/curl/AuthenticationChallenge.h: Added.
927 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
928 * platform/network/curl/ResourceError.h: Added.
929 (WebCore::ResourceError::ResourceError):
930 * platform/network/curl/ResourceResponse.h:
931 (WebCore::ResourceResponse::ResourceResponse):
932 * platform/network/mac/AuthenticationChallenge.h: Added.
933 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
934 (WebCore::AuthenticationChallenge::sender):
935 (WebCore::AuthenticationChallenge::nsURLAuthenticationChallenge):
936 * platform/network/mac/AuthenticationMac.mm:
937 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
938 (WebCore::AuthenticationChallenge::platformCompare):
939 * platform/network/mac/ResourceError.h: Added.
940 (WebCore::ResourceError::ResourceError):
941 * platform/network/mac/ResourceErrorMac.mm:
942 (WebCore::ResourceError::platformLazyInit):
943 (WebCore::ResourceError::platformCompare):
944 * platform/network/mac/ResourceResponse.h:
945 (WebCore::ResourceResponse::ResourceResponse):
946 * platform/network/mac/ResourceResponseMac.mm:
947 (WebCore::ResourceResponse::platformLazyInit):
948 (WebCore::ResourceResponse::platformCompare):
949 * platform/network/qt/AuthenticationChallenge.h: Added.
950 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
951 * platform/network/qt/ResourceError.h: Added.
952 (WebCore::ResourceError::ResourceError):
953 * platform/network/qt/ResourceResponse.h:
954 (WebCore::ResourceResponse::ResourceResponse):
955 * xml/XSLTProcessor.cpp:
957 2008-02-25 Anders Carlsson <andersca@apple.com>
961 Move remaining render style objects over to start with a refcount of 1 and get
962 rid of DeprecatedDataRef.
964 * rendering/DataRef.h:
965 (WebCore::DataRef::operator*):
966 (WebCore::DataRef::operator->):
967 * rendering/RenderStyle.h:
968 * rendering/SVGRenderStyle.cpp:
969 (WebCore::SVGRenderStyle::SVGRenderStyle):
970 * rendering/SVGRenderStyle.h:
971 (WebCore::SVGRenderStyle::create):
972 (WebCore::SVGRenderStyle::copy):
973 * rendering/SVGRenderStyleDefs.cpp:
974 (StyleFillData::StyleFillData):
975 (StyleStrokeData::StyleStrokeData):
976 (StyleStopData::StyleStopData):
977 (StyleTextData::StyleTextData):
978 (StyleClipData::StyleClipData):
979 (StyleMaskData::StyleMaskData):
980 (StyleMarkerData::StyleMarkerData):
981 (StyleMiscData::StyleMiscData):
982 * rendering/SVGRenderStyleDefs.h:
983 (WebCore::StyleFillData::create):
984 (WebCore::StyleFillData::copy):
985 (WebCore::StyleStrokeData::create):
986 (WebCore::StyleStrokeData::copy):
987 (WebCore::StyleStopData::create):
988 (WebCore::StyleStopData::copy):
989 (WebCore::StyleTextData::create):
990 (WebCore::StyleTextData::copy):
991 (WebCore::StyleClipData::create):
992 (WebCore::StyleClipData::copy):
993 (WebCore::StyleMaskData::create):
994 (WebCore::StyleMaskData::copy):
995 (WebCore::StyleMarkerData::create):
996 (WebCore::StyleMarkerData::copy):
997 (WebCore::StyleMiscData::create):
998 (WebCore::StyleMiscData::copy):
1000 2008-02-25 Dan Bernstein <mitz@apple.com>
1002 Reviewed by Dave Hyatt.
1004 - remove file-static BidiRun variables from bidi.cpp
1006 * platform/text/BidiResolver.h:
1007 (WebCore::BidiResolver::): Initialize m_logicallyLastRun.
1008 (WebCore::BidiResolver::logicallyLastRun): Added.
1009 (WebCore::BidiResolver::runCount): Made unsigned.
1010 (WebCore::::reverseRuns): Changed ints to unsigned.
1011 (WebCore::::createBidiRunsForLine): Made this function set
1013 * rendering/RenderBlock.h:
1014 * rendering/bidi.cpp:
1015 (WebCore::BidiState::addRun): Removed setting of sLogicallyLastBidiRun.
1016 (WebCore::RenderBlock::constructLine): Removed unused start parameter
1017 and added run count and first and last run parameters. Replaced end
1018 parameter with lastLine boolean and endObject pointer.
1019 (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added first
1020 and logically last run parameters.
1021 (WebCore::RenderBlock::computeVerticalPositionsForLine): Added firstRun
1023 (WebCore::RenderBlock::bidiReorderLine): Removed setting of static
1025 (WebCore::RenderBlock::layoutInlineChildren): Changed to use BidiState
1026 accessors instead of file statics.
1028 2008-02-25 Rodney Dawes <dobey@wayofthemonkey.com>
1030 Reviewed by Jon Honeycutt.
1032 http://bugs.webkit.org/show_bug.cgi?id=16924
1033 Bug 16924: Shared PluginDatabase, PluginPackage, and PlugInInfoStore implementations
1035 Add PluginInfoStore.cpp and new PluginDatabase.cpp to GTK+ and Qt ports.
1036 Remove old PlugInInfoStoreQt.cpp as it is obsoleted by shared code.
1037 Add PluginInfoStore, PluginDatabase, and PluginStream files to Wx build.
1038 Add new PluginDatabase.cpp to Windows build.
1039 Add temporary stubs for new PluginDatabase and PluginPackage.
1040 shared classes to GTK+, Qt, and Wx ports.
1041 Copy PluginDatabaseWin.cpp to PluginDatabase.cpp to preserve history.
1042 Remove shared code from PluginDatabaseWin.cpp.
1043 Remove Windows-specific code from PluginDatabase.cpp.
1044 Use PlatformModule and PlatformFileTime instead of HMODULE and FILETIME.
1045 Remove extraneous PluginPackage:: from hash() class method prototype.
1046 Subsume storeFileVersion into PluginPackage::fetchInfo.
1047 Add cross-platform PlatformModuleVersion type definition.
1048 Use PlatformModuleVersion to store the module version.
1049 Rename m_fileVersion[ML]S to m_moduleVersion.
1050 Change compareFileVersion to use PlatformModuleVersion as the argument.
1051 Move PluginView::determineQuirks and m_quirks to PluginPackage.
1052 Updated determineQuirks for the PlatformModuleVersion.
1056 * WebCoreSources.bkl:
1058 * WebCore.vcproj/WebCore.vcproj:
1059 * Platform/FileSystem.h:
1060 * platform/qt/PlugInInfoStoreQt.cpp:
1061 * platform/gtk/TemporaryLinkStubs.cpp:
1062 * platform/qt/TemporaryLinkStubs.cpp:
1063 * platform/wx/TemporaryLinkStubs.cpp:
1064 * plugins/PluginDatabase.cpp:
1065 * plugins/PluginDatabase.h:
1066 * plugins/win/PluginDatabaseWin.cpp:
1067 * plugins/PluginPackage.h:
1068 * plugins/win/PluginPackageWin.cpp:
1069 * plugins/PluginView.h:
1070 * plugins/win/PluginViewWin.cpp:
1072 2008-02-25 Anders Carlsson <andersca@apple.com>
1076 Make more style objects start out with a refcount of 1.
1078 * rendering/RenderStyle.cpp:
1079 (WebCore::StyleSurroundData::StyleSurroundData):
1080 (WebCore::StyleBoxData::StyleBoxData):
1081 (WebCore::StyleVisualData::StyleVisualData):
1082 (WebCore::StyleBackgroundData::StyleBackgroundData):
1083 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1084 (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1085 (WebCore::StyleInheritedData::StyleInheritedData):
1086 * rendering/RenderStyle.h:
1087 (WebCore::StyleSurroundData::create):
1088 (WebCore::StyleSurroundData::copy):
1089 (WebCore::StyleBoxData::create):
1090 (WebCore::StyleBoxData::copy):
1091 (WebCore::StyleVisualData::create):
1092 (WebCore::StyleVisualData::copy):
1093 (WebCore::StyleBackgroundData::create):
1094 (WebCore::StyleBackgroundData::copy):
1095 (WebCore::StyleBackgroundData::~StyleBackgroundData):
1096 (WebCore::StyleRareNonInheritedData::create):
1097 (WebCore::StyleRareNonInheritedData::copy):
1098 (WebCore::StyleRareInheritedData::create):
1099 (WebCore::StyleRareInheritedData::copy):
1100 (WebCore::StyleInheritedData::create):
1101 (WebCore::StyleInheritedData::copy):
1103 2008-02-25 Anders Carlsson <andersca@apple.com>
1107 Make some of the refcounted style objects start out with a refcount of 1.
1109 * rendering/DataRef.h:
1110 Make a DeprecatedDataRef class which is just a copy of the old DataRef class.
1111 Change DataRef to use ::create() and ::copy() instead of the constructors.
1112 Change DataRef's pointer to be a RefPtr instead.
1114 * rendering/RenderStyle.cpp:
1115 (WebCore::StyleMarqueeData::StyleMarqueeData):
1116 (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
1117 (WebCore::StyleMultiColData::StyleMultiColData):
1118 (WebCore::StyleTransformData::StyleTransformData):
1119 Start with a RefCount of 1.
1121 * rendering/RenderStyle.h:
1122 * rendering/SVGRenderStyle.h:
1123 Add ::create() and ::copy() methods. Make not yet converted classes use DeprecatedDataRef.
1125 2008-02-25 Darin Adler <darin@apple.com>
1128 Based on a patch by Tim Steele <timsteele41@gmail.com>.
1130 - fix http://bugs.webkit.org/show_bug.cgi?id=17186
1131 Fragment navigation within a page permanently cancels meta refresh
1133 Test: fast/loader/meta-refresh-anchor-click.html
1135 * loader/FrameLoader.cpp:
1136 (WebCore::FrameLoader::load): When load type is FrameLoadTypeRedirectWithLockedHistory,
1137 always do a real load. This makes sure that meta refresh loads are treated as real loads
1138 rather than anchor scrolls. Also tweaked formatting a bit.
1139 (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): This function is
1140 an alternate way to complete a load, so it needs to start the redirection timer if
1141 redirection has already been scheduled.
1143 2008-02-25 Dan Bernstein <mitz@apple.com>
1145 Reviewed by Darin Adler.
1147 - avoid counting spaces in non-justified text
1149 * rendering/bidi.cpp:
1150 Removed file-static numSpaces.
1151 (WebCore::BidiState::addRun): Removed space counting.
1152 (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added space
1153 counting, conditional on the block having the text-align: justify
1155 (WebCore::RenderBlock::bidiReorderLine): Removed initialization of
1158 2008-02-25 Darin Adler <darin@apple.com>
1162 * platform/graphics/cg/ImageSourceCG.cpp:
1163 (WebCore::ImageSource::createFrameAtIndex): Put the string into a global
1164 variable (because CFSTR is inefficient on Windows).
1166 2008-02-25 Darin Adler <darin@apple.com>
1170 * WebCore.base.exp: Export blankURL, and sort the file.
1172 2008-02-25 Simon Hausmann <hausmann@webkit.org>
1174 Reviewed by Mark Rowe.
1176 Fix compilation with gcc 4.3, added stdio.h and unistd.h inclusions.
1180 * editing/Selection.cpp:
1181 * editing/SelectionController.cpp:
1182 * editing/VisiblePosition.cpp:
1183 * history/HistoryItem.cpp:
1185 * loader/FTPDirectoryParser.cpp:
1186 * platform/KURL.cpp:
1187 * platform/gtk/FileSystemGtk.cpp:
1188 * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1189 * platform/text/TextCodecLatin1.cpp:
1190 * platform/text/TextCodecUserDefined.cpp:
1191 * rendering/CounterNode.cpp:
1192 * rendering/RenderObject.cpp:
1194 2008-02-25 Johnny Ding <johnnyding.webkit@gmail.com>
1196 Reviewed by Darin Adler.
1198 - fix http://bugs.webkit.org/show_bug.cgi?id=17444
1200 In HTMLTokenizer::write, the code checks 'pendingScripts.isEmpty()' to decide
1201 whether to save prependingSrc or not. However, in HTMLTokenizer::scriptHandler
1202 and HTMLTokenizer::scriptExecution, the code checks testBit:LoadingExtScript
1203 to decide whether to save prependingSrc or not. The later behavior is not right
1204 because, in scriptHandler and scriptExecution, even the pendingScripts queue is
1205 empty, the testBit:LoadingExtScript might be TRUE.
1207 Test: fast/tokenizer/nested-multiple-scripts.html
1209 * html/HTMLTokenizer.cpp:
1210 (WebCore::HTMLTokenizer::scriptHandler): check pendingScripts.isEmpty() instead of
1211 checking state.loadingExtScript().
1212 (WebCore::HTMLTokenizer::scriptExecution): check pendingScripts.isEmpty() instead of
1213 checking state.loadingExtScript().
1215 2008-02-24 Darin Adler <darin@apple.com>
1217 * dom/Document.h: Removed stray duplicate declaration of
1218 RegisteredEventListenerList.
1220 2008-02-24 Darin Adler <darin@apple.com>
1223 (WebCore::Range::surroundContents): Removed incorrect comment.
1224 I added it a while ago, and I was just mixed up.
1226 2008-02-24 Darin Adler <darin@apple.com>
1228 - quick follow-up to that last check-in
1230 * platform/graphics/cg/ImageSourceCG.cpp:
1231 (WebCore::ImageSource::createFrameAtIndex): Use CFEqual instead of
1232 WebCore::String's == for speed.
1234 2008-02-24 Michael Knaup <michael.knaup@mac.com>
1238 Bug 8749: XBM rendered incorrectly as black on white
1240 xbm images are now created and rendered using black on a
1241 transparent background (same behavior as in Firefox)
1243 Test: platform/mac/fast/canvas/canvas-draw-xbm-image.html
1245 * platform/graphics/cg/ImageSourceCG.cpp:
1246 (WebCore::ImageSource::createFrameAtIndex):
1248 2008-02-24 Dan Bernstein <mitz@apple.com>
1250 Reviewed by Darin Adler.
1252 - fix http://bugs.webkit.org/show_bug.cgi?id=17471
1253 REGRESSION (r30438): Crash in deleteLineBoxes in cursor-adjusting code browsing Acid3
1255 Test: http/tests/misc/object-image-error.html
1257 * html/HTMLObjectElement.cpp:
1258 (WebCore::HTMLObjectElement::attach): Added an early return in case
1259 updateFromElement() has changed the object to use fallback content.
1261 2008-02-24 Dan Bernstein <mitz@apple.com>
1263 Reviewed by Darin Adler.
1265 - fix float positioning when a float that does not fit on the line is
1266 followed by a float that does
1268 Test: fast/block/float/narrow-after-wide.html
1270 * rendering/bidi.cpp:
1271 (WebCore::RenderBlock::findNextLineBreak): Changed to not position any
1272 more floats on the line once a float that does not fit is encountered.
1273 That float should be pushed to the next line, and so should all floats
1274 that follow, regardless of whether they can fit on the current line.
1276 2008-02-24 Darin Adler <darin@apple.com>
1280 - fix http://bugs.webkit.org/show_bug.cgi?id=16770
1281 Acid3 expects :visited styled links to restyle on iframe load
1283 Disentangle global history updating from the back/forward history.
1284 There are many cases where we don't want to create a new back/forward
1285 item, but we do still want to add to the global history (used for visited
1286 link coloring) in those cases.
1288 Test: fast/history/subframe-is-visited.html
1290 * loader/FrameLoader.cpp:
1291 (WebCore::FrameLoader::updateGlobalHistory): Renamed from
1292 addHistoryForCurrentLocation and removed the back/forward handling.
1293 (WebCore::FrameLoader::updateHistoryForStandardLoad): Streamlined logic a
1294 bit. Replaced call to addHistoryForCurrentLocation with a call to
1295 addBackForwardItemClippedAtTarget. Added an unconditional call to
1296 updateGlobalHistory.
1297 (WebCore::FrameLoader::updateHistoryForClientRedirect): Added a FIXME;
1298 why doesn't this function update global history?
1299 (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Ditto.
1300 (WebCore::FrameLoader::updateHistoryForReload): Replaced the direct call
1301 the client with a call to the new updateGlobalHistory function.
1302 (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Did
1303 the same changes as for updateHistoryForStandardLoad.
1304 * loader/FrameLoader.h: More of the same.
1306 * loader/FrameLoaderClient.h: Removed updateGlobalHistoryForReload and
1307 renamed updateGlobalHistoryForStandardLoad to updateGlobalHistory.
1309 * svg/graphics/SVGImageEmptyClients.h:
1310 (WebCore::SVGEmptyFrameLoaderClient::updateGlobalHistory): Updated to
1313 2008-02-23 Darin Adler <darin@apple.com>
1317 - fix http://bugs.webkit.org/show_bug.cgi?id=17508
1318 REGRESSION (r30535): mailto regression tests failing
1320 * html/HTMLFormElement.cpp:
1321 (WebCore::HTMLFormElement::submit): Restore the old logic, with its unpleasant
1322 trip through String do to the replace operation. It's inefficient, but there's
1323 no real reason to worry about the efficiency of mailto forms, since that feature
1326 2008-02-23 Darin Adler <darin@apple.com>
1330 - replace SegmentedString's use of DeprecatedValueList with Deque
1332 Testing indicates this is a slight speed-up for page loading.
1334 * platform/text/SegmentedString.cpp:
1335 (WebCore::SegmentedString::length): Update to use Deque.
1336 (WebCore::SegmentedString::setExcludeLineNumbers): Ditto.
1337 (WebCore::SegmentedString::append): Ditto.
1338 (WebCore::SegmentedString::prepend): Ditto.
1339 (WebCore::SegmentedString::advanceSubstring): Ditto.
1340 (WebCore::SegmentedString::toString): Ditto.
1341 * platform/text/SegmentedString.h: Tweak formatting. Don't bother making an entire
1342 class private with a single friend. Change m_sbstrings from a DeprecatedValueList
1345 2008-02-23 Darin Adler <darin@apple.com>
1349 - fix http://bugs.webkit.org/show_bug.cgi?id=17506
1350 REGRESSION (r30535): ASSERTION FAILED: i < size()
1352 * loader/TextResourceDecoder.cpp:
1353 (WebCore::findTextEncoding): Fix off-by-one in code that null-terminates
1356 2008-02-23 Matt Lilek <webkit@mattlilek.com>
1358 Not reviewed, build fix.
1360 * platform/network/cf/FormDataStreamCFNet.cpp:
1361 (WebCore::httpBodyFromRequest):
1362 * plugins/win/PluginViewWin.cpp:
1363 (WebCore::PluginView::handlePost):
1365 2008-02-23 Dan Bernstein <mitz@apple.com>
1369 * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
1370 (WebCore::GlyphPage::fill):
1371 * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
1372 (WebCore::GlyphPage::fill):
1374 2008-02-23 Dan Bernstein <mitz@apple.com>
1376 Reviewed by Anders Carlsson.
1378 - fix GlyphPage::fill() logic for partial page fills
1380 * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
1381 (WebCore::GlyphPage::fill): Changed the test for non-BMP characters to
1382 work correctly when the length parameter is less than a full page size.
1383 Also updated the comment.
1384 * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
1385 (WebCore::GlyphPage::fill): Ditto.
1387 2008-02-23 Kevin Ollivier <kevino@theolliviers.com>
1389 Reviewed by Darin Adler.
1391 Move text drawing into wxcode, as we need platform-dependent
1392 APIs for drawing non-kerned text, which wx doesn't yet have.
1393 (But hopefully will, once these APIs are fleshed out on all
1396 http://bugs.webkit.org/show_bug.cgi?id=17396
1398 * platform/graphics/wx/FontWx.cpp:
1399 (WebCore::Font::drawGlyphs):
1400 * platform/wx/wxcode/gtk/non-kerned-drawing.cpp: Added.
1401 * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp: Added.
1402 * platform/wx/wxcode/non-kerned-drawing.h: Added.
1403 * platform/wx/wxcode/win/non-kerned-drawing.cpp: Added.
1406 2008-02-23 Darin Adler <darin@apple.com>
1408 Pointed out by Mitz.
1410 * loader/TextResourceDecoder.cpp:
1411 (WebCore::find): Fix a "==" that was supposed to be ">".
1412 (WebCore::findIgnoringCase): Ditto.
1414 2008-02-23 Darin Adler <darin@apple.com>
1418 * html/HTMLFormElement.cpp:
1419 (WebCore::appendEncodedString): Fix buffer overrun in the code I just landed.
1421 2008-02-23 Darin Adler <darin@apple.com>
1425 - remove all but 1 remaining use of DeprecatedCString
1426 - change FormData to start refcount at 1
1428 * html/HTMLFormElement.cpp:
1429 (WebCore::appendString): Added. Helpers for Vector<char>.
1430 (WebCore::appendEncodedString): Renamed from encodeCString and changed to
1431 append to an existing Vector<char> to cut down a bit on memory allocation.
1432 (WebCore::HTMLFormElement::formData): Replace the DeprecatedCString called
1433 enc_string with a Vector<char> called encodedData. Change to use the new
1434 FormData::create function.
1435 (WebCore::HTMLFormElement::submit): Same thing, for the mailto form code.
1437 * loader/TextResourceDecoder.cpp:
1438 (WebCore::find): Added. Helper for searching in char* with length.
1439 (WebCore::findIgnoringCase): Ditto.
1440 (WebCore::findTextEncoding): Added. Helper for looking up a text encoding
1441 when we have a char* with length rather than a null-terminated char*.
1442 (WebCore::findXMLEncoding): Changed to use char* and length rather than
1443 DeprecatedCString. Also fixed some things that would be one-character
1444 buffer overruns in a string that's not null-terminated.
1445 (WebCore::TextResourceDecoder::checkForCSSCharset): Change to use
1446 findTextEncoding rather than constructing a CString to pass to the
1447 TextEncodingconstructor.
1448 (WebCore::TextResourceDecoder::checkForHeadCharset): Ditto.
1450 * platform/network/FormData.cpp:
1451 (WebCore::FormData::FormData): Changed to start refcount at 1.
1452 (WebCore::FormData::create): Added.
1453 (WebCore::FormData::copy): Call adoptRef since refcount starts at 1.
1454 * platform/network/FormData.h: Made constructor private. Added create functions.
1456 * platform/network/mac/ResourceRequestMac.mm:
1457 (WebCore::ResourceRequest::doUpdateResourceRequest): Call FormData::create.
1458 * xml/XMLHttpRequest.cpp:
1459 (WebCore::XMLHttpRequest::send): Ditto.
1461 2008-02-23 Darin Adler <darin@apple.com>
1465 - http://bugs.webkit.org/show_bug.cgi?id=17067
1466 eliminate attributes parameter from JSObject::put for speed/clarity
1468 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1469 (WebCore::JSCSSStyleDeclaration::customPut): Remove attributes argument.
1471 * bindings/js/JSCanvasPixelArrayCustom.cpp:
1472 (WebCore::JSCanvasPixelArray::indexGetter): Use early exit idiom.
1473 (WebCore::JSCanvasPixelArray::indexSetter): Moved length check into the
1474 CanvasPixelArray object, for consistency with the getter. Removed attributes
1477 * bindings/js/JSDOMWindowCustom.cpp:
1478 (WebCore::JSDOMWindow::customPut): Removed special case for variable
1479 initialization, which is not needed since that does use put any more.
1480 Removed attributes argument.
1482 * bindings/js/JSEventTargetBase.h:
1483 (WebCore::JSEventTargetBase::putValueProperty): Removed attributes argument.
1484 (WebCore::JSEventTargetBase::put): Ditto.
1485 (WebCore::JSEventTargetPrototype::self): Removed Internal flag.
1486 * bindings/js/JSEventTargetNode.cpp:
1487 (WebCore::JSEventTargetNode::put): Removed attributes argument.
1488 (WebCore::JSEventTargetNode::putValueProperty): Ditto.
1489 * bindings/js/JSEventTargetNode.h: Ditto.
1490 * bindings/js/JSHTMLAppletElementCustom.cpp:
1491 (WebCore::JSHTMLAppletElement::customPut): Ditto.
1492 * bindings/js/JSHTMLEmbedElementCustom.cpp:
1493 (WebCore::JSHTMLEmbedElement::customPut): Ditto.
1494 * bindings/js/JSHTMLInputElementBase.cpp:
1495 (WebCore::JSHTMLInputElementBase::put): Ditto.
1496 (WebCore::JSHTMLInputElementBase::putValueProperty): Ditto.
1497 * bindings/js/JSHTMLInputElementBase.h: Ditto.
1498 * bindings/js/JSHTMLObjectElementCustom.cpp:
1499 (WebCore::JSHTMLObjectElement::customPut): Ditto.
1500 * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1501 (WebCore::JSHTMLOptionsCollection::indexSetter): Ditto.
1502 * bindings/js/JSHTMLSelectElementCustom.cpp:
1503 (WebCore::JSHTMLSelectElement::indexSetter): Ditto.
1504 * bindings/js/JSHistoryCustom.cpp:
1505 (WebCore::JSHistory::customPut): Ditto.
1506 * bindings/js/JSLocation.cpp:
1507 (WebCore::JSLocation::put): Ditto.
1508 * bindings/js/JSLocation.h: Ditto.
1509 * bindings/js/JSXMLHttpRequest.cpp:
1510 (WebCore::JSXMLHttpRequest::put): Ditto.
1511 (WebCore::JSXMLHttpRequest::putValueProperty): Ditto.
1512 * bindings/js/JSXMLHttpRequest.h: Ditto.
1514 * bindings/js/kjs_dom.cpp:
1515 (WebCore::getRuntimeObject): Changed return type to JSObject*.
1516 * bindings/js/kjs_dom.h: Ditto.
1518 * bindings/js/kjs_events.cpp:
1519 (WebCore::JSClipboard::put): Removed attributes argument.
1520 (WebCore::JSClipboard::putValueProperty): Ditto.
1521 * bindings/js/kjs_events.h: Ditto.
1523 * bindings/js/kjs_html.cpp:
1524 (WebCore::runtimeObjectGetter): Updated for change to getRuntimeObject to
1525 return a JSObject. Used early exit idiom.
1526 (WebCore::runtimeObjectPropertyGetter): Ditto.
1527 (WebCore::runtimeObjectCustomGetOwnPropertySlot): Ditto.
1528 (WebCore::runtimeObjectCustomPut): Use hasProperty to check for properties
1529 that we should put with the property syntax instead of canPut.
1530 (WebCore::runtimeObjectImplementsCall): Ditto.
1531 (WebCore::runtimeObjectCallAsFunction): Ditto.
1532 * bindings/js/kjs_html.h: Removed attributes argument to runtimeObjectCustomPut.
1534 * bindings/js/kjs_window.cpp:
1535 (KJS::Window::put): Removed attributes argument.
1536 * bindings/js/kjs_window.h: Ditto.
1538 * bindings/scripts/CodeGeneratorJS.pm: Removed attributes argument from put,
1539 putValueProperty, customPut, and indexSetter.
1541 * html/CanvasPixelArray.h:
1542 (WebCore::CanvasPixelArray::set): Added index checking here, as in the get
1543 function. Before, the checking was done in the JavaScript bindings for set.
1545 2008-02-23 Brent Fulgham <bfulgham@gmail.com>
1547 Reviewed by Adam and Darin.
1549 http://bugs.webkit.org/show_bug.cgi?id=17442
1550 Correct the Windows Cairo implementation of GraphicsContext so
1551 that Windows 'WorldTransform' is kept in sync with the Cairo
1554 Also corrects an uninitialized variable in the Cairo Windows
1557 WARNING: NO TEST CASES ADDED OR CHANGED
1559 * platform/graphics/cairo/GraphicsContextCairo.cpp: Modify
1560 methods to call GraphicsContextPlatformPrivate calls, just
1561 as is done for the CoreGraphics version. These calls are
1562 nop's for everything but Windows.
1563 (WebCore::GraphicsContext::savePlatformState):
1564 (WebCore::GraphicsContext::restorePlatformState):
1565 (WebCore::GraphicsContext::clip):
1566 (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
1567 (WebCore::GraphicsContext::translate):
1568 (WebCore::GraphicsContext::concatCTM): Re-enable for Windows
1569 (WebCore::GraphicsContext::beginTransparencyLayer):
1570 (WebCore::GraphicsContext::endTransparencyLayer):
1571 (WebCore::GraphicsContext::rotate):
1572 (WebCore::GraphicsContext::scale):
1573 * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1574 * platform/graphics/win/GraphicsContextCGWin.cpp: Move common
1575 code for handling WorldTransform calls to parent class.
1576 * platform/graphics/win/GraphicsContextCairoWin.cpp: Add common
1577 code for handling WorldTransform calls.
1578 (WebCore::GraphicsContextPlatformPrivate::concatCTM): Change
1579 implementation so that it only handles WorldTransform. The
1580 Cairo update is done in GraphicsContextCairo.cpp
1581 * platform/graphics/win/GraphicsContextWin.cpp: Call platform-private
1582 methods to keep WorldTransform in sync.
1583 (WebCore::GraphicsContextPlatformPrivate::save):
1584 (WebCore::GraphicsContextPlatformPrivate::restore):
1585 (WebCore::GraphicsContextPlatformPrivate::clip):
1586 (WebCore::GraphicsContextPlatformPrivate::scale):
1587 (WebCore::GraphicsContextPlatformPrivate::rotate):
1588 (WebCore::GraphicsContextPlatformPrivate::translate):
1589 * platform/win/DragImageCairoWin.cpp:
1590 (WebCore::createDragImageFromImage): Correct uninitialized value
1592 2008-02-23 Dan Bernstein <mitz@apple.com>
1594 Reviewed by Dave Hyatt.
1596 - make non-autowrapping text clear floats
1598 Test: fast/text/whitespace/nowrap-clear-float.html
1600 * rendering/RenderBlock.cpp:
1601 (WebCore::RenderBlock::nextFloatBottomBelow): Renamed nearestFloat() to
1602 this and changed to avoid comparing bottom to 0 in each iteration.
1603 (WebCore::RenderBlock::getClearDelta): Updated comment for the rename.
1604 * rendering/RenderBlock.h:
1605 * rendering/bidi.cpp:
1606 (WebCore::RenderBlock::fitBelowFloats): Added. Factored out of
1607 findNextLineBreak() and simplified.
1608 (WebCore::RenderBlock::findNextLineBreak): Changed to call
1609 fitBelowFloats(). Fixed the bug by trying to fit below floats in the
1610 case of non-wrapping text. Removed some redundancy.
1612 2008-02-23 Sam Weinig <sam@webkit.org>
1614 Reviewed by Oliver Hunt.
1616 Fix for http://bugs.webkit.org/show_bug.cgi?id=17504
1617 Speed up DOM lists array subscription syntax by using the fast
1618 getOwnPropertySlot and set paths
1620 - 6x speed improvement on Oliver's ImageData put test.
1622 * bindings/scripts/CodeGeneratorJS.pm: Add fast path for getOwnPropertySlot
1623 and put when an indexGetter or indexSetter is used. We can not use the fast
1624 path if an overridingNameGetter is used as there would be no way to override.
1626 2008-02-23 Kevin Ollivier <kevino@theolliviers.com>
1628 wx build fix after JSImageData.cpp was added.
1630 * WebCoreSources.bkl:
1632 2008-02-23 Alexey Proskuryakov <ap@webkit.org>
1634 Windows build fix - move ThreadCondition implementation from WebCore to WTF.
1636 * WebCore.vcproj/WebCore.vcproj:
1637 * platform/win/ThreadConditionWin.cpp: Removed.
1639 2008-02-23 Alexey Proskuryakov <ap@webkit.org>
1643 Move basic threading support from WebCore to WTF.
1645 One call that remains in WebCore is callOnMainThread(), and it has its own header now.
1647 * ForwardingHeaders/wtf/Locker.h: Added.
1648 * ForwardingHeaders/wtf/MessageQueue.h: Added.
1649 * ForwardingHeaders/wtf/Threading.h: Added.
1652 * WebCore.vcproj/WebCore.vcproj:
1653 * WebCore.xcodeproj/project.pbxproj:
1654 * WebCoreSources.bkl:
1655 * bindings/js/JSCustomSQLTransactionCallback.cpp:
1656 * dom/XMLTokenizer.cpp:
1657 * loader/icon/IconDatabase.cpp:
1658 (WebCore::iconDatabase):
1659 * loader/icon/IconDatabase.h:
1660 * platform/Locker.h: Removed.
1661 * platform/MainThread.h: Copied from WebCore/platform/Threading.h.
1662 (WebCore::initializeThreadingAndMainThread):
1663 * platform/MessageQueue.h: Removed.
1664 * platform/SecurityOrigin.h:
1665 * platform/Threading.h: Removed.
1666 * platform/ThreadingNone.cpp: Removed.
1667 * platform/gtk/MainThreadGtk.cpp: Copied from WebCore/platform/gtk/ThreadingGtk.cpp.
1668 * platform/gtk/ThreadingGtk.cpp: Removed.
1669 * platform/mac/MainThreadMac.mm: Copied from WebCore/platform/mac/Threading.mm.
1670 * platform/mac/Threading.mm: Removed.
1671 * platform/pthreads: Removed.
1672 * platform/pthreads/ThreadingPthreads.cpp: Removed.
1673 * platform/qt/MainThreadQt.cpp: Copied from WebCore/platform/qt/ThreadingQt.cpp.
1674 * platform/qt/ThreadingQt.cpp: Removed.
1675 * platform/sql/SQLValue.h:
1676 * platform/sql/SQLiteAuthorizer.h:
1677 * platform/sql/SQLiteDatabase.h:
1678 * platform/win/MainThreadWin.cpp: Copied from WebCore/platform/win/ThreadingWin.cpp.
1679 (WebCore::initializeThreadingAndMainThread):
1680 * platform/win/MutexWin.cpp: Removed.
1681 * platform/win/ThreadingWin.cpp: Removed.
1682 * platform/wx/MainThreadWx.cpp: Copied from WebCore/platform/wx/ThreadingWx.cpp.
1683 * platform/wx/ThreadingWx.cpp: Removed.
1684 * storage/Database.cpp:
1685 (WebCore::Database::Database):
1686 * storage/Database.h:
1687 * storage/DatabaseTask.h:
1688 * storage/DatabaseThread.h:
1689 * storage/DatabaseTracker.cpp:
1690 * storage/OriginQuotaManager.h:
1691 * storage/SQLError.h:
1692 * storage/SQLResultSet.h:
1693 * storage/SQLStatement.h:
1694 * storage/SQLStatementCallback.h:
1695 * storage/SQLStatementErrorCallback.h:
1696 * storage/SQLTransaction.h:
1697 * storage/SQLTransactionCallback.h:
1698 * storage/SQLTransactionErrorCallback.h:
1701 2008-02-23 David Kilzer <ddkilzer@apple.com>
1703 Please clarify licensing for some files
1704 <http://bugs.webkit.org/show_bug.cgi?id=14970>
1708 * bindings/objc/WebScriptObject.h: Added Apple BSD-style license.
1709 * bindings/objc/WebScriptObjectPrivate.h: Ditto.
1710 * platform/text/mac/ShapeArabic.c: Added ICU license from WebCore/icu/LICENSE.
1712 2008-02-22 Justin Garcia <justin.garcia@apple.com>
1714 Reviewed by Anders Carlsson.
1716 <rdar://problem/5714333> Add document.getSelection()
1718 Add a synonym for window.getSelection() that FF supports. There were requests in
1719 this bugs dupes to also support the IE only document.selection, but IE's Selection
1720 object is too different than ours currently for that to be safe (specifically, we
1721 don't support enough of IE's TextRange methods on our DOM Range object yet). I
1722 filed <rdar://problem/5761233> to cover that.
1725 (WebCore::Document::getSelection): Added.
1727 * dom/Document.idl: Ditto. JS only since this is about web compatibility.
1729 2008-02-22 Oliver Hunt <oliver@apple.com>
1733 * WebCoreSources.bkl:
1735 2008-02-22 Oliver Hunt <oliver@apple.com>
1737 Once more with the cairo/qt/wx build fixing
1739 * platform/graphics/cairo/ImageBufferCairo.cpp:
1740 * platform/graphics/qt/ImageBufferQt.cpp:
1741 * platform/graphics/wx/ImageBufferWx.cpp:
1743 2008-02-22 Mark Rowe <mrowe@apple.com>
1745 Windows build fix. Add missing include of DeprecatedCString.h and sort existing includes.
1747 * platform/win/PasteboardWin.cpp:
1749 2008-02-22 Mark Rowe <mrowe@apple.com>
1751 Speculative Windows build fix.
1753 * platform/win/ClipboardUtilitiesWin.cpp: Add missing include of DeprecatedCString.h and sort existing includes.
1754 * platform/win/ClipboardWin.cpp: Ditto.
1756 2008-02-22 Oliver Hunt <oliver@apple.com>
1758 Build fix for windows, wx and qt
1760 * html/CanvasPixelArray.h:
1761 (WebCore::CanvasPixelArray::set):
1763 2008-02-22 Oliver Hunt <oliver@apple.com>
1765 Unbreak windows vcproj
1767 * WebCore.vcproj/WebCore.vcproj:
1769 2008-02-22 Oliver Hunt <oliver@apple.com>
1773 Support Canvas.getImageData and Canvas.createImageData
1775 This patch adds support for all the pixel reading portions
1776 of the HTML5 Canvas spec. There are two new types ImageData
1777 and CanvasPixelArray which are used to provide the HTML5
1778 ImageData object, and the required semantics for assignment
1779 to the ImageData data array.
1781 We only implement the CG version of ImageBuffer::getImageData,
1782 but the logic is null safe, so this will not introduce any
1783 crashes into other platforms, unfortunately it will result in
1784 JS Object detection "lying" on non-CG platforms.
1786 Tests: fast/canvas/canvas-ImageData-behaviour.html
1787 fast/canvas/canvas-getImageData.html
1789 * DerivedSources.make:
1792 * WebCore.vcproj/WebCore.vcproj:
1793 * WebCore.xcodeproj/project.pbxproj:
1794 * bindings/js/JSCanvasPixelArrayCustom.cpp: Added.
1795 (WebCore::JSCanvasPixelArray::indexGetter):
1796 (WebCore::JSCanvasPixelArray::indexSetter):
1798 * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1799 * bindings/scripts/CodeGeneratorJS.pm:
1800 * html/CanvasPixelArray.cpp: Added.
1801 (WebCore::CanvasPixelArray::create):
1802 * html/CanvasPixelArray.h: Added.
1803 (WebCore::CanvasPixelArray::data):
1804 (WebCore::CanvasPixelArray::length):
1805 (WebCore::CanvasPixelArray::set):
1806 (WebCore::CanvasPixelArray::get):
1807 * html/CanvasPixelArray.idl: Added.
1808 * html/CanvasRenderingContext2D.cpp:
1809 (WebCore::createEmptyImageData):
1810 (WebCore::CanvasRenderingContext2D::createImageData):
1811 (WebCore::CanvasRenderingContext2D::getImageData):
1812 * html/CanvasRenderingContext2D.h:
1813 * html/CanvasRenderingContext2D.idl:
1814 * html/HTMLCanvasElement.cpp:
1815 (WebCore::HTMLCanvasElement::convertLogicalToDevice):
1816 (WebCore::HTMLCanvasElement::createImageBuffer):
1817 * html/HTMLCanvasElement.h:
1818 * html/ImageData.cpp: Added.
1819 (WebCore::ImageData::create):
1820 (WebCore::ImageData::ImageData):
1821 * html/ImageData.h: Added.
1822 (WebCore::ImageData::width):
1823 (WebCore::ImageData::height):
1824 (WebCore::ImageData::data):
1825 * html/ImageData.idl: Added.
1826 * platform/graphics/ImageBuffer.h:
1827 * platform/graphics/cairo/ImageBufferCairo.cpp:
1828 (WebCore::ImageBuffer::getImageData):
1829 * platform/graphics/cg/ImageBufferCG.cpp:
1830 (WebCore::ImageBuffer::getImageData):
1831 * platform/graphics/qt/ImageBufferQt.cpp:
1832 (WebCore::ImageBuffer::getImageData):
1833 * platform/graphics/wx/ImageBufferWx.cpp:
1834 (WebCore::ImageBuffer::getImageData):
1836 2008-02-22 Sam Weinig <sam@webkit.org>
1838 Rubber-stamped by Adam Roben.
1840 Rid the project of the Devil known as DeprecatedString!
1845 * WebCore.vcproj/WebCore.vcproj:
1846 * WebCore.xcodeproj/project.pbxproj:
1847 * WebCoreSources.bkl:
1849 * html/HTMLFormElement.cpp:
1850 * platform/DeprecatedString.cpp: Removed.
1851 * platform/DeprecatedString.h: Removed.
1852 * platform/graphics/qt/IconQt.cpp:
1853 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
1854 * platform/gtk/CookieJarGtk.cpp:
1855 * platform/gtk/CursorGtk.cpp:
1856 * platform/gtk/KeyEventGtk.cpp:
1857 * platform/mac/DeprecatedStringMac.mm: Removed.
1858 * platform/network/qt/ResourceHandleQt.cpp:
1859 * platform/network/win/CookieJarWin.cpp:
1861 * platform/qt/ClipboardQt.cpp:
1862 * platform/qt/CookieJarQt.cpp:
1863 * platform/qt/CursorQt.cpp:
1864 * platform/symbian/DeprecatedStringSymbian.cpp: Removed.
1865 * platform/text/AtomicString.cpp:
1866 * platform/text/AtomicString.h:
1867 * platform/text/PlatformString.h:
1868 * platform/text/String.cpp:
1869 * platform/text/StringImpl.cpp:
1870 * platform/text/qt/StringQt.cpp:
1871 (WebCore::String::String):
1872 * platform/text/wx/StringWx.cpp:
1873 * platform/win/BString.cpp:
1874 * platform/win/BString.h:
1875 * platform/win/PasteboardWin.cpp:
1877 2008-02-22 Sam Weinig <sam@webkit.org>
1879 Reviewed by Geoff Garen.
1881 - Remove use of DeprecatedString in CSSStyleSelector.
1883 * css/CSSStyleSelector.cpp:
1884 (WebCore::findHash): Removed. Use find instead.
1885 (WebCore::findSlashDotDotSlash): Changed to take a UChar* and a length.
1886 (WebCore::findSlashSlash): Ditto.
1887 (WebCore::findSlashDotSlash): Ditto.
1888 (WebCore::containsColonSlashSlash): Ditto.
1889 (WebCore::cleanPath): Change to operate on a String.
1890 (WebCore::checkPseudoState): Changed to use a Vector as a buffer.
1892 2008-02-22 Geoffrey Garen <ggaren@apple.com>
1894 Reviewed by Sam Weinig.
1896 Fixed <rdar://problem/5057509> Repro leak of JSXMLHttpRequest and
1897 associated objects @ www.viamichelin.it, which was probably an underlying
1898 cause of <rdar://problem/5744037> Gmail out of memory (17455)
1900 If SubresourceLoader::create returned NULL, we would ref() / gcProtect()
1901 the XMLHttpRequest but think we hadn't, therefore never
1902 calling deref() / gcUnprotect().
1904 This could happen at gmail.com, since gmail.com attempts to send
1905 XMLHttpRequests from unload handlers in order to gather usage statistics.
1906 (According to comments in the code, SubresourceLoader::create returns
1907 NULL when called from an unload handler.)
1909 The solution is to ref() / gcProtect() only if SubresourceLoader::create
1910 doesn't return NULL. This make sense, since we only need to protect the
1911 request as long as it has an outstanding network transaction.
1913 * xml/XMLHttpRequest.cpp:
1914 (WebCore::XMLHttpRequest::XMLHttpRequest):
1915 (WebCore::XMLHttpRequest::send):
1917 2008-02-22 Darin Adler <darin@apple.com>
1919 Reviewed, tweaked and landed by Sam.
1921 - Make RegularExpression operate on Strings instead of DeprecatedStrings.
1923 * dom/DOMImplementation.cpp:
1924 (WebCore::DOMImplementation::isXMLMIMEType): Use string instead of DeprecatedString
1925 to build up the RegularExpression.
1927 (WebCore::createRegExpForLabels): Use String instead of DeprecatedString.
1928 (WebCore::Frame::searchForLabelsAboveCell): Ditto.
1929 (WebCore::Frame::searchForLabelsBeforeElement): Ditto.
1930 (WebCore::Frame::matchLabelsAgainstElement): Ditto.
1932 * page/mac/FrameMac.mm:
1933 (WebCore::regExpForLabels): Ditto.
1934 (WebCore::Frame::searchForNSLabelsAboveCell): Ditto.
1935 (WebCore::Frame::searchForLabelsBeforeElement): Ditto.
1936 (WebCore::Frame::matchLabelsAgainstElement): Ditto.
1938 * platform/text/RegularExpression.cpp:
1939 (WebCore::RegularExpression::Private::Private):
1940 (WebCore::RegularExpression::Private::compile):
1941 (WebCore::RegularExpression::RegularExpression):
1942 (WebCore::RegularExpression::operator=):
1943 (WebCore::RegularExpression::pattern):
1944 (WebCore::RegularExpression::match):
1945 (WebCore::RegularExpression::search):
1946 (WebCore::RegularExpression::searchRev):
1947 (WebCore::replace): Added.
1948 * platform/text/RegularExpression.h:
1949 Change functions to take Strings as input instead of DeprecatedStrings and
1950 reduce the complexity of the class by removing unneeded globbing support.
1952 2008-02-22 Jon Honeycutt <jhoneycutt@apple.com>
1956 <rdar://problem/5760360> REGRESSION(r30376): Crash loading plugin page
1957 during stress test (after only 5 min) - null dereference
1959 Full-frame plug-ins create PluginStream objects without loaders, as the
1960 PluginView receives the loading callbacks. We were trying to call
1961 setDefersLoading on these null pointers.
1963 * plugins/PluginStream.cpp:
1964 (WebCore::PluginStream::startStream): Add null check.
1965 (WebCore::PluginStream::destroyStream): Same.
1966 (WebCore::PluginStream::deliverData): Same.
1968 2008-02-22 Darin Adler <darin@apple.com>
1970 Reviewed and tweaked by Jon Honeycutt. Reviewed and landed by Sam.
1972 - Remove uses of DeprecatedString in Windows plugin code.
1974 * plugins/win/PluginPackageWin.cpp:
1975 (WebCore::getVersionInfo): Cleanup formatting.
1976 (WebCore::PluginPackage::freeLibraryTimerFired): Remove un-needed variable name.
1977 (WebCore::PluginPackage::storeFileVersion): Move casts.
1978 (WebCore::PluginPackage::fetchInfo): Use OwnArrayPtr and switch to more efficient
1980 (WebCore::PluginPackage::load): Fix whitespace.
1981 (WebCore::PluginPackage::hash): Make the hashCodes const
1982 * plugins/win/PluginViewWin.cpp:
1983 (WebCore::makeURL): Use String instead of DeprecatedString.
1984 (WebCore::parseRFC822HeaderFields): Ditto.
1985 (WebCore::PluginView::handlePost): Ditto.
1986 (WebCore::PluginView::status): Ditto.
1988 2008-02-22 Darin Adler <darin@apple.com>
1990 Reviewed, tweaked and landed by Sam.
1992 - Don't use DeprecatedString in HTMLTokenizer.
1994 * html/HTMLTokenizer.cpp:
1995 (WebCore::HTMLTokenizer::finish):
1996 * platform/text/PlatformString.h:
1999 2008-02-21 Sam Weinig <sam@webkit.org>
2001 Reviewed by Anders Carlsson.
2003 Fix for <rdar://problem/5757946>
2005 - Parse URLs before checking whether they are javascript: urls
2006 (which require security checks).
2008 * bindings/js/JSAttrCustom.cpp:
2009 (WebCore::JSAttr::setValue):
2010 * bindings/js/JSElementCustom.cpp:
2011 (WebCore::allowSettingSrcToJavascriptURL):
2012 * bindings/js/JSHTMLFrameElementCustom.cpp:
2013 (WebCore::allowSettingJavascriptURL):
2014 * bindings/js/JSHTMLIFrameElementCustom.cpp:
2015 (WebCore::JSHTMLIFrameElement::setSrc):
2017 2008-02-21 Ada Chan <adachan@apple.com>
2019 <rdar://problem/5757873> Buffer overrun in DeprecatedCString::find() in WebCore
2020 We could get a buffer overrun in DeprecatedCString::find() if the end of the
2021 string matches a beginning portion of the substring, for example, if string is
2022 "a" but the substring is "ab".
2023 The code as is also will not match things correctly under certain situations
2024 since the inner while loop increments the index. For example, we wouldn't find
2025 a match if the string is "aab..." and the substring is "ab". Changed the
2026 inner while loop to increment a temporary index into str.
2028 Test: fast/loader/charset-parse.html
2030 Reviewed by Dan Berstein.
2032 * platform/DeprecatedCString.cpp:
2033 (WebCore::DeprecatedCString::find):
2035 2008-02-21 David Hyatt <hyatt@apple.com>
2037 Fix for bug 17301. CSS media queries need to use the correct viewport
2038 when contained in documents inside iframes (rather than always using the
2039 top-level document's viewport). CSS media queries based on the viewport
2040 also needed to be dynamic and update as you resize the window (this is
2043 This patch gets Acid3 up to 86/100 with 3 colored boxes filled in.
2047 Added fast/media/viewport-media-query.html
2049 * css/CSSStyleSelector.cpp:
2050 (WebCore::CSSStyleSelector::CSSStyleSelector):
2051 (WebCore::CSSStyleSelector::addViewportDependentMediaQueryResult):
2052 (WebCore::CSSStyleSelector::affectedByViewportChange):
2053 * css/CSSStyleSelector.h:
2054 (WebCore::MediaQueryResult::MediaQueryResult):
2055 * css/MediaQueryEvaluator.cpp:
2056 (WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
2057 (WebCore::MediaQueryEvaluator):
2058 (WebCore::MediaQueryEvaluator::eval):
2059 (WebCore::colorMediaFeatureEval):
2060 (WebCore::monochromeMediaFeatureEval):
2061 (WebCore::device_aspect_ratioMediaFeatureEval):
2062 (WebCore::device_pixel_ratioMediaFeatureEval):
2063 (WebCore::gridMediaFeatureEval):
2064 (WebCore::device_heightMediaFeatureEval):
2065 (WebCore::device_widthMediaFeatureEval):
2066 (WebCore::heightMediaFeatureEval):
2067 (WebCore::widthMediaFeatureEval):
2068 (WebCore::min_colorMediaFeatureEval):
2069 (WebCore::max_colorMediaFeatureEval):
2070 (WebCore::min_monochromeMediaFeatureEval):
2071 (WebCore::max_monochromeMediaFeatureEval):
2072 (WebCore::min_device_aspect_ratioMediaFeatureEval):
2073 (WebCore::max_device_aspect_ratioMediaFeatureEval):
2074 (WebCore::min_device_pixel_ratioMediaFeatureEval):
2075 (WebCore::max_device_pixel_ratioMediaFeatureEval):
2076 (WebCore::min_heightMediaFeatureEval):
2077 (WebCore::max_heightMediaFeatureEval):
2078 (WebCore::min_widthMediaFeatureEval):
2079 (WebCore::max_widthMediaFeatureEval):
2080 (WebCore::min_device_heightMediaFeatureEval):
2081 (WebCore::max_device_heightMediaFeatureEval):
2082 (WebCore::min_device_widthMediaFeatureEval):
2083 (WebCore::max_device_widthMediaFeatureEval):
2084 * css/MediaQueryEvaluator.h:
2085 * css/MediaQueryExp.cpp:
2086 (WebCore::MediaQueryExp::~MediaQueryExp):
2087 * css/MediaQueryExp.h:
2088 (WebCore::MediaQueryExp::value):
2089 (WebCore::MediaQueryExp::isViewportDependent):
2090 * html/HTMLMediaElement.cpp:
2091 (WebCore::HTMLMediaElement::pickMedia):
2092 * page/FrameView.cpp:
2093 (WebCore::FrameView::layout):
2095 2008-02-21 Anders Carlsson <andersca@apple.com>
2099 Make more classes start out with a refcount of 1.
2101 * dom/QualifiedName.cpp:
2102 (WebCore::QNameComponentsTranslator::translate):
2103 (WebCore::QualifiedName::QualifiedName):
2104 * dom/QualifiedName.h:
2105 (WebCore::QualifiedName::QualifiedNameImpl::create):
2106 (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
2107 * history/BackForwardList.cpp:
2108 (WebCore::BackForwardList::BackForwardList):
2109 * history/BackForwardList.h:
2110 (WebCore::BackForwardList::create):
2112 (WebCore::Page::Page):
2113 * platform/text/CString.cpp:
2114 (WebCore::CString::init):
2115 (WebCore::CString::newUninitialized):
2116 (WebCore::CString::copyBufferIfNeeded):
2117 * platform/text/CString.h:
2118 (WebCore::CStringBuffer::create):
2119 (WebCore::CStringBuffer::CStringBuffer):
2121 2008-02-21 Kevin Ollivier <kevino@theolliviers.com>
2123 wx build fix for the domString() -> string() rename in r30443.
2125 * platform/graphics/wx/FontPlatformDataWx.cpp:
2126 (WebCore::FontPlatformData::FontPlatformData):
2128 2008-02-21 Antti Koivisto <antti@apple.com>
2130 Reviewed by Sam Weinig.
2132 <rdar://problem/5753789>
2133 REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang)
2135 Ensure all versions of allowsAccessFrom are inlined to single functions.
2136 This is a 2% win in browser hosted Sunspider.
2138 * bindings/js/kjs_window.cpp:
2139 (KJS::Window::allowsAccessFrom):
2140 (KJS::Window::allowsAccessFromPrivate):
2141 * bindings/js/kjs_window.h:
2143 2008-02-21 Dan Bernstein <mitz@apple.com>
2145 Reviewed by Sam Weinig.
2149 * rendering/bidi.cpp:
2150 (WebCore::bidiNext): Removed redundant isBR() check -- isText() returns
2151 true for RenderLineBreak.
2152 (WebCore::bidiFirst): Ditto.
2153 (WebCore::shouldSkipWhitespaceAfterStartObject):
2154 (WebCore::RenderBlock::findNextLineBreak):
2156 2008-02-21 Geoffrey Garen <ggaren@apple.com>
2158 Reviewed by David Harrison.
2160 Fixed <rdar://problem/5756125> REGRESSION: A crash occurs at
2161 WebCore::Frame::scriptProxy() when completing a search with Package Tracker widget
2163 Test: fast/dom/script-element-without-frame-crash.html
2165 * html/HTMLTokenizer.cpp:
2166 (WebCore::HTMLTokenizer::parseTag): Added back a NULL check that was
2167 accidentally removed in r30325.
2169 2008-02-21 Rodney Dawes <dobey@wayofthemonkey.com>
2171 GTK+ build fix. s/domString()/string()/
2173 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2174 (FontPlatformData::FontPlatformData):
2176 2008-02-20 Dan Bernstein <mitz@apple.com>
2178 Reviewed by Dave Hyatt.
2180 - fix http://bugs.webkit.org/show_bug.cgi?id=17465
2181 REGRESSION: <DIV> tokenized into Div if still searching for DOCTYPE
2183 Test: fast/tokenizer/doctype-search-reset.html
2185 * html/HTMLTokenizer.cpp:
2186 (WebCore::HTMLTokenizer::parseTag):
2188 2008-02-20 Dan Bernstein <mitz@apple.com>
2190 Reviewed by Dave Hyatt.
2192 - fix http://bugs.webkit.org/show_bug.cgi?id=17464
2193 REGRESSION: Crash in RenderBlock::findNextLineBreak reading r30444 commit email in GMail
2195 Test: fast/text/wbr-in-pre-crash.html
2197 * rendering/bidi.cpp:
2198 (WebCore::RenderBlock::findNextLineBreak):
2200 2008-02-20 Oliver Hunt <oliver@apple.com>
2204 Bug 17303: Canvas crash in ImageBuffer
2206 We handle a null GraphicsContext everywhere, but we weren't checking for
2207 a null ImageBuffer, which is what will result in a null GraphicsContext in
2210 Test: fast/canvas/access-zero-sized-canvas.html
2212 * html/HTMLCanvasElement.cpp:
2214 2008-02-20 David Hyatt <hyatt@apple.com>
2216 Fix the layout test failure that never should have passed in the first
2217 place by making changes to media lists actually result in the recomputation
2218 of the style selector. Now it passes for the right reasons and not because
2221 Reviewed by Sam Weinig
2223 * css/MediaList.cpp:
2224 (WebCore::MediaList::deleteMedium):
2225 (WebCore::MediaList::setMediaText):
2226 (WebCore::MediaList::appendMedium):
2227 (WebCore::MediaList::notifyChanged):
2230 (WebCore::Document::attach):
2232 2008-02-20 Darin Adler <darin@apple.com>
2234 Reviewed, tweaked and landed by Sam.
2236 - make markup functions not use DeprecatedString.
2238 * editing/markup.cpp:
2239 (WebCore::append): Added.
2240 (WebCore::escapeContentText): Build up string using a Vector.
2241 (WebCore::appendStartMarkup): Use String instead of DeprecatedString.
2243 2008-02-20 Darin Adler <darin@apple.com>
2245 Reviewed, tweaked and landed by Sam.
2247 - make TextIterator use a Vector instead of a DeprecatedString.
2249 * editing/TextIterator.cpp:
2250 (WebCore::CharacterIterator::string): Build up the String using a
2252 (WebCore::WordAwareIterator::advance): Switch to using Vector functions.
2253 (WebCore::WordAwareIterator::length): Ditto.
2254 (WebCore::WordAwareIterator::characters): Ditto.
2255 * editing/TextIterator.h: Use a Vector<UChar> for the buffer instead
2256 of DeprecatedString.
2258 2008-02-20 Darin Adler <darin@apple.com>
2260 Reviewed, tweaked and landed by Sam.
2262 - make HTMLInterchange return a String instead of a DeprecatedString
2264 * editing/HTMLInterchange.cpp:
2265 (WebCore::): Return a String from convertedSpaceString.
2266 (WebCore::convertHTMLTextToInterchangeFormat): Use a Vector instead of
2267 a DeprecatedString to build up the return String.
2268 * editing/HTMLInterchange.h:
2270 2008-02-20 Eric Seidel <eric@webkit.org>
2274 Remove m_drawingContext and change m_data to m_imageBuffer
2276 * html/HTMLCanvasElement.cpp:
2277 (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2278 (WebCore::HTMLCanvasElement::reset):
2279 (WebCore::HTMLCanvasElement::paint):
2280 (WebCore::HTMLCanvasElement::createImageBuffer):
2281 (WebCore::HTMLCanvasElement::buffer):
2282 (WebCore::HTMLCanvasElement::createPlatformImage):
2283 * html/HTMLCanvasElement.h:
2285 2008-02-20 Anders Carlsson <andersca@apple.com>
2289 Rename AtomicString::domString() to AtomicString::string().
2291 * css/CSSComputedStyleDeclaration.cpp:
2292 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2293 * css/CSSFontSelector.cpp:
2294 (WebCore::CSSFontSelector::getFontData):
2296 (WebCore::Attr::createTextChild):
2298 (WebCore::Comment::nodeName):
2300 (WebCore::Document::recalcStyleSelector):
2301 (WebCore::Document::setHTMLWindowEventListener):
2302 (WebCore::Document::formElementsState):
2303 * dom/StyledElement.cpp:
2304 (WebCore::StyledElement::parseMappedAttribute):
2306 (WebCore::Text::nodeName):
2307 * editing/SelectionController.cpp:
2308 (WebCore::SelectionController::debugRenderer):
2309 * html/HTMLCollection.cpp:
2310 (WebCore::HTMLCollection::checkForNameMatch):
2311 * html/HTMLElement.cpp:
2312 (WebCore::HTMLElement::nodeName):
2313 (WebCore::HTMLElement::setHTMLEventListener):
2314 * html/HTMLFormCollection.cpp:
2315 (WebCore::HTMLFormCollection::getNamedFormItem):
2316 * html/HTMLImageElement.cpp:
2317 (WebCore::HTMLImageElement::parseMappedAttribute):
2318 (WebCore::HTMLImageElement::isURLAttribute):
2319 * html/HTMLLinkElement.cpp:
2320 (WebCore::HTMLLinkElement::parseMappedAttribute):
2321 (WebCore::HTMLLinkElement::tokenizeRelAttribute):
2322 * html/HTMLObjectElement.cpp:
2323 (WebCore::HTMLObjectElement::isURLAttribute):
2324 (WebCore::HTMLObjectElement::containsJavaApplet):
2325 * html/HTMLParamElement.cpp:
2326 (WebCore::HTMLParamElement::isURLAttribute):
2327 * html/HTMLParser.cpp:
2328 (WebCore::HTMLParser::handleIsindex):
2329 * html/HTMLScriptElement.cpp:
2330 (WebCore::HTMLScriptElement::insertedIntoDocument):
2331 (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript):
2332 * html/HTMLStyleElement.cpp:
2333 (WebCore::HTMLStyleElement::parseMappedAttribute):
2334 * html/HTMLTokenizer.cpp:
2335 (WebCore::HTMLTokenizer::parseTag):
2336 * html/HTMLViewSourceDocument.cpp:
2337 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
2338 * loader/FrameLoader.cpp:
2339 (WebCore::FrameLoader::saveDocumentState):
2340 * page/FrameTree.cpp:
2341 (WebCore::FrameTree::uniqueChildName):
2342 * platform/text/AtomicString.h:
2343 (WebCore::AtomicString::string):
2344 (WebCore::AtomicString::contains):
2345 (WebCore::AtomicString::find):
2346 (WebCore::AtomicString::startsWith):
2347 (WebCore::AtomicString::endsWith):
2348 * rendering/RenderPartObject.cpp:
2349 (WebCore::RenderPartObject::updateWidget):
2350 * svg/SVGElement.cpp:
2351 (WebCore::SVGElement::addSVGEventListener):
2352 * svg/SVGSVGElement.cpp:
2353 (WebCore::SVGSVGElement::addSVGWindowEventListener):
2354 * xml/XPathFunctions.cpp:
2355 (WebCore::XPath::FunLocalName::evaluate):
2356 (WebCore::XPath::FunNamespaceURI::evaluate):
2357 (WebCore::XPath::FunName::evaluate):
2359 2008-02-20 Brent Fulgham <bfulgham@gmail.com>
2363 http://bugs.webkit.org/show_bug.cgi?id=17336
2364 Provide implementations for Windows (Cairo) build of WebKit that
2365 handles font formatting.
2366 - Split font implementation files to allow maximal code sharing
2367 between CG and Cairo back-ends.
2369 * WebCore.vcproj/WebCore.vcproj:
2370 * platform/graphics/SimpleFontData.h: Add signatures for private win
2371 initialization functions.
2372 * platform/graphics/win/FontCacheWin.cpp:
2373 (WebCore::FontCache::platformInit):
2374 (WebCore::FontCache::createFontPlatformData):
2375 * platform/graphics/win/FontCairoWin.cpp: Removed. Universal version
2376 is now part of platform/graphics/cairo.
2377 * platform/graphics/win/FontCustomPlatformDataCairo.cpp: Added.
2378 (WebCore::FontCustomPlatformDataCairo::~FontCustomPlatformDataCairo):
2379 (WebCore::FontCustomPlatformDataCairo::fontPlatformData):
2380 (WebCore::releaseData):
2381 (WebCore::createFontCustomPlatformData):
2382 * platform/graphics/win/FontCustomPlatformDataCairo.h: Added.
2383 (WebCore::FontCustomPlatformDataCairo::FontCustomPlatformDataCairo):
2384 * platform/graphics/win/FontPlatformData.h:
2385 (WebCore::FontPlatformData::FontPlatformData):
2386 (WebCore::FontPlatformData::fontFace):
2387 (WebCore::FontPlatformData::scaledFont):
2388 (WebCore::FontPlatformData::operator==):
2389 * platform/graphics/win/FontPlatformDataCGWin.cpp: Copied from WebCore/platform/graphics/win/FontPlatformDataWin.cpp.
2390 (WebCore::FontPlatformData::platformDataInit):
2391 * platform/graphics/win/FontPlatformDataCairoWin.cpp: Added.
2392 (WebCore::FontPlatformData::platformDataInit):
2393 (WebCore::FontPlatformData::FontPlatformData):
2394 (WebCore::FontPlatformData::setFont):
2395 * platform/graphics/win/FontPlatformDataWin.cpp: Moved CG-specific
2396 code to FontPlatformDataCG.cpp.
2397 (WebCore::FontPlatformData::FontPlatformData):
2398 * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp: Copied from WebCore/platform/graphics/win/GlyphPageTreeNodeWin.cpp.
2399 * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp: Copied from WebCore/platform/graphics/win/GlyphPageTreeNodeWin.cpp.
2400 (WebCore::GlyphPage::fill):
2401 * platform/graphics/win/GlyphPageTreeNodeWin.cpp: Removed. Replaced
2402 with CG- and Cairo-specific versions.
2403 * platform/graphics/win/SimpleFontDataCGWin.cpp:
2404 (WebCore::SimpleFontData::platformInit):
2405 (WebCore::SimpleFontData::platformDestroy):
2406 (WebCore::SimpleFontData::platformWidthForGlyph):
2407 * platform/graphics/win/SimpleFontDataCairoWin.cpp:
2408 (WebCore::SimpleFontData::platformInit):
2409 (WebCore::SimpleFontData::platformDestroy):
2410 (WebCore::SimpleFontData::platformWidthForGlyph):
2411 (WebCore::SimpleFontData::setFont):
2412 * platform/graphics/win/SimpleFontDataWin.cpp:
2413 (WebCore::SimpleFontData::initGDIFont):
2414 (WebCore::SimpleFontData::platformCommonDestroy):
2415 (WebCore::SimpleFontData::widthForGDIGlyph):
2417 2008-02-20 Darin Adler <darin@apple.com>
2421 * dom/Node.h: Took out unneeded forward declaration of TextStream.
2423 2008-02-20 Darin Adler <darin@apple.com>
2427 * rendering/RenderObject.h: Took out unneeded forward declaration of TextStream.
2429 2008-02-20 David Hyatt <hyatt@apple.com>
2431 Fix for bug 16760, incorrect <object> MIME type handling and fallback
2436 * html/HTMLImageLoader.cpp:
2437 (WebCore::HTMLImageLoader::notifyFinished):
2438 If the image had an error, make sure to do <object> fallback.
2440 * html/HTMLObjectElement.cpp:
2441 (WebCore::HTMLObjectElement::renderFallbackContent):
2442 Before doing fallback check if there is a MIME type mismatch between
2443 an image type and a non-image type. If so, detach and re-attach after
2444 storing the correct MIME type.
2446 * loader/loader.cpp:
2447 (WebCore::Loader::didReceiveData):
2448 Consider it an error when a 404 is encountered on a CachedResource load.
2450 2008-02-20 Anders Carlsson <andersca@apple.com>
2454 StringImpl constructors used by AtomicString should start with a refcount of 1.
2456 * platform/text/AtomicString.cpp:
2457 (WebCore::AtomicString::add):
2458 * platform/text/AtomicString.h:
2459 * platform/text/StringImpl.cpp:
2460 (WebCore::StringImpl::StringImpl):
2462 2008-02-20 Darin Adler <darin@apple.com>
2464 * bindings/js/kjs_navigator.cpp:
2465 (WebCore::needsYouTubeQuirk): Tweak comments.
2467 2008-02-20 Anders Carlsson <andersca@apple.com>
2471 Change all refcounted classes in page/ to start with a refcount of 1.
2474 (WebCore::BarInfo::BarInfo):
2476 (WebCore::BarInfo::create):
2478 (WebCore::Console::Console):
2480 (WebCore::Console::create):
2481 * page/DOMSelection.cpp:
2482 (WebCore::DOMSelection::DOMSelection):
2483 * page/DOMSelection.h:
2484 (WebCore::DOMSelection::create):
2485 * page/DOMWindow.cpp:
2486 (WebCore::DOMWindow::DOMWindow):
2487 (WebCore::DOMWindow::screen):
2488 (WebCore::DOMWindow::history):
2489 (WebCore::DOMWindow::locationbar):
2490 (WebCore::DOMWindow::menubar):
2491 (WebCore::DOMWindow::personalbar):
2492 (WebCore::DOMWindow::scrollbars):
2493 (WebCore::DOMWindow::statusbar):
2494 (WebCore::DOMWindow::toolbar):
2495 (WebCore::DOMWindow::console):
2496 (WebCore::DOMWindow::getSelection):
2498 (WebCore::DOMWindow::create):
2500 (WebCore::Frame::domWindow):
2502 (WebCore::History::History):
2504 (WebCore::History::create):
2505 * page/InspectorController.cpp:
2506 (WebCore::InspectorResource::create):
2507 (WebCore::InspectorResource::InspectorResource):
2508 (WebCore::InspectorDatabaseResource::create):
2509 (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
2510 (WebCore::InspectorController::didLoadResourceFromMemoryCache):
2511 (WebCore::InspectorController::identifierForInitialRequest):
2512 (WebCore::InspectorController::didOpenDatabase):
2514 (WebCore::Plugin::create):
2515 (WebCore::Plugin::Plugin):
2517 (WebCore::Screen::Screen):
2519 (WebCore::Screen::create):
2521 2008-02-20 Sam Weinig <sam@webkit.org>
2523 Reviewed by Darin and Geoff.
2525 - <rdar://problem/5754378> work around missing video on YouTube front page with a site-specific hack
2527 * WebCore.base.exp: Updated.
2529 * bindings/js/kjs_navigator.cpp:
2530 (WebCore::needsYouTubeQuirk): Added. Return true on Windows only when the quirk is needed.
2531 (WebCore::Navigator::getValueProperty): For the appVersion property, if needsYouTubeQuirk
2532 return true, then return the empty string.
2534 * page/Settings.cpp:
2535 (WebCore::Settings::Settings): Set m_needsSiteSpecificQuirks to false.
2536 (WebCore::Settings::setNeedsSiteSpecificQuirks): Added.
2537 * page/Settings.h: Added m_needsSiteSpecificQuirks.
2538 (WebCore::Settings::needsSiteSpecificQuirks): Added.
2540 2008-02-20 David Hyatt <hyatt@apple.com>
2542 Fix for bug 12751, doctype nodes aren't part of the Document (Acid3).
2544 Reviewed by Sam Weinig
2546 Many tests added in fast/doctypes.
2548 * dom/DOMImplementation.cpp:
2549 (WebCore::DOMImplementation::createDocument):
2550 (WebCore::DOMImplementation::createHTMLDocument):
2552 (WebCore::Document::Document):
2553 (WebCore::Document::setDocType):
2554 (WebCore::Document::attach):
2555 (WebCore::Document::getImageMap):
2557 (WebCore::Document::doctype):
2558 (WebCore::Document::):
2559 (WebCore::Document::determineParseMode):
2560 (WebCore::Document::setParseMode):
2561 (WebCore::Document::parseMode):
2562 (WebCore::Document::inCompatMode):
2563 (WebCore::Document::inAlmostStrictMode):
2564 (WebCore::Document::inStrictMode):
2565 * dom/DocumentType.cpp:
2566 (WebCore::DocumentType::cloneNode):
2567 (WebCore::DocumentType::insertedIntoDocument):
2568 (WebCore::DocumentType::removedFromDocument):
2569 * dom/DocumentType.h:
2571 (WebCore::Node::childAllowed):
2572 * dom/StyledElement.cpp:
2573 (WebCore::StyledElement::attributeChanged):
2574 * dom/XMLTokenizer.cpp:
2575 (WebCore::XMLTokenizer::internalSubset):
2577 * editing/markup.cpp:
2578 (WebCore::appendStartMarkup):
2579 * html/HTMLAppletElement.cpp:
2580 (WebCore::HTMLAppletElement::createRenderer):
2581 * html/HTMLDocument.cpp:
2582 (WebCore::HTMLDocument::HTMLDocument):
2583 (WebCore::HTMLDocument::childAllowed):
2584 (WebCore::HTMLDocument::determineParseMode):
2585 * html/HTMLDocument.h:
2586 * html/HTMLMapElement.cpp:
2587 (WebCore::HTMLMapElement::parseMappedAttribute):
2588 * html/HTMLParamElement.cpp:
2589 (WebCore::HTMLParamElement::parseMappedAttribute):
2590 * html/HTMLParser.cpp:
2591 (WebCore::HTMLParser::parseDoctypeToken):
2592 * html/HTMLParser.h:
2593 * html/HTMLTokenizer.cpp:
2594 (WebCore::HTMLTokenizer::reset):
2595 (WebCore::HTMLTokenizer::parseDoctype):
2596 (WebCore::HTMLTokenizer::parseTag):
2597 (WebCore::HTMLTokenizer::write):
2598 (WebCore::HTMLTokenizer::finish):
2599 (WebCore::HTMLTokenizer::processDoctypeToken):
2600 * html/HTMLTokenizer.h:
2602 (WebCore::DoctypeToken::DoctypeToken):
2603 (WebCore::DoctypeToken::reset):
2604 (WebCore::DoctypeToken::state):
2605 (WebCore::DoctypeToken::setState):
2606 (WebCore::HTMLTokenizer::State::inDoctype):
2607 (WebCore::HTMLTokenizer::State::setInDoctype):
2608 (WebCore::HTMLTokenizer::State::needsSpecialWriteHandling):
2609 (WebCore::HTMLTokenizer::State::):
2610 * html/HTMLViewSourceDocument.cpp:
2611 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
2612 (WebCore::HTMLViewSourceDocument::addViewSourceDoctypeToken):
2613 * html/HTMLViewSourceDocument.h:
2614 * loader/FrameLoader.cpp:
2615 (WebCore::FrameLoader::write):
2616 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2618 (WebCore::Frame::documentTypeString):
2619 * page/inspector/utilities.js:
2620 * xml/XSLTProcessor.cpp:
2621 (WebCore::XSLTProcessor::createDocumentFromSource):
2623 2008-02-20 Anders Carlsson <andersca@apple.com>
2627 Change most SVG related classes to start out with a ref count of 1.
2629 * bindings/js/JSSVGPointListCustom.cpp:
2630 (WebCore::JSSVGPointList::initialize):
2631 (WebCore::JSSVGPointList::insertItemBefore):
2632 (WebCore::JSSVGPointList::replaceItem):
2633 (WebCore::JSSVGPointList::appendItem):
2634 * bindings/js/JSSVGTransformListCustom.cpp:
2635 (WebCore::JSSVGTransformList::initialize):
2636 (WebCore::JSSVGTransformList::insertItemBefore):
2637 (WebCore::JSSVGTransformList::replaceItem):
2638 (WebCore::JSSVGTransformList::appendItem):
2639 * rendering/SVGCharacterLayoutInfo.h:
2640 (WebCore::SVGCharOnPath::create):
2641 (WebCore::SVGCharOnPath::SVGCharOnPath):
2642 * rendering/SVGRootInlineBox.cpp:
2643 (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
2644 * svg/SVGAnimationElement.cpp:
2645 (WebCore::SVGAnimationElement::parseBeginOrEndValue):
2646 * svg/SVGClipPathElement.cpp:
2647 (WebCore::SVGClipPathElement::canvasResource):
2648 * svg/SVGElementInstance.cpp:
2649 (WebCore::SVGElementInstance::childNodes):
2650 * svg/SVGElementInstanceList.cpp:
2651 (WebCore::SVGElementInstanceList::SVGElementInstanceList):
2652 * svg/SVGElementInstanceList.h:
2653 (WebCore::SVGElementInstanceList::create):
2654 * svg/SVGFitToViewBox.cpp:
2655 (WebCore::SVGFitToViewBox::SVGFitToViewBox):
2656 * svg/SVGGradientElement.cpp:
2657 (WebCore::SVGGradientElement::SVGGradientElement):
2658 (WebCore::SVGGradientElement::canvasResource):
2659 * svg/SVGImageElement.cpp:
2660 (WebCore::SVGImageElement::SVGImageElement):
2661 * svg/SVGLengthList.h:
2662 (WebCore::SVGLengthList::create):
2664 (WebCore::SVGList::SVGList):
2665 (WebCore::SVGPODListItem::create):
2666 (WebCore::SVGPODListItem::copy):
2667 (WebCore::SVGPODListItem::SVGPODListItem):
2668 (WebCore::SVGPODList::initialize):
2669 (WebCore::SVGPODList::insertItemBefore):
2670 (WebCore::SVGPODList::replaceItem):
2671 (WebCore::SVGPODList::appendItem):
2672 (WebCore::SVGPODList::SVGPODList):
2673 * svg/SVGMarkerElement.cpp:
2674 (WebCore::SVGMarkerElement::canvasResource):
2675 * svg/SVGMaskElement.cpp:
2676 (WebCore::SVGMaskElement::canvasResource):
2677 * svg/SVGNumberList.h:
2678 (WebCore::SVGNumberList::create):
2679 * svg/SVGPathElement.cpp:
2680 (WebCore::SVGPathElement::createSVGPathSegClosePath):
2681 (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
2682 (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
2683 (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
2684 (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
2685 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
2686 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
2687 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
2688 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
2689 (WebCore::SVGPathElement::createSVGPathSegArcAbs):
2690 (WebCore::SVGPathElement::createSVGPathSegArcRel):
2691 (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
2692 (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
2693 (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
2694 (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
2695 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
2696 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
2697 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
2698 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
2699 (WebCore::SVGPathElement::pathSegList):
2700 * svg/SVGPathElement.h:
2702 (WebCore::SVGPathSeg::SVGPathSeg):
2703 * svg/SVGPathSegArc.h:
2704 (WebCore::SVGPathSegArcAbs::create):
2705 (WebCore::SVGPathSegArcRel::create):
2706 * svg/SVGPathSegClosePath.h:
2707 (WebCore::SVGPathSegClosePath::create):
2708 * svg/SVGPathSegCurvetoCubic.h:
2709 (WebCore::SVGPathSegCurvetoCubicAbs::create):
2710 (WebCore::SVGPathSegCurvetoCubicRel::create):
2711 * svg/SVGPathSegCurvetoCubicSmooth.h:
2712 (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
2713 (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
2714 * svg/SVGPathSegCurvetoQuadratic.h:
2715 (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
2716 (WebCore::SVGPathSegCurvetoQuadraticRel::create):
2717 * svg/SVGPathSegCurvetoQuadraticSmooth.h:
2718 (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
2719 (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
2720 * svg/SVGPathSegLineto.h:
2721 (WebCore::SVGPathSegLinetoAbs::create):
2722 (WebCore::SVGPathSegLinetoRel::create):
2723 * svg/SVGPathSegLinetoHorizontal.h:
2724 (WebCore::SVGPathSegLinetoHorizontalAbs::create):
2725 (WebCore::SVGPathSegLinetoHorizontalRel::create):
2726 * svg/SVGPathSegLinetoVertical.h:
2727 (WebCore::SVGPathSegLinetoVerticalAbs::create):
2728 (WebCore::SVGPathSegLinetoVerticalRel::create):
2729 * svg/SVGPathSegList.h:
2730 (WebCore::SVGPathSegList::create):
2731 * svg/SVGPathSegMoveto.h:
2732 (WebCore::SVGPathSegMovetoAbs::create):
2733 (WebCore::SVGPathSegMovetoRel::create):
2734 * svg/SVGPatternElement.cpp:
2735 (WebCore::SVGPatternElement::SVGPatternElement):
2736 (WebCore::SVGPatternElement::canvasResource):
2737 * svg/SVGPointList.h:
2738 (WebCore::SVGPointList::create):
2739 * svg/SVGPolyElement.cpp:
2740 (WebCore::SVGPolyElement::points):
2741 * svg/SVGPreserveAspectRatio.cpp:
2742 (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
2743 * svg/SVGPreserveAspectRatio.h:
2744 (WebCore::SVGPreserveAspectRatio::create):
2745 * svg/SVGRenderingIntent.h:
2746 (WebCore::SVGRenderingIntent::SVGRenderingIntent):
2747 * svg/SVGStringList.h:
2748 (WebCore::SVGStringList::create):
2749 * svg/SVGStyledTransformableElement.cpp:
2750 (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
2752 (WebCore::SVGTests::requiredFeatures):
2753 (WebCore::SVGTests::requiredExtensions):
2754 (WebCore::SVGTests::systemLanguage):
2755 * svg/SVGTextElement.cpp:
2756 (WebCore::SVGTextElement::SVGTextElement):
2757 * svg/SVGTextPositioningElement.cpp:
2758 (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
2759 * svg/SVGTransformList.h:
2760 (WebCore::SVGTransformList::create):
2761 * svg/SVGUnitTypes.h:
2762 (WebCore::SVGUnitTypes::SVGUnitTypes):
2763 * svg/SVGViewElement.cpp:
2764 (WebCore::SVGViewElement::viewTarget):
2765 * svg/SVGViewSpec.cpp:
2766 (WebCore::SVGViewSpec::SVGViewSpec):
2767 * svg/graphics/SVGPaintServer.cpp:
2768 (WebCore::SVGPaintServer::sharedSolidPaintServer):
2769 * svg/graphics/SVGPaintServer.h:
2770 * svg/graphics/SVGPaintServerGradient.h:
2771 (WebCore::SVGPaintServerGradient::SharedStopCache::create):
2772 (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache):
2773 * svg/graphics/SVGPaintServerLinearGradient.h:
2774 (WebCore::SVGPaintServerLinearGradient::create):
2775 * svg/graphics/SVGPaintServerPattern.h:
2776 (WebCore::SVGPaintServerPattern::create):
2777 * svg/graphics/SVGPaintServerRadialGradient.h:
2778 (WebCore::SVGPaintServerRadialGradient::create):
2779 * svg/graphics/SVGPaintServerSolid.h:
2780 (WebCore::SVGPaintServerSolid::create):
2781 * svg/graphics/SVGResource.cpp:
2782 (WebCore::SVGResource::SVGResource):
2783 * svg/graphics/SVGResource.h:
2784 * svg/graphics/SVGResourceClipper.h:
2785 (WebCore::SVGResourceClipper::create):
2786 * svg/graphics/SVGResourceMarker.h:
2787 (WebCore::SVGResourceMarker::create):
2788 * svg/graphics/SVGResourceMasker.h:
2789 (WebCore::SVGResourceMasker::create):
2790 * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
2791 (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache):
2793 2008-02-20 Darin Adler <darin@apple.com>
2797 - make conversion from CSS ParseString to String and AtomicString
2798 automatic and remove all the explicit calls to do the conversion
2800 - fix CSS parsing to do fewer allocations, mostly by using the
2801 equalIgnoringCase function in CSSParser
2803 * css/CSSGrammar.y: Take out all the explicit atomicString and
2804 domString calls now that ParseString knows how to convert itself.
2806 * css/CSSParser.cpp:
2807 (WebCore::equal): Added.
2808 (WebCore::equalIgnoringCase): Allow non-lettters.
2809 (WebCore::ParseString::lower): Used charactersAreAllASCII.
2810 (WebCore::unitFromString): Use equal.
2811 (WebCore::CSSParser::parseValue): Removed unneeded call to domString.
2812 (WebCore::CSSParser::parseContent): Use equalIgnoringCase.
2813 (WebCore::CSSParser::parseBackgroundImage): Removed unneeded call to domString.
2814 (WebCore::CSSParser::parseTransitionTimingFunction): Use equalIgnoringCase.
2815 (WebCore::CSSParser::parseDashboardRegions): More of the same.
2816 (WebCore::CSSParser::parseCounterContent): Ditto.
2817 (WebCore::CSSParser::parseShape): Use equalIgnoringCase.
2818 (WebCore::CSSParser::parseFontFamily): Removed unneeded calls to domString.
2819 (WebCore::CSSParser::parseFontFaceSrc): More.
2820 (WebCore::CSSParser::parseFontFaceUnicodeRange): More.
2821 (WebCore::CSSParser::parseColor): Don't lowercase here -- setNamedColor now
2822 handles the case folding.
2823 (WebCore::CSSParser::parseColorFromValue): More.
2824 (WebCore::CSSParser::parseBorderImage): More.
2825 (WebCore::CSSParser::parseCounter): More.
2826 (WebCore::TransformOperationInfo::TransformOperationInfo): More.
2827 (WebCore::CSSParser::parseTransform): More.
2828 (WebCore::CSSParser::createCharsetRule): More.
2829 (WebCore::CSSParser::createImportRule): More.
2831 * css/CSSParser.h: Removed domString and atomicString functions.
2832 (WebCore::ParseString::operator String): Added. Allows conversion to String
2833 without an explicit function call.
2834 (WebCore::ParseString::operator AtomicString): Ditto.
2836 * css/MediaQueryExp.cpp:
2837 (WebCore::MediaQueryExp::MediaQueryExp): Removed a call to domString.
2838 * css/SVGCSSParser.cpp:
2839 (WebCore::CSSParser::parseSVGValue): Removed calls to domString.
2841 * platform/graphics/Color.cpp:
2842 (WebCore::findNamedColor): Call toASCIILower on each character as we copy
2843 it into the 8-bit character buffer to make the operation fold case.
2845 2008-02-20 Justin Garcia <justin.garcia@apple.com>
2847 Reviewed by Darin Adler.
2849 <rdar://problem/5694920> Typing (esp. deleting) is slower due to TOT WebCore changes
2851 * editing/DeleteSelectionCommand.cpp:
2852 (WebCore::DeleteSelectionCommand::initializeStartEnd): The common case here
2853 is where there are no special elements. Avoid creating VisiblePositions in
2854 that case. Additionally, this change postpones the more expensive creation
2855 of an upstream VisiblePosition until the last possible moment.
2856 (WebCore::DeleteSelectionCommand::saveTypingStyleState):
2857 (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Add an
2858 early return for a common case: deleting characters that are all inside the
2859 same text node. In that case the style at the start of the selection will
2860 not change during the delete, so there is no need to save/recompute it.
2861 (WebCore::DeleteSelectionCommand::saveFullySelectedAnchor): Early return
2862 before VisiblePosition creation if the ends of the selection aren't enclosed
2864 * editing/TypingCommand.cpp:
2865 (WebCore::TypingCommand::markMisspellingsAfterTyping): Early return if spell
2866 checking isn't enabled.
2868 2008-02-20 Alexey Proskuryakov <ap@webkit.org>
2870 Incorporates some improvements made by Dan Bernstein.
2874 http://bugs.webkit.org/show_bug.cgi?id=17106
2875 <rdar://problem/5750722> Debug build ASSERTs on page load
2877 Test: fast/encoding/GBK/close-gbk-converter.html
2879 * platform/text/TextCodecICU.cpp:
2880 (WebCore::getGbkEscape): Changed to use a switch instead of a HashMap, as there
2881 are only four values.
2882 (WebCore::gbkCallbackEscape): Check the reason why the function is called, and do not attempt
2883 getting an escape character if it's not UCNV_UNASSIGNED.
2884 (WebCore::gbkCallbackSubstitute): Ditto.
2886 2008-02-20 Alexey Proskuryakov <ap@webkit.org>
2890 * xml/XMLHttpRequest.cpp:
2891 (WebCore::isSafeRequestHeader):
2892 (WebCore::XMLHttpRequest::setRequestHeader):
2894 2008-02-20 Alexey Proskuryakov <ap@webkit.org>
2898 <rdar://problem/5749455> Unable to set the Referer header in Dashboard using XMLHttpRequest
2900 Cannot be tested in DRT.
2902 * xml/XMLHttpRequest.cpp: (WebCore::canSetRequestHeader): Assume that a request that can load
2903 local files can also set any headers.
2905 2008-02-19 Darin Adler <darin@apple.com>
2909 - removed use of DeprecatedString for font family names
2911 * css/CSSFontSelector.cpp:
2912 (WebCore::CSSFontSelector::addFontFaceRule): Update for name change.
2913 * css/CSSParser.cpp:
2914 (WebCore::CSSParser::parseFontFamily): Update to use new appendSpaceSeparated
2915 function and String rather than DeprecatedString.
2916 * css/CSSStyleSelector.cpp:
2917 (WebCore::CSSStyleSelector::applyProperty): Updated for name change.
2918 * css/FontFamilyValue.cpp:
2919 (WebCore::FontFamilyValue::FontFamilyValue): Replaced code using a regular
2920 expression with code that does the same thing more efficiently.
2921 (WebCore::FontFamilyValue::appendSpaceSeparated): Added.
2922 (WebCore::FontFamilyValue::cssText): Updated for name change.
2923 * css/FontFamilyValue.h: Changed DeprecatedString to String. Renamed fontName
2924 to familyName and parsedFontName to m_familyName. Removed unused genericFamilyType
2925 and m_genericFamilyType. Added appendSpaceSeparated so that m_familyName can
2926 be private instead of public.
2928 2008-02-19 Darin Adler <darin@apple.com>
2930 - fix build when SVG is not enabled
2932 * rendering/RenderTreeAsText.cpp: Added include of "TextStream.h".
2934 2008-02-19 Anders Carlsson <andersca@apple.com>
2938 Change all classes in xml/ to start out with a ref count of 1.
2940 * bindings/js/JSCustomXPathNSResolver.h:
2941 * bindings/js/JSXMLHttpRequest.cpp:
2942 (WebCore::JSXMLHttpRequest::JSXMLHttpRequest):
2943 * bindings/js/JSXSLTProcessor.cpp:
2944 (WebCore::JSXSLTProcessor::JSXSLTProcessor):
2945 * bindings/objc/DOMCustomXPathNSResolver.h:
2946 (WebCore::DOMCustomXPathNSResolver::create):
2947 * bindings/scripts/CodeGeneratorJS.pm:
2948 * bindings/scripts/CodeGeneratorObjC.pm:
2950 (WebCore::Document::applyXSLTransform):
2951 (WebCore::Document::createExpression):
2952 (WebCore::Document::createNSResolver):
2953 (WebCore::Document::evaluate):
2955 (WebCore::DOMParser::create):
2956 (WebCore::DOMParser::DOMParser):
2957 * xml/NativeXPathNSResolver.h:
2958 (WebCore::NativeXPathNSResolver::create):
2959 * xml/XMLHttpRequest.cpp:
2960 (WebCore::XMLHttpRequest::XMLHttpRequest):
2961 * xml/XMLHttpRequest.h:
2962 (WebCore::XMLHttpRequest::create):
2963 * xml/XMLSerializer.h:
2964 (WebCore::XMLSerializer::create):
2965 (WebCore::XMLSerializer::XMLSerializer):
2966 * xml/XPathEvaluator.cpp:
2967 (WebCore::XPathEvaluator::createNSResolver):
2968 * xml/XPathEvaluator.h:
2969 (WebCore::XPathEvaluator::create):
2970 (WebCore::XPathEvaluator::XPathEvaluator):
2971 * xml/XPathExpression.cpp:
2972 (WebCore::XPathExpression::createExpression):
2973 (WebCore::XPathExpression::evaluate):
2974 * xml/XPathExpression.h:
2975 (WebCore::XPathExpression::create):
2976 (WebCore::XPathExpression::XPathExpression):
2977 * xml/XPathNSResolver.h:
2978 * xml/XPathResult.cpp:
2979 (WebCore::XPathResult::XPathResult):
2980 * xml/XPathResult.h:
2981 (WebCore::XPathResult::create):
2982 * xml/XPathValue.cpp:
2983 (WebCore::XPath::Value::modifiableNodeSet):
2985 (WebCore::XPath::ValueData::create):
2986 (WebCore::XPath::ValueData::ValueData):
2987 (WebCore::XPath::Value::Value):
2988 * xml/XSLTProcessor.h:
2989 (WebCore::XSLTProcessor::create):
2990 (WebCore::XSLTProcessor::XSLTProcessor):
2992 2008-02-19 Darin Adler <darin@apple.com>
2996 - Trimmed down TextStream and weaned it from DeprecatedString.
2998 * page/mac/WebCoreFrameBridge.mm:
2999 (-[WebCoreFrameBridge renderTreeAsExternalRepresentation]):
3000 Removed now-unneeded call to getNSString.
3002 * platform/text/TextStream.cpp: Removed unused functions.
3003 Use snprintf instead of sprintf, for better security.
3004 (WebCore::TextStream::release): Added.
3005 * platform/text/TextStream.h: Removed lots of unneeded stuff.
3007 * rendering/RenderTreeAsText.cpp:
3008 (WebCore::externalRepresentation): Changed to use String instead
3009 of DeprecatedString.
3010 * rendering/RenderTreeAsText.h: Ditto.
3012 * rendering/SVGRenderTreeAsText.cpp:
3013 (WebCore::writeSVGInlineTextBox): Use "\n" instead of endl.
3014 (WebCore::write): Ditto.
3015 (WebCore::writeRenderResources): Ditto.
3017 2008-02-19 Justin Garcia <justin.garcia@apple.com>
3019 Reviewed by Darin Adler.
3021 <rdar://problem/5694920> Typing (esp. deleting) is slower due to TOT WebCore changes
3023 This brings performance on the phone back to old levels. Andre and I are doing
3024 some formal testing to see exactly where we stand.
3027 (WebCore::enclosingBlockIgnoringEditability): Added. This is enclosingBlock
3028 without the expensive editability checks. upstream and downstream can avoid
3029 those because they do their own editability checking.
3030 (WebCore::Position::upstream):
3031 (WebCore::Position::downstream):
3033 2008-02-19 Chris Fleizach <cfleizach@apple.com>
3037 <rdar://problem/3663560> AXLink for a "name" (anchor) on same page should include an AXLinkedUIElementAttribute
3039 * bridge/mac/WebCoreAXObject.mm:
3040 (-[WebCoreAXObject linkedUIElement]):
3041 Returns the linked-to AX object (if the specified one is ignored by accessibility, returns the next un-ignored one by traversing the DOM).
3043 (-[WebCoreAXObject accessibilityAttributeNames]):
3044 (-[WebCoreAXObject accessibilityAttributeValue:]):
3045 Support NSAccessibilityLinkedUIElementsAttribute.
3047 2008-02-19 Darin Adler <darin@apple.com>
3051 - Removed old debugging aids, Node::dump, RenderObject::dump, and
3052 RenderObject::information, that used DeprecatedString.
3054 * dom/CharacterData.cpp: Removed override of Node::dump.
3055 * dom/CharacterData.h: Ditto.
3056 * dom/Element.cpp: Ditto.
3057 * dom/Element.h: Ditto.
3058 * dom/EventTargetNode.cpp: Ditto.
3059 * dom/EventTargetNode.h: Ditto.
3060 * dom/Node.cpp: Removed Node::dump.
3061 * dom/Node.h: Ditto.
3063 * rendering/RenderBlock.cpp: Removed override of RenderObject::dump.
3064 * rendering/RenderBlock.h: Ditto.
3065 * rendering/RenderFrameSet.cpp: Ditto.
3066 * rendering/RenderFrameSet.h: Ditto.
3067 * rendering/RenderObject.cpp: Removed RenderObject::dump and
3068 RenderObject::information.
3069 * rendering/RenderObject.h: Ditto.
3070 * rendering/RenderTable.cpp: Removed override of RenderObject::dump.
3071 * rendering/RenderTable.h: Ditto.
3072 * rendering/RenderTableCell.cpp: Ditto.
3073 * rendering/RenderTableCell.h: Ditto.
3074 * rendering/RenderTableCol.cpp: Ditto.
3075 * rendering/RenderTableCol.h: Ditto.
3076 * rendering/RenderTableSection.cpp: Ditto.
3077 * rendering/RenderTableSection.h: Ditto.
3079 * rendering/RenderTreeAsText.h: Removed unneeded include of TextStream.h
3080 and added forward declarations as appropriate.
3082 * svg/SVGSVGElement.cpp: Removed unneeded include of TextStream.h.
3083 * svg/graphics/SVGResourceClipper.cpp: And here.
3084 * svg/graphics/SVGResourceFilter.cpp: Ditto.
3085 * svg/graphics/filters/SVGFEBlend.cpp: Ditto.
3086 * svg/graphics/filters/SVGFEComponentTransfer.cpp: Ditto.
3087 * svg/graphics/filters/SVGFEComposite.cpp: Ditto.
3088 * svg/graphics/filters/SVGFEDiffuseLighting.cpp: Ditto.
3089 * svg/graphics/filters/SVGFEGaussianBlur.cpp: Ditto.
3090 * svg/graphics/filters/SVGFEImage.cpp: Ditto.
3091 * svg/graphics/filters/SVGFEMerge.cpp: Ditto.
3092 * svg/graphics/filters/SVGFEMorphology.cpp: Ditto.
3093 * svg/graphics/filters/SVGFEOffset.cpp: Ditto.
3094 * svg/graphics/filters/SVGFESpecularLighting.cpp: Ditto.
3095 * svg/graphics/filters/SVGFETurbulence.cpp: Ditto.
3096 * svg/graphics/filters/SVGFilterEffect.cpp: Ditto.
3098 2008-02-19 Beth Dakin <bdakin@apple.com>
3102 Fix for <rdar://problem/5729674> Seed: Crash in
3103 RenderButton::setStyle at http://www.dinorpg.com
3105 Inputs should not honor first-letter.
3107 * rendering/RenderBlock.cpp:
3108 (WebCore::RenderBlock::updateFirstLetter):
3110 2008-02-19 Dan Bernstein <mitz@apple.com>
3112 Reviewed by Darin Adler.
3114 - fix <rdar://problem/5637569> CrashTracer: [REGRESSION] 620 crashes in Safari at com.apple.WebCore: WebCore::RenderBox::setStaticY + 15
3116 Test: fast/text/wbr-styled.html
3118 Changed RenderWordBreak to inherit from RenderText instead of
3121 * rendering/RenderBlock.cpp:
3122 (WebCore::RenderBlock::calcInlinePrefWidths):
3123 * rendering/RenderFlow.h:
3124 * rendering/RenderText.cpp:
3125 (WebCore::RenderText::renderName):
3126 (WebCore::RenderText::isTextFragment):
3127 (WebCore::RenderText::isWordBreak):
3128 * rendering/RenderText.h:
3129 * rendering/RenderWordBreak.cpp:
3130 (WebCore::RenderWordBreak::RenderWordBreak):
3131 * rendering/RenderWordBreak.h:
3132 * rendering/bidi.cpp:
3133 (WebCore::RenderBlock::findNextLineBreak):
3135 2008-02-19 Anders Carlsson <andersca@apple.com>
3140 * loader/mac/LoaderNSURLExtras.h:
3141 * loader/mac/LoaderNSURLExtras.m:
3142 Move unused functions to WebKit (where they are used)
3144 (vectorContainsString):
3145 Use const references.
3147 * platform/mac/WebCoreSystemInterface.h:
3148 * platform/mac/WebCoreSystemInterface.mm:
3149 Remove wkNSURLProtocolClassForReqest.
3151 2008-02-19 Justin Garcia <justin.garcia@apple.com>
3153 Reviewed by Darin Adler.
3155 <rdar://problem/5694920> Typing (esp. deleting) is slower due to TOT WebCore
3157 These changes bring deleting performance back to old levels on the phone
3158 except for deleting the first space to the right of a word, which we are
3162 (WebCore::Position::upstream): Avoid the use of enclosingBlock when determining
3163 if we have left the original enclosing block or entered a new one, and avoid
3164 rootEditableElement for determining if we have changed editability. These
3165 operations are expensive.
3166 (WebCore::Position::downstream): Ditto.
3168 2008-02-19 Darin Adler <darin@apple.com>
3170 Rubber stamped by Anders.
3172 - removed explicit initialization to 1 for RefCounted; that's now the default
3174 * loader/ResourceLoader.cpp:
3175 (WebCore::ResourceLoader::ResourceLoader): Removed RefCounted initializer.
3176 * platform/network/ResourceHandle.cpp:
3177 (WebCore::ResourceHandle::ResourceHandle): Ditto.
3178 * platform/text/StringImpl.cpp:
3179 (WebCore::StringImpl::StringImpl): Ditto.
3181 2008-02-18 Anders Carlsson <andersca@apple.com>
3185 Make ResourceLoader and ResourceHandle start out with a refcount of 1.
3187 * loader/MainResourceLoader.cpp:
3188 (WebCore::MainResourceLoader::create):
3189 * loader/NetscapePlugInStreamLoader.cpp:
3190 (WebCore::NetscapePlugInStreamLoader::create):
3191 * loader/ResourceLoader.cpp:
3192 (WebCore::ResourceLoader::ResourceLoader):
3193 * loader/SubresourceLoader.cpp:
3194 (WebCore::SubresourceLoader::create):
3195 * platform/network/ResourceHandle.cpp:
3196 (WebCore::ResourceHandle::ResourceHandle):
3197 (WebCore::ResourceHandle::create):
3199 2008-02-19 Alp Toker <alp@atoker.com>
3201 Reviewed by Mark Rowe.
3203 http://bugs.webkit.org/show_bug.cgi?id=16863
3204 [GTK] tab focusing doesn't work
3206 GDK_MOD2_MASK doesn't always mean meta so we can't use it to identify
3209 Use GDK_META_MASK where available, otherwise do not support the meta
3210 key. This matches the behaviour of other applications.
3212 Also add a comment noting that the platform event constructors need to
3213 be kept in sync (it's not obvious that there are multiple places that
3214 check the key state).
3216 * platform/gtk/KeyEventGtk.cpp:
3217 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3218 * platform/gtk/MouseEventGtk.cpp:
3219 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3220 * platform/gtk/WheelEventGtk.cpp:
3221 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3223 2008-02-18 Brady Eidson <beidson@apple.com>
3225 Reviewed by Sam Weinig's white rhino tusk stamp
3227 SQLiteTransaction::stop() should also reset the transaction-in-progress flag in its parent SQLiteDatabase
3229 * platform/sql/SQLiteTransaction.cpp:
3230 (WebCore::SQLiteTransaction::stop):
3232 2008-02-18 Brady Eidson <beidson@apple.com>
3236 Fix for <rdar://5747529> - ObjC Exception can cause JSLock to never be released
3238 Test: platform/mac/plugins/webScriptObject-exception-deadlock.html
3240 * bindings/objc/WebScriptObject.mm:
3241 (-[WebScriptObject valueForKey:]): The line `resultObj = [super valueForKey:key]; // defaults to throwing an exception`
3242 says it all - it throws an exception. This method also happens to hold the JSLock. Problematically, when the exeception
3243 is thrown and the method exited, the JSLock is never released. Fix that without otherwise changing behavior by holding the
3244 JSLock in two individual scopes - Right before the exception and right after.
3246 2008-02-18 Darin Adler <darin@apple.com>
3250 - reduce use of DeprecatedString and memory allocations in processing of CSS
3251 - remove unnecessary double -> float -> double trip in the CSS parser
3252 - cleaned up names and structure in CSS grammar
3254 * css/CSSGrammar.y: Remove getPropertyID and getValueID. Both are now in CSSParser.cpp
3255 instead, and they now work on ParseString and String objects and don't require the caller
3256 to put the string into a char*. Gave members of the %union more sensible names, removed
3257 duplicates, and sorted into a logical order. Put the %expect back in, rather than leaving
3259 * css/CSSParser.cpp:
3260 (WebCore::equalIgnoringCase): Added.
3261 (WebCore::hasPrefix): Added.
3262 (WebCore::CSSParser::parseTransitionProperty): Changed to call the new cssPropertyID,
3263 which obviates the need to call lower() and utf8() or to allocate memory at all. Also
3264 used equalIgnoringCase rather than putting the value into a String just to compare it.
3265 (WebCore::CSSParser::lex): Replaced convertASCIIToFloat with charactersToDouble. This change
3266 along with the CSSGrammar.y change, removes the double -> float -> double round trip, and
3267 affects the result of one layout test.
3268 (WebCore::cssPropertyID): Added. Gets the property ID from the gperf hash table, but
3269 without allocating any memory.
3270 (WebCore::cssValueKeywordID): Ditto.
3271 * css/CSSParser.h: Removed declaration for deprecatedString function (now used only in
3272 CSSParser.cpp; soon to be deleted). Added cssPropertyID and cssValueKeywordID functions.
3274 * css/CSSStyleDeclaration.cpp:
3275 (WebCore::CSSStyleDeclaration::getPropertyCSSValue): Call cssPropertyID instead of propertyID.
3276 (WebCore::CSSStyleDeclaration::getPropertyValue): Ditto.
3277 (WebCore::CSSStyleDeclaration::getPropertyPriority): Ditto.
3278 (WebCore::CSSStyleDeclaration::getPropertyShorthand): Ditto.
3279 (WebCore::CSSStyleDeclaration::isPropertyImplicit): Ditto.
3280 (WebCore::CSSStyleDeclaration::setProperty): Ditto.
3281 (WebCore::CSSStyleDeclaration::removeProperty): Ditto.
3282 (WebCore::CSSStyleDeclaration::isPropertyName): Ditto.
3283 * css/CSSStyleDeclaration.h: Removed unnecessary includes, unnecessary Noncopyable boilerplate,
3284 and the getPropertyID function declaration along with its associated apology comment.
3286 * css/makevalues.pl: Generate constants instead of macros for CSS value numbers (but not an
3287 enumeration, like properties, since you rarely have any reason to handle all values, but
3288 often have a reason to handle all properties). Renamed the constant for the number of CSS
3289 value keywords from CSS_VAL_TOTAL to numCSSValueKeywords, and added maxCSSValueKeywordLength.
3291 * platform/text/String.cpp:
3292 (WebCore::charactersToDouble): Made this function more efficient by using a stack buffer
3293 rather than a CString.
3295 2008-02-18 Dan Bernstein <mitz@apple.com>
3297 Reviewed by Dave Hyatt.
3299 - fix <rdar://problem/5736225> crash in svgFontAndFaceElementForFontData on digitalstrom.org/cms
3301 Test: fast/css/font-face-multiple-remote-sources.html
3303 * css/CSSFontFace.cpp:
3304 (WebCore::CSSFontFace::fontLoaded):
3305 * css/CSSSegmentedFontFace.cpp:
3306 (WebCore::CSSSegmentedFontFace::fontLoaded):
3308 2008-02-18 Darin Adler <darin@apple.com>
3312 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3313 (WebCore::hasCSSPropertyNamePrefix): Added.
3314 (WebCore::cssPropertyName): Reimplement to not use DeprecatedString. Also made faster
3315 by using a Vector<UChar> and eliminating all the string operations.
3317 2008-02-18 Stephanie Lewis <slewis@apple.com>
3321 Remove workaround for <rdar://problem/5695848>.
3323 * platform/network/cf/ResourceResponseCFNet.cpp:
3324 (WebCore::ResourceResponse::doUpdateResourceResponse):
3326 2008-02-18 Samuel Weinig <sam@webkit.org>
3328 Reviewed by Geoff Garen.
3330 Fix for http://bugs.webkit.org/show_bug.cgi?id=17419
3331 Remove CompatMode from JavaScriptCore as it is never set to anything other than NativeMode
3333 * bindings/js/kjs_proxy.cpp:
3334 (WebCore::KJSProxy::initScript):
3336 2008-02-18 Alp Toker <alp@atoker.com>
3338 Reviewed by Mark Rowe.
3340 http://bugs.webkit.org/show_bug.cgi?id=17381
3341 [CURL] Regression: data URL parsing broken after DeprecatedString removal (Acid2)
3343 This patch resolves the regression for the GTK+ port.
3345 * platform/network/curl/ResourceHandleManager.cpp:
3346 (WebCore::parseDataUrl):
3348 2008-02-18 Darin Adler <darin@apple.com>
3352 * platform/network/win/ResourceHandleWin.cpp:
3353 (WebCore::ResourceHandle::onHandleCreated): Use String instead of DeprecatedString.
3354 (WebCore::ResourceHandle::start): Ditto.
3356 2008-02-18 Darin Adler <darin@apple.com>
3360 * platform/network/win/CookieJarWin.cpp:
3361 (WebCore::setCookies): Use String instead of DeprecatedString.
3362 (WebCore::cookies): Ditto.
3364 2008-02-18 Darin Adler <darin@apple.com>
3368 - removed use of DeprecatedString in the Color class
3370 * platform/graphics/Color.cpp:
3371 (WebCore::Color::parseHexColor): Streamlined logic a bit with early returns.
3372 Used toASCIIHexValue a character at a time rather than using toIntStrict
3374 (WebCore::findNamedColor): Added. Uses a fixed-size char buffer to look up
3375 a color using the gperf-generated findColor function. Saves a memory allocation
3376 vs. the old version that called DeprecatedString::latin1().
3377 (WebCore::Color::setNamedColor): Changed to use findNamedColor.
3379 2008-02-18 Darin Adler <darin@apple.com>
3383 * editing/htmlediting.cpp:
3384 (WebCore::stringWithRebalancedWhitespace): Changed to use String instead of
3387 2008-02-18 Darin Adler <darin@apple.com>
3391 * editing/SelectionController.cpp:
3392 (WebCore::SelectionController::debugRenderer): Changed to use String instead of
3395 2008-02-18 Darin Adler <darin@apple.com>
3397 Reviewed and landed by Sam.
3399 Remove DeprecatedStringList.
3403 * WebCore.vcproj/WebCore.vcproj:
3404 * WebCore.xcodeproj/project.pbxproj:
3405 * WebCoreSources.bkl:
3406 * editing/markup.cpp:
3407 * platform/DeprecatedStringList.cpp: Removed.
3408 * platform/DeprecatedStringList.h: Removed.
3409 * platform/mac/DeprecatedStringListMac.mm: Removed.
3411 2008-02-18 Darin Adler <darin@apple.com>
3415 * css/CSSPrimitiveValueMappings.h: Add default cases to all the switch statements.
3416 This will ease the way some day if we decide to use an enum instead of int; otherwise
3417 we'll have a ton of "unhandled enum value" warnings here.
3419 2008-02-18 Alp Toker <alp@atoker.com>
3421 Build fix for GTK+ < 2.10. Fall back to simple text clipboard copy
3422 with older GTK+ versions for now.
3424 * platform/gtk/PasteboardGtk.cpp:
3425 (WebCore::Pasteboard::writeSelection):
3427 2008-02-18 Darin Adler <darin@apple.com>
3431 * WebCore.base.exp: Export a couple of WebCore::String functions we plan to use
3432 in the future in WebKit.
3434 2008-02-18 Darin Adler <darin@apple.com>
3438 * DerivedSources.make: Added the scripts to the ENABLE_SVG versions of the rules
3439 for CSSPropertyNames.h and CSSValueKeywords.h. Somehow that got left out, so the
3440 files would not be regenerated if the scripts were changed (but would if SVG was
3443 2008-02-18 Alexey Proskuryakov <ap@webkit.org>
3447 * platform/KURL.h: (WebCore::KURL::operator const String&): Added, to avoid unexpected
3448 conversion via UString (as in bug 17418).
3450 2008-02-18 Jon Honeycutt <jhoneycutt@apple.com>
3454 <rdar://problem/5744899> Crash in Flash when clicking "Yes" to abort
3455 slow script Flash 9 dialog at http://www.kidzui.com
3457 When navigating to a new page, we stop all outstanding PluginStreams.
3458 Flash hangs in the call to NPP_URLNotify. It eventually displays the
3459 "slow script" dialog, which relinquishes control to the system. While
3460 this dialog is running, the request we are in the process of cancelling
3461 completes, and we re-enter Flash to deliver the data. When the dialog
3462 is dismissed, the internal state of Flash has changed, and Flash
3463 crashes with a null dereference.
3465 To work around this, we can defer loading before entering plug-in code,
3466 so that even if a plug-in yields to the system, we won't get callbacks
3467 while we're handling a callback.
3469 * plugins/PluginStream.cpp:
3470 (WebCore::PluginStream::startStream): Defers loads while calling into
3472 (WebCore::PluginStream::destroyStream): Same.
3473 (WebCore::PluginStream::deliverData): Same.
3474 (WebCore::PluginStream::didFail): Protect 'this' from deletion by
3475 destroyStream. Null out m_loader only after destroyStream returns.
3476 (WebCore::PluginStream::didFinishLoading): Same.
3478 2008-02-18 Alexey Proskuryakov <ap@webkit.org>
3482 http://bugs.webkit.org/show_bug.cgi?id=17418
3483 REGRESSION: Assertion failure dragging image (JSLock::lockCount() > 0)
3485 * platform/win/ClipboardWin.cpp:
3486 (WebCore::ClipboardWin::declareAndWriteDragImage): Explicitly convert from KURL to String,
3487 as an implicit conversion uses UString and thus needs a JSLock.
3489 2008-02-17 Sam Weinig <sam@webkit.org>
3493 * loader/FrameLoader.cpp:
3494 (WebCore::FrameLoader::changeLocation):
3496 2008-02-17 Sam Weinig <sam@webkit.org>
3500 * WebCore.xcodeproj/project.pbxproj:
3502 2008-02-17 Alp Toker <alp@atoker.com>
3504 Attempt to fix the Wx build (has been broken all weekend).
3506 Stub out some graphics functions.
3508 * platform/graphics/wx/GraphicsContextWx.cpp:
3509 (WebCore::GraphicsContext::beginPath):
3510 (WebCore::GraphicsContext::addPath):
3511 * platform/graphics/wx/PathWx.cpp:
3512 (WebCore::Path::isEmpty):
3514 2008-02-17 Julien Chaffraix <julien.chaffraix@gmail.com>
3516 Reviewed by Alexey Proskuryakov.
3518 http://bugs.webkit.org/show_bug.cgi?id=16989
3519 bug 16989 : Add send() flag checks in XmlHttpRequest
3521 Splitted XmlHttpRequest::abort into abort (called from JavaScript) and internalAbort that
3522 perform the cancellation and is called mainly from internal methods.
3524 Tests: http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html
3525 http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html
3526 http/tests/xmlhttprequest/xmlhttprequest-test-send-flag.html
3528 * xml/XMLHttpRequest.cpp:
3529 (WebCore::XMLHttpRequest::open): Now call internalAbort() and moved readyState change into method
3530 (WebCore::XMLHttpRequest::send): Added m_loader check
3531 (WebCore::XMLHttpRequest::abort): Now update readyState and clear the request headers as specified
3534 (WebCore::XMLHttpRequest::internalAbort): Perform cancellation internal operations (no readyState update)
3535 (WebCore::XMLHttpRequest::setRequestHeader): Added m_loader check
3537 (WebCore::XMLHttpRequest::processSyncLoadResults): Now call internalAbort() instead of abort()
3538 (WebCore::XMLHttpRequest::willSendRequest): Ditto
3539 (WebCore::XMLHttpRequest::cancelRequests): Ditto
3540 (WebCore::XMLHttpRequest::detachRequests): Ditto
3541 * xml/XMLHttpRequest.h: Added the private internalAbort method
3543 2008-02-17 Sam Weinig <sam@webkit.org>
3545 Reviewed by Dan Bernstein.
3547 Fix for http://bugs.webkit.org/show_bug.cgi?id=17365
3548 document.createEvent("MessageEvent") throws NOT_SUPPORTED_ERR
3550 - Updated fast/events/event-instanceof.html to test document.createEvent("MessageEvent").
3552 * DerivedSources.make:
3553 Generate Objective-C binding for DOMProgressEvent which was missing.
3555 * WebCore.xcodeproj/project.pbxproj:
3556 Add missing DOMProgressEvent files to the project.
3558 * bindings/js/JSEventCustom.cpp:
3560 Clean up and add case for SVGZoomEvent that was missing.
3562 * bindings/objc/DOMEvents.mm:
3563 (+[DOMEvent _wrapEvent:WebCore::]):
3564 Clean up and add cases for ProgressEvent and MessageEvent that were missing.
3567 (WebCore::Document::createEvent):
3568 Add case for MessageEvent.
3570 2008-02-17 Adam Treat <treat@kde.org>
3572 Reviewed by Eric Seidel.
3574 http://bugs.webkit.org/show_bug.cgi?id=17008
3575 Meta refresh does not work with cache turned off
3577 Fix for issue noticed on http://adserver.vivox.com/2
3579 * loader/FrameLoader.cpp:
3580 (WebCore::FrameLoader::changeLocation):
3582 2008-02-17 Alp Toker <alp@atoker.com>
3584 Reviewed by Sam Weinig.
3586 Fix for change made in r30355. Issue noticed by İsmail Dönmez.
3588 Verify SSL certs by default, but allow checks to be disabled with an
3589 environment variable (WEBKIT_IGNORE_SSL_ERRORS) for now.
3591 * platform/network/curl/ResourceHandleManager.cpp:
3592 (WebCore::ResourceHandleManager::startJob):
3594 2008-02-17 Bin Chen <binary.chen@gmail.com>
3596 Reviewed by Alp Toker.
3598 http://bugs.webkit.org/show_bug.cgi?id=17404
3599 Bug 17404: curl certification problem
3601 Disable SSL cert verification until we have a way of distributing
3602 certs and/or reporting SSL errors to the user.
3604 * platform/network/curl/ResourceHandleManager.cpp:
3605 (WebCore::ResourceHandleManager::startJob):
3607 2008-02-17 Alp Toker <alp@atoker.com>
3609 Reviewed by Mark Rowe.
3611 DevHelp fails to load local files; URL truncated by one character.
3613 Fix a file:// URL regression introduced in KURL.cpp r30243.
3615 * platform/KURL.cpp:
3616 (WebCore::KURL::KURL):
3618 2008-02-17 Dan Bernstein <mitz@apple.com>
3620 Reviewed by Darin Adler.
3622 - fix http://bugs.webkit.org/show_bug.cgi?id=17033
3623 <rdar://problem/5709315> REGRESSION: Really long <option> causes unnecessary page scroll bars to accommodate content
3625 Test: fast/forms/control-clip-overflow.html
3627 * rendering/RenderFlow.cpp:
3628 (WebCore::RenderFlow::lowestPosition): Account for control clipping.
3629 (WebCore::RenderFlow::rightmostPosition): Ditto.
3630 (WebCore::RenderFlow::leftmostPosition): Ditto.
3632 2008-02-16 Oliver Hunt <oliver@apple.com>
3636 Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
3638 Use cross-platform code to determine the dirty rects for
3639 fill and stroke operations
3641 * html/CanvasRenderingContext2D.cpp:
3642 (WebCore::CanvasRenderingContext2D::fill):
3643 (WebCore::CanvasRenderingContext2D::stroke):
3644 Added a FIXME as code inspection shows a trivial under-painting
3645 bug, although we currently ignore dirty rect tracking on canvas
3646 and repaint the whole thing anyway.
3647 (WebCore::CanvasRenderingContext2D::fillRect):
3649 2008-02-16 Sam Weinig <sam@webkit.org>
3651 Reviewed by Darin Adler.
3653 Take another step in the direction of getting rid of DeprecatedString
3654 by moving all the to{NumericType} off of it.
3656 - Create free functions that take a UChar* buffer and length to do
3657 the string-to-number conversions. This allows us to avoid two allocations
3658 if we don't already have a String and is consistent with the design we would
3660 - Since the toInt (and family) functions on DeprecatedString were slightly
3661 different than the ones on String (they didn't allow trailing garbage),
3662 an extra set of 'Strict' toInt functions were added that have this behavior.
3664 * platform/graphics/Color.cpp:
3665 (WebCore::Color::parseHexColor):
3666 * platform/text/PlatformString.h:
3667 * platform/text/String.cpp:
3668 (WebCore::String::percentage):
3669 (WebCore::String::toIntStrict):
3670 (WebCore::String::toUIntStrict):
3671 (WebCore::String::toInt64Strict):
3672 (WebCore::String::toUInt64Strict):
3673 (WebCore::String::toUInt):
3674 (WebCore::String::toDouble):
3675 (WebCore::isCharacterAllowedInBase):
3676 (WebCore::toIntegralType):
3677 (WebCore::lengthOfCharactersAsInteger):
3678 (WebCore::charactersToIntStrict):
3679 (WebCore::charactersToUIntStrict):
3680 (WebCore::charactersToInt64Strict):
3681 (WebCore::charactersToUInt64Strict):
3682 (WebCore::charactersToInt):
3683 (WebCore::charactersToUInt):
3684 (WebCore::charactersToInt64):
3685 (WebCore::charactersToUInt64):
3686 (WebCore::charactersToDouble):
3687 (WebCore::charactersToFloat):
3688 * platform/text/StringImpl.cpp:
3689 (WebCore::parseLength):
3690 (WebCore::StringImpl::toIntStrict):
3691 (WebCore::StringImpl::toUIntStrict):
3692 (WebCore::StringImpl::toInt64Strict):
3693 (WebCore::StringImpl::toUInt64Strict):
3694 (WebCore::StringImpl::toInt):
3695 (WebCore::StringImpl::toUInt):
3696 (WebCore::StringImpl::toInt64):
3697 (WebCore::StringImpl::toUInt64):
3698 (WebCore::StringImpl::toDouble):
3699 (WebCore::StringImpl::toFloat):
3700 * platform/text/StringImpl.h:
3701 * svg/SVGAnimationElement.cpp:
3702 (WebCore::SVGAnimationElement::parseClockValue):
3703 * svg/SVGFETurbulenceElement.cpp:
3704 (WebCore::SVGFETurbulenceElement::parseMappedAttribute):
3706 2008-02-16 Dan Bernstein <mitz@apple.com>
3708 Reviewed by Sam Weinig.
3710 - fix fixed-pitch font measurement of control characters that render
3713 Test: fast/text/fixed-pitch-control-characters.html
3715 * rendering/RenderText.cpp:
3716 (WebCore::RenderText::widthFromCache):
3718 2008-02-16 Kevin Ollivier <kevino@theolliviers.com>
3722 * platform/graphics/wx/GraphicsContextWx.cpp:
3723 (WebCore::GraphicsContext::drawImage):
3725 2008-02-16 Jan Michael Alonzo <jmalonzo@unpluggable.com>
3727 Reviewed by Alp Toker.
3729 Cross document messaging GTK+/autotools build fix.
3733 2008-02-15 Oliver Hunt <oliver@apple.com>
3735 Build fix for Qt and Cairo builds
3737 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3738 (WebCore::GraphicsContext::drawImage):
3739 * platform/graphics/qt/GraphicsContextQt.cpp:
3741 2008-02-15 Oliver Hunt <oliver@apple.com>
3745 Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
3746 Refactor CanvasRenderingContext2D::drawImage(HTMLCanvasElement) to remove evil ifdefs
3748 Add logic draw(ImageBuffer*) method to GraphicsContext to handle
3749 painting the source canvas content.
3751 * html/CanvasRenderingContext2D.cpp:
3752 (WebCore::CanvasRenderingContext2D::drawImage):
3753 * html/HTMLCanvasElement.cpp:
3754 (WebCore::HTMLCanvasElement::buffer):
3755 * html/HTMLCanvasElement.h:
3756 * platform/graphics/GraphicsContext.h:
3757 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3758 (WebCore::GraphicsContext::drawImage):
3759 * platform/graphics/cg/GraphicsContextCG.cpp:
3760 (WebCore::GraphicsContext::paintBuffer):
3761 (WebCore::GraphicsContext::drawImage):
3762 * platform/graphics/qt/GraphicsContextQt.cpp:
3763 (WebCore::GraphicsContext::drawImage):
3765 2008-02-15 Kevin Ollivier <kevino@theolliviers.com>
3767 Reviewed by David Hyatt.
3769 Using GetNativeFontInfoDesc() to generate the hash value was
3770 leading to duplicate entries in the HashMap. Use the font object's
3773 http://bugs.webkit.org/show_bug.cgi?id=17371
3775 * platform/graphics/wx/FontPlatformData.h:
3776 (WebCore::FontPlatformData::computeHash):
3778 2008-02-15 Ada Chan <adachan@apple.com>
3780 When parsing url we get from a CFURLRef, we need to null terminate
3781 the string for the case when url ends with a '/'.
3785 * platform/cf/KURLCFNet.cpp:
3786 (WebCore::KURL::KURL):
3788 2008-02-15 Brady Eidson <beidson@apple.com>
3792 Fix for <rdar://problem/5727175> and <rdar://problem/5740495> - Database threads and callback scripts can run after
3793 a page has closed or loaded a new document
3795 Deciding to make the Database I/O semantic the same as loaders/XHR when a document is shut down, this patch implements
3796 a policy of shutting down the databases in a document at the same time. This includes removing all pending transactions
3797 in a database, cutting off an queued statements in the current transaction, and preventing further callbacks from being
3800 No new layout tests with this patch as the current layout tests were catching this issue in a plethora of ways already
3801 (crashing, unexpected exceptions and output, etc)
3804 (WebCore::Document::~Document): Don't actually stop the database thread here - it better have been stopped already.
3805 Add an assertion to that effect.
3806 (WebCore::Document::addOpenDatabase): Add a new database handle to this Document's open database set
3807 (WebCore::Document::removeOpenDatabase): Remove such a handle
3808 (WebCore::Document:: stopDatabases): Call "close" on all open Database handles for this document
3811 * loader/FrameLoader.cpp:
3812 (WebCore::FrameLoader::stopLoading): In addition to canceling all resource loads and XHRs, stop all database I/O
3814 * platform/MessageQueue.h:
3815 (WebCore::MessageQueue::killed):
3817 * platform/sql/SQLiteTransaction.cpp:
3818 (WebCore::SQLiteTransaction::stop): Added. Explicit stop to cut off a transaction so it won't try anymore SQL activity
3819 * platform/sql/SQLiteTransaction.h:
3821 * storage/Database.cpp:
3822 (WebCore::Database::Database):
3823 (WebCore::Database::~Database):
3824 (WebCore::Database::markAsDeletedAndClose): Check if the thread has terminated before committing to waiting on the
3826 (WebCore::Database::stop): Stop this database, including all queued transactions and callbacks
3827 * storage/Database.h:
3828 (WebCore::Database::stopped):
3830 * storage/DatabaseThread.cpp:
3831 (WebCore::DatabaseThread::terminationRequested):
3832 * storage/DatabaseThread.h:
3834 * storage/SQLTransaction.cpp:
3835 (WebCore::SQLTransaction::executeSQL): Throw an exception if a new executeSQL comes in after a database is closed
3836 (WebCore::SQLTransaction::checkAndHandleClosedDatabase): Added. Clears queued statements and clear the next step
3837 when the database has been closed since the last step/callback was run. Also stops the current SQLite transaction,
3839 (WebCore::SQLTransaction::performNextStep):
3840 (WebCore::SQLTransaction::performPendingCallback):
3841 * storage/SQLTransaction.h:
3843 2008-02-15 Adele Peterson <adele@apple.com>
3847 Fix for <rdar://problem/5745072> REGRESSION (r29348): Shift + Tab does not change indent level on Google Docs
3849 The immediate cause of this bug was that we stopped sending keypress events for the tab key when it is used to advance focus.
3850 We had a special case for forward-tab in designMode, where the default behavior was to insert a tab key (or respect the keypress handler behavior).
3851 This change makes the shift-tab behavior match the forward-tab behavior.
3853 If the site had put their event handler (which does the indenting) on the keydown event, then this problem would have been avoided.
3854 This is something we should look into and maybe advise the site on in the future. However, it's a low-risk change to just make tab and shift-tab uniform
3855 in this respect, so I think this is the way to go for right now.
3857 * page/EventHandler.cpp: (WebCore::EventHandler::defaultTabEventHandler):
3859 2008-02-15 Anders Carlsson <andersca@apple.com>
3863 <rdar://problem/5738678>
3864 REGRESSION: "Loading" status remains when uploading file to .Mac iDisk via Safari
3866 Use the new CFNetwork functions for setting body parts.
3868 * platform/network/cf/FormDataStreamCFNet.cpp:
3869 (WebCore::setHTTPBody):
3870 (WebCore::httpBodyFromRequest):
3872 2008-02-15 Geoffrey Garen <ggaren@apple.com>
3874 Reviewed by Anders Carlsson.
3876 Fixed <rdar://problem/5725429> REGRESSION (r27898): Greenfield online
3877 surveys no longer work due to XMLHttpRequest exceptions
3879 Reverted some exception throwing code from r12194.
3881 To comply with the W3C draft spec, we used to throw an exception when
3882 trying to access responseText and responseXML at the wrong time, but
3883 that turned out to be a compatibility problem.
3885 Now, matching Firefox and previous versions of WebKit, we never throw
3886 an exception when accessing responseText or responseXML.
3888 See http://www.mail-archive.com/public-webapi@w3.org/msg02756.html.
3890 * xml/XMLHttpRequest.cpp:
3891 (WebCore::XMLHttpRequest::getResponseText):
3892 (WebCore::XMLHttpRequest::getResponseXML):
3894 2008-02-15 Justin Garcia <justin.garcia@apple.com>
3896 Reviewed by Dan Bernstein.
3898 <rdar://problem/5738768> REGRESSION (r30062): Crash in InlineTextBox::isLineBreak() when Undoing a replace
3900 Rolled out <http://trac.webkit.org/projects/webkit/changeset/29667>
3902 * editing/SelectionController.cpp:
3903 (WebCore::SelectionController::nodeWillBeRemoved):
3905 2008-02-15 Alice Liu <alice.liu@apple.com>
3909 Fixed <rdar://problem/5741440> REGRESSION (r28496): After deactivating JavaScript, scripts embedded in the HTML page continue to run
3911 Before this patch, Frame::scriptProxy() would only return null in the case that javascript was
3912 disabled and if the script proxy field wasn't set (which would only be the case if the window
3913 hasn't loaded anything yet). Not all callers of scriptProxy() always check for a non-null return
3914 value. Those that did check would effectively be checking if javascript was enabled before proceeding.
3915 This fix consists of 2 elements: first, make sure that scriptProxy() will never return null, regardless
3916 of whether javascript is disabled. This will mean that callers who don't check for null won't crash.
3917 Second, callers who did check for null now instead check for javascript being disabled. This means that
3918 code paths intended for preventing javascript from being run will be making the correct check. Another
3919 minor addition to this patch is that I added a function on KSJProxy to be a shortcut for checking if javascript
3922 * bindings/js/JSCustomSQLStatementCallback.cpp:
3923 (WebCore::JSCustomSQLStatementCallback::handleEvent):
3924 * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
3925 (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
3926 * bindings/js/JSCustomSQLTransactionCallback.cpp:
3927 (WebCore::JSCustomSQLTransactionCallback::handleEvent):
3928 * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
3929 (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
3930 * bindings/js/JSCustomVoidCallback.cpp:
3931 (WebCore::JSCustomVoidCallback::handleEvent):
3932 * bindings/js/JSCustomXPathNSResolver.cpp:
3933 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
3934 * bindings/js/ScheduledAction.cpp:
3935 (WebCore::ScheduledAction::execute):
3936 * bindings/js/kjs_events.cpp:
3937 (WebCore::JSAbstractEventListener::handleEvent):
3938 (WebCore::JSLazyEventListener::parseCode):
3939 * bindings/js/kjs_html.cpp:
3940 (WebCore::runtimeObjectImplementsCall):
3941 * bindings/js/kjs_proxy.cpp:
3942 (WebCore::KJSProxy::isEnabled):
3943 * bindings/js/kjs_proxy.h:
3944 * bindings/js/kjs_window.cpp:
3945 (KJS::Window::retrieveWindow):
3946 (KJS::Window::retrieve):
3948 (WebCore::Document::createHTMLEventListener):
3949 * dom/EventTarget.cpp:
3950 (WebCore::EventTarget::dispatchGenericEvent):
3951 * html/HTMLPlugInElement.cpp:
3952 (WebCore::HTMLPlugInElement::createNPObject):
3953 * html/HTMLScriptElement.cpp:
3954 (WebCore::HTMLScriptElement::evaluateScript):
3955 * html/HTMLTokenizer.cpp:
3956 (WebCore::HTMLTokenizer::parseTag):
3957 (WebCore::HTMLTokenizer::processToken):
3958 * loader/FrameLoader.cpp:
3959 (WebCore::FrameLoader::executeScript):
3960 (WebCore::FrameLoader::userGestureHint):
3961 (WebCore::FrameLoader::open):
3962 (WebCore::FrameLoader::dispatchWindowObjectAvailable):
3963 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
3964 * manual-tests/disable-javascript-reload.html: Added.
3966 (WebCore::Frame::scriptProxy):
3967 (WebCore::Frame::bindingRootObject):
3968 (WebCore::Frame::windowScriptNPObject):
3970 * page/InspectorController.cpp:
3971 (WebCore::canPassNodeToJavaScript):
3972 * page/mac/FrameMac.mm:
3973 (WebCore::Frame::windowScriptObject):
3974 * svg/SVGDocumentExtensions.cpp:
3975 (WebCore::SVGDocumentExtensions::createSVGEventListener):
3977 2008-02-15 Dan Bernstein <mitz@apple.com>
3979 Reviewed by Alexey Proskuryakov.
3981 - WebCore part of fixing http://bugs.webkit.org/show_bug.cgi?id=17360
3982 <rdar://problem/5743131> REGRESSION: mp4 file downloaded from server is downloaded as html
3984 Test: http/tests/loading/text-content-type-with-binary-extension.html
3986 Refined the workaround for <rdar://problem/5321972> to exclude files
3987 with extensions that are known to be associated with binary MIME types.
3989 * WebCore.xcodeproj/project.pbxproj: Added WebCoreURLResponse.{h,mm}.
3990 * platform/network/mac/ResourceResponseMac.mm:
3991 (WebCore::ResourceResponse::doUpdateResourceResponse): Moved the
3992 workaround logic into WebCoreURLResponse.
3993 * platform/network/mac/WebCoreURLResponse.h: Added.
3994 * platform/network/mac/WebCoreURLResponse.mm: Added.
3995 (createBinaryExtensionsSet): Returns a set of extensions known to
3996 belong to MIME types of binary data.
3997 (-[NSURLResponse _webcore_MIMEType]):
3998 (-[NSHTTPURLResponse _webcore_MIMEType]): Forces the MIME type from
3999 application/octet-stream to text/plain if that is the specified
4000 Content-Type, unless the extension is in the binary extensions set.
4002 2008-02-15 Dan Bernstein <mitz@apple.com>
4004 Reviewed by Dave Hyatt.
4006 - fix http://bugs.webkit.org/show_bug.cgi?id=17306
4007 <rdar://problem/5737923> Transitions between styles that have different transition-* properties behave inconsistently
4009 * manual-tests/transitions.html: Added.
4010 * page/AnimationController.cpp:
4011 (WebCore::CompositeImplicitAnimation::animate): Changed to use the
4012 transition properties of the current style rather than the target style.
4013 (WebCore::AnimationControllerPrivate::get): Changed to not create an
4014 animation if the style does not have transitions.
4015 (WebCore::AnimationController::updateImplicitAnimations): Added code to
4016 return the target style if the current style is not animating.
4017 * rendering/RenderObject.cpp:
4018 (WebCore::RenderObject::setAnimatableStyle): Changed to call
4019 updateImplicitAnimations() even if the current style does not have
4020 transitions, because we may be animating out of a style that had them.
4022 2008-02-15 Alexey Proskuryakov <ap@webkit.org>
4024 Rubber-stamped by Darin.
4026 Remove an obsolete WebCore readme file.
4030 2008-02-15 Sam Weinig <sam@webkit.org>
4032 Reviewed by Darin Adler.
4034 Remove more uses of DeprecatedString in preparation of getting rid of it.
4036 * bridge/mac/WebCoreScriptDebugger.mm:
4037 * css/CSSCursorImageValue.cpp:
4038 (WebCore::isSVGCursorIdentifier):
4039 (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
4040 * css/CSSStyleSelector.h:
4042 (WebCore::Element::dump):
4043 (WebCore::Element::formatForDebugger):
4045 (WebCore::Position::debugPosition):
4046 (WebCore::Position::formatForDebugger):
4048 (WebCore::Range::formatForDebugger):
4050 (WebCore::Text::formatForDebugger):
4051 * editing/Selection.cpp:
4052 (WebCore::Selection::debugPosition):
4053 (WebCore::Selection::formatForDebugger):
4054 * editing/SelectionController.cpp:
4055 (WebCore::SelectionController::debugRenderer):
4056 * editing/VisiblePosition.cpp:
4057 (WebCore::VisiblePosition::debugPosition):
4058 * html/HTMLTokenizer.cpp:
4059 (WebCore::HTMLTokenizer::scriptHandler):
4060 (WebCore::HTMLTokenizer::parseTag):
4061 (WebCore::HTMLTokenizer::processToken):
4062 (WebCore::HTMLTokenizer::notifyFinished):
4063 * svg/SVGFontFaceElement.cpp:
4064 (WebCore::mapAttributeToCSSProperty):
4066 2008-02-15 Adam Roben <aroben@apple.com>
4068 * bindings/scripts/CodeGenerator.pm: Touch this to force bindings to
4071 2008-02-15 Adam Roben <aroben@apple.com>
4073 Try to fix Qt/GTK+ builds
4075 * WebCore.pro: Remove MessageEvent.{idl,cpp} from the unconditional
4078 2008-02-15 Darin Adler <darin@apple.com>
4080 - another Qt build fix
4082 * platform/qt/KURLQt.cpp:
4083 (WebCore::KURL::operator QUrl): Use the characters directly, not ascii().
4084 Eliminate references to urlString.
4086 2008-02-15 Darin Adler <darin@apple.com>
4088 - another Qt build fix
4090 * platform/qt/ClipboardQt.cpp:
4091 (WebCore::ClipboardQt::declareAndWriteDragImage): Use KURL instead of String.
4093 2008-02-14 Darin Adler <darin@apple.com>
4095 - another round of build fixes
4097 * platform/KURL.cpp:
4098 (WebCore::appendEncodedHostname): Fix spelling (strLen, not strlen).
4099 * platform/network/curl/ResourceHandleManager.cpp:
4100 (WebCore::parseDataUrl): Fix a ".." typo and call data instead of characters.
4102 2008-02-14 Darin Adler <darin@apple.com>
4104 - added back accidentally-removed files
4106 * platform/DeprecatedStringList.cpp: Copied from platform/DeprecatedStringList.cpp.
4107 * platform/DeprecatedStringList.h: Copied from platform/DeprecatedStringList.h.
4108 * platform/mac/DeprecatedStringListMac.mm: Copied from platform/mac/DeprecatedStringListMac.mm.
4110 2008-02-14 Darin Adler <darin@apple.com>
4114 * platform/KURL.cpp:
4115 (WebCore::appendEncodedHostname): Use String to make a QString.
4116 * platform/network/cf/ResourceRequest.h:
4117 (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
4118 * platform/network/curl/ResourceHandleManager.cpp:
4119 (WebCore::parseDataUrl): Updated to String rather than DeprecatedString functions.
4121 2008-02-14 Darin Adler <darin@apple.com>
4125 * platform/network/qt/ResourceRequest.h:
4126 (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
4128 2008-02-14 Darin Adler <darin@apple.com>
4132 * platform/network/curl/ResourceRequest.h:
4133 (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
4135 2008-02-14 Darin Adler <darin@apple.com>
4137 - first Qt build fix
4139 * dom/XMLTokenizer.cpp:
4140 (WebCore::XMLTokenizer::endElementNs): Added a missing string() call.
4142 2008-02-14 Darin Adler <darin@apple.com>
4144 Reviewed by Eric Seidel.
4146 Based on work by Marvin Decker <marv.decker@gmail.com>
4148 - fix http://bugs.webkit.org/show_bug.cgi?id=16538
4149 KURL should use String instead of DeprecatedString
4151 - fix http://bugs.webkit.org/show_bug.cgi?id=16485
4152 DocLoader::checkForReload will crash if the URL isNull
4153 and a similar problem in IconDatabase
4155 - fix http://bugs.webkit.org/show_bug.cgi?id=16487
4156 KURL doesn't preserve isNull when constructed with a DeprecatedString
4158 - changed completeURL and various DOM getters to return KURL, to avoid
4159 conversion back and forth from KURL to String
4161 - changed the conversion of KURL to NSURL or NSString to be automatic,
4162 to ease the use of KURL in Objective C DOM bindings, and eliminated
4163 the getNSURL function
4165 - because I had to visit the DOM bindings anyway, eliminated almost all
4166 the use of the KJS namespace for things in WebCore
4168 - fixed HTMLOptionElement constructor to check for undefined rather
4169 than size of the arguments array
4171 - eliminated some other unnecessary uses of DeprecatedString
4173 - changed String::split to take a Vector parameter instead of returning
4174 a Vector, for better performance
4176 - added a couple of missing calls to do layout in SVG image handling;
4177 I was able to reproduce these only because I had broken URLs for a
4178 while -- not sure how to reproduce them now but the changes are
4181 Performance testing shows this to be at least a 1% speedup.
4183 Added a new function protocols to efficiently compare protocols
4184 without case errors and a blankURL function so we don't have to
4185 code "about:blank" in multiple places in the code and don't have to
4186 construct a frash KURL each time. Moved decode_string and encode_string
4187 out of KURL and gave them clearer names.
4189 Made KURL constructors explicit to highlight potentially-expensive
4190 operations and the poor semantics of KURL's constructor that takes
4193 * WebCore.base.exp: Updated.
4195 * bindings/js/JSAttrCustom.cpp:
4196 (WebCore::JSAttr::setValue): Use protocolIs.
4197 * bindings/js/JSAudioConstructor.h: KJS namespace change.
4198 * bindings/js/JSCSSRuleCustom.cpp:
4199 (WebCore::toJS): Ditto.
4200 * bindings/js/JSCSSValueCustom.cpp:
4201 (WebCore::toJS): Ditto.
4202 * bindings/js/JSDocumentCustom.cpp:
4203 (WebCore::JSDocument::location): Ditto.
4204 (WebCore::JSDocument::setLocation): Updated for KURL change.
4205 (WebCore::toJS): KJS namespace change.
4206 * bindings/js/JSElementCustom.cpp:
4207 (WebCore::allowSettingSrcToJavascriptURL): Use protocolIs.
4208 (WebCore::JSElement::setAttribute): KJS namespace change.
4209 (WebCore::JSElement::setAttributeNode): Ditto.
4210 (WebCore::JSElement::setAttributeNS): Ditto.
4211 (WebCore::JSElement::setAttributeNodeNS): Ditto.
4212 * bindings/js/JSHTMLFrameElementCustom.cpp:
4213 (WebCore::allowSettingJavascriptURL): Use protocolIs.
4214 (WebCore::JSHTMLFrameElement::setSrc): KJS namespace change.