1 2008-02-29 Mark Rowe <mrowe@apple.com>
3 Rubber-stamped by Eric Seidel.
5 Remove unneeded includes of WebCoreSystemInterface.h.
7 * loader/mac/LoaderNSURLExtras.m:
8 * page/mac/FrameMac.mm:
9 * page/mac/WebCoreFrameBridge.mm:
10 * platform/MIMETypeRegistry.cpp:
11 * platform/graphics/mac/ImageMac.mm:
12 * platform/mac/PasteboardMac.mm:
14 2008-02-29 Mark Rowe <mrowe@apple.com>
16 Reviewed by Oliver Hunt and Oliver Hunt.
18 <rdar://problem/4753845> WebKit should use CGEventSourceSecondsSinceLastEventType in place of WKSecondsSinceLastInputEvent SPI.
20 * platform/mac/SystemTimeMac.cpp: Replace use of WKSecondsSinceLastInputEvent with CGEventSourceSecondsSinceLastEventType.
21 * platform/mac/WebCoreSystemInterface.h: Remove unused symbol.
22 * platform/mac/WebCoreSystemInterface.mm: Ditto.
23 * WebCore.base.exp: Ditto.
25 2008-02-28 Mark Rowe <mrowe@apple.com>
27 Reviewed by Dave Hyatt.
29 Make use of new CGFont APIs on Leopard rather than making a WebKitSystemInterface call.
31 * DerivedSources.make: Add Tiger-only symbols to the export file when running on Tiger.
32 * WebCore.Tiger.exp: Added. Move Tiger-only symbol here from WebCore.base.exp.
34 * platform/graphics/mac/SimpleFontDataMac.mm:
35 (WebCore::SimpleFontData::platformInit): Use Leopard APIs when building on Leopard.
36 * platform/mac/WebCoreSystemInterface.h: Don't declare wkGetFontMetrics on Leopard as it is unused.
37 * platform/mac/WebCoreSystemInterface.mm: Ditto.
39 2008-02-28 Matt Lilek <webkit@mattlilek.com>
41 Reviewed by Tim Hatcher.
43 Bug 16535: Stylesheets loaded with @import are not editable
44 http://bugs.webkit.org/show_bug.cgi?id=16535
45 <rdar://problem/5712899>
47 Sheets loaded using @import were incorrectly being flagged as non-editable
48 user agent sheets because their parent sheet doesn't have an ownerNode. We now
49 check to make sure sheets also don't have a href before restricting their editability.
51 * page/inspector/StylesSidebarPane.js:
53 2008-02-28 Rodney Dawes <dobey@wayofthemonkey.com>
55 Reviewed by Adam Roben.
57 Copy PluginPackageWin.cpp to shared PluginPackage.cpp.
58 Add PluginPackage.cpp to build configurations.
59 Remove PluginPackage destructor from TemporaryLinkStubs.cpp.
60 Use cross-platform pathGetFilename method.
61 Remove platform-specific code from shared PluginPackage implementation.
62 Remove shared code from PluginPackageWin.cpp.
67 * WebCore.vcproj/WebCore.vcproj:
68 * platform/gtk/TemporaryLinkStubs.cpp:
69 * platform/qt/TemporaryLinkStubs.cpp:
70 * platform/wx/TemporaryLinkStubs.cpp:
71 * plugins/PluginPackage.cpp:
72 * plugins/win/PluginPackageWin.cpp:
74 2008-02-28 Justin Garcia <justin.garcia@apple.com>
76 Reviewed by Darin Adler.
78 <rdar://problem/4930986> REGRESSION: Paste As Quotation pastes black text instead of blue
80 Add a second style span at copy time to hold document default styles. This helps us
81 differentiate between those and user applied styles at paste time, where we'll want
82 to let Mail's Paste As Quotation blockquote override document default styles, but
85 * css/CSSComputedStyleDeclaration.cpp:
86 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed the unit type used
87 for -webkit-text-stroke-width from CSS_NUMBER to CSS_PX, to match other properties that
88 are thick | medium | thin | <length>. Before, there was a mismatch between the unit
89 type of -webkit-text-stroke-width property values in a CSSComputedStyleDeclaration for
90 an element and that element's inlineStyleDecl(), causing identical values to always appear
92 * editing/ReplaceSelectionCommand.cpp:
93 (WebCore::ReplaceSelectionCommand::handlePasteAsQuotationNode): Fixed. Don't just change
94 the class to an empty string, completely remove it, it's no longer needed.
95 (WebCore::handleStyleSpansBeforeInsertion): Moved the optimization from doApply here.
96 (WebCore::ReplaceSelectionCommand::handleStyleSpans):
97 Added, replaces removeRedundantStyles.
98 We aren't (yet) removing all redundant styles, just those on style spans, so I removed the
99 unused code and renamed the function.
100 There won't be more than two style spans that we need to consider, the one with the
101 source document's default styles and styles on the commonAncestor of the copied Range,
102 so don't look for more than two.
103 Let elements that wrap the incoming fragment override the source document's styles.
104 (WebCore::ReplaceSelectionCommand::doApply): Moved code to handleStyleSpansBeforeInsertion
105 and call the renamed handleStyleSpans.
106 * editing/ReplaceSelectionCommand.h:
107 * editing/markup.cpp:
108 (WebCore::removeDefaultStyles): Added. Don't add document defaults to the style span
109 that holds user applied styles, since they'll be added to their own style span.
110 (WebCore::createMarkup):
111 Add a second style span that holds just the document defaults. This lets us differentiate
112 between those and user applied styles at paste time.
113 Mail blockquotes are just another type of special element, moved their handling there. This
114 also lets paste code make assumptions about the position of the two style spans (they are
115 *always* parent-child).
117 2008-02-28 Brent Fulgham <bfulgham@gmail.com>
119 http://bugs.webkit.org/show_bug.cgi?id=17576
120 Modify RenderThemeWin to use SOFT_LINK
122 Reviewed by Adam Roben.
124 * rendering/RenderThemeWin.h: Remove unneeded library handle
125 * rendering/RenderThemeWin.cpp: Change to use SOFT_LINK
126 rather than hand-coded load library calls.
128 2008-02-28 Dan Bernstein <mitz@apple.com>
130 Reviewed by Darin Adler.
132 - fix http://bugs.webkit.org/show_bug.cgi?id=17590
133 ASSERTION FAILED: subject in jsRegExpExecute()
135 * page/mac/FrameMac.mm:
136 (WebCore::Frame::matchLabelsAgainstElement): Added an early return in
137 case the element name is empty.
139 2008-02-28 Justin Garcia <justin.garcia@apple.com>
141 Reviewed by Dan Bernstein
143 Small editing speed up.
146 (WebCore::Position::upstream): Don't check for a change in editability
147 if the current node hasn't changed.
148 (WebCore::Position::downstream): Ditto.
150 2008-02-27 Dan Bernstein <mitz@apple.com>
152 Reviewed by John Sullivan.
154 - fix <rdar://problem/5607547> Single letter surrounded by soft hyphens can disappear
156 Test: fast/text/soft-hyphen-2.html
158 * rendering/bidi.cpp:
159 (WebCore::chopMidpointsAt): Changed to iterate midpoints backwards, so
160 that if there are two midpoints at the given position, only the last one
163 2008-02-27 Dan Bernstein <mitz@apple.com>
165 Reviewed by Darin Adler.
167 - make centered text in right-to-left blocks spill over to the left
169 Test: fast/text/align-center-rtl-spill.html
171 * rendering/bidi.cpp:
172 (WebCore::RenderBlock::computeHorizontalPositionsForLine):
174 2008-02-27 Dan Bernstein <mitz@apple.com>
176 Reviewed by Darin Adler.
178 - more bidi.cpp cleanup
180 * platform/text/BidiResolver.h:
181 (WebCore::BidiCharacterRun::destroy): Added. Overridden by BidiRun .
182 (WebCore::BidiResolver<Iterator, Run>::addRun): Moved BidiState::addRun()
184 (WebCore::BidiResolver<Iterator, Run>::appendRun): Changed to use
186 (WebCore::BidiResolver<Iterator, Run>::deleteRuns): Changed to use
187 destroy(), avoiding the need to specialize this method in BidiState.
188 * rendering/bidi.cpp:
189 (WebCore::BidiRun::destroy): Removed the RenderArena parameter.
190 (WebCore::BidiState::deleteRuns): Removed now-unnecessary specialization.
191 (WebCore::BidiState::addRun): Removed now-unnecessary specialization.
192 (WebCore::RenderBlock::createLineBoxes):
193 (WebCore::RenderBlock::constructLine):
194 (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added a FIXME.
195 (WebCore::RenderBlock::computeVerticalPositionsForLine):
196 (WebCore::buildCompactRuns):
197 (WebCore::RenderBlock::layoutInlineChildren):
198 (WebCore::RenderBlock::determineStartPosition):
199 (WebCore::RenderBlock::determineEndPosition):
200 (WebCore::RenderBlock::matchedEndLine):
201 (WebCore::skipNonBreakingSpace):
202 (WebCore::RenderBlock::skipWhitespace):
203 (WebCore::shouldSkipWhitespaceAfterStartObject):
205 (WebCore::BidiRun): Added m_ prefixes to several member variables.
207 2008-02-27 Sam Weinig <sam@webkit.org>
211 Fix for <rdar://problem/5768769>
213 - Don't allow cross-origin calls using window.functionName.call(otherFrame)
216 * bindings/js/JSLocation.cpp:
217 (WebCore::jsLocationProtoFuncToString): Do same-origin check.
218 * bindings/js/kjs_window.cpp:
219 (KJS::windowProtoFuncAToB): Ditto.
220 (KJS::windowProtoFuncBToA): Ditto.
221 (KJS::windowProtoFuncOpen): Ditto.
222 (KJS::windowProtoFuncClearTimeout): Ditto.
223 * bindings/scripts/CodeGeneratorJS.pm: Ditto.
225 2008-02-27 David Hyatt <hyatt@apple.com>
227 More cleanup in preparation for fixing the HTML5 spec performance regression.
229 Reviewed by Sam Weinig
232 (WebCore::Attr::childrenChanged):
234 * dom/ContainerNode.cpp:
235 (WebCore::ContainerNode::insertBefore):
236 (WebCore::ContainerNode::replaceChild):
237 (WebCore::ContainerNode::removeChild):
238 (WebCore::ContainerNode::removeChildren):
239 (WebCore::ContainerNode::appendChild):
240 (WebCore::ContainerNode::addChild):
241 (WebCore::ContainerNode::childrenChanged):
242 * dom/ContainerNode.h:
244 (WebCore::Document::childrenChanged):
247 (WebCore::Element::childrenChanged):
250 (WebCore::Node::childrenChanged):
251 * html/HTMLObjectElement.cpp:
252 (WebCore::HTMLObjectElement::childrenChanged):
253 * html/HTMLObjectElement.h:
254 * html/HTMLOptGroupElement.cpp:
255 (WebCore::HTMLOptGroupElement::childrenChanged):
256 * html/HTMLOptGroupElement.h:
257 * html/HTMLOptionElement.cpp:
258 (WebCore::HTMLOptionElement::childrenChanged):
259 * html/HTMLOptionElement.h:
260 * html/HTMLScriptElement.cpp:
261 (WebCore::HTMLScriptElement::childrenChanged):
262 * html/HTMLScriptElement.h:
263 * html/HTMLSelectElement.cpp:
264 (WebCore::HTMLSelectElement::childrenChanged):
265 * html/HTMLSelectElement.h:
266 * html/HTMLStyleElement.cpp:
267 (WebCore::HTMLStyleElement::childrenChanged):
268 * html/HTMLStyleElement.h:
269 * html/HTMLTextAreaElement.cpp:
270 (WebCore::HTMLTextAreaElement::childrenChanged):
271 * html/HTMLTextAreaElement.h:
272 * html/HTMLTitleElement.cpp:
273 (WebCore::HTMLTitleElement::childrenChanged):
274 * html/HTMLTitleElement.h:
275 * svg/SVGClipPathElement.cpp:
276 (WebCore::SVGClipPathElement::childrenChanged):
277 * svg/SVGClipPathElement.h:
278 * svg/SVGDefinitionSrcElement.cpp:
279 (WebCore::SVGDefinitionSrcElement::childrenChanged):
280 * svg/SVGDefinitionSrcElement.h:
281 * svg/SVGFontFaceElement.cpp:
282 (WebCore::SVGFontFaceElement::childrenChanged):
283 * svg/SVGFontFaceElement.h:
284 * svg/SVGFontFaceFormatElement.cpp:
285 (WebCore::SVGFontFaceFormatElement::childrenChanged):
286 * svg/SVGFontFaceFormatElement.h:
287 * svg/SVGFontFaceSrcElement.cpp:
288 (WebCore::SVGFontFaceSrcElement::childrenChanged):
289 * svg/SVGFontFaceSrcElement.h:
290 * svg/SVGFontFaceUriElement.cpp:
291 (WebCore::SVGFontFaceUriElement::childrenChanged):
292 * svg/SVGFontFaceUriElement.h:
293 * svg/SVGGElement.cpp:
294 (WebCore::SVGGElement::childrenChanged):
296 * svg/SVGGradientElement.cpp:
297 (WebCore::SVGGradientElement::childrenChanged):
298 * svg/SVGGradientElement.h:
299 * svg/SVGMarkerElement.cpp:
300 (WebCore::SVGMarkerElement::childrenChanged):
301 * svg/SVGMarkerElement.h:
302 * svg/SVGMaskElement.cpp:
303 (WebCore::SVGMaskElement::childrenChanged):
304 * svg/SVGMaskElement.h:
305 * svg/SVGPatternElement.cpp:
306 (WebCore::SVGPatternElement::childrenChanged):
307 * svg/SVGPatternElement.h:
308 * svg/SVGStyleElement.cpp:
309 (WebCore::SVGStyleElement::childrenChanged):
310 * svg/SVGStyleElement.h:
311 * svg/SVGStyledElement.cpp:
312 (WebCore::SVGStyledElement::childrenChanged):
313 * svg/SVGStyledElement.h:
314 * svg/SVGTitleElement.cpp:
315 (WebCore::SVGTitleElement::childrenChanged):
316 * svg/SVGTitleElement.h:
317 * svg/SVGUseElement.cpp:
318 (WebCore::SVGUseElement::childrenChanged):
319 * svg/SVGUseElement.h:
321 2008-02-27 Julien Chaffraix <julien.chaffraix@gmail.com>
325 http://bugs.webkit.org/show_bug.cgi?id=17481
326 Several consecutive calls to XMLHttpRequest::open should dispatch only one readyState event
328 Test: http/tests/xmlhttprequest/xmlhttprequest-multiple-open.html
330 * xml/XMLHttpRequest.cpp:
331 (WebCore::XMLHttpRequest::open):
333 2008-02-27 Sriram Neelakandan <sriram.neelakandan@gmail.com>
335 Reviewed, tweaked and landed by ap.
337 http://bugs.webkit.org/show_bug.cgi?id=17487
338 HTMLInput mysteriously fails to work if ICU dat file is missing
340 * platform/text/TextBreakIteratorICU.cpp: (WebCore::setUpIterator): Assert that the iterator
343 2008-02-27 Adam Roben <aroben@apple.com>
345 Windows build fix after r30616
347 * platform/win/ClipboardWin.cpp:
349 2008-02-27 Nikolas Zimmermann <zimmermann@kde.org>
353 Small style cleanup, and obvious fix: SVGGElement reacted on
354 'clipPathUnits' changes, which is a funny copy&paste error.
356 * svg/SVGGElement.cpp:
357 (WebCore::SVGGElement::parseMappedAttribute):
358 (WebCore::SVGGElement::svgAttributeChanged):
359 (WebCore::SVGGElement::createRenderer):
361 2008-02-27 Nikolas Zimmermann <zimmermann@kde.org>
365 Cleanup coding style. Still on my way to fix dynamic updates of all SVG elements.
366 Currently at SVGF*. SVGDefs/DescElement don't need any dyn update fixes but cleanups.
368 * svg/SVGDefsElement.cpp:
369 (WebCore::SVGDefsElement::createRenderer):
370 * svg/SVGDefsElement.h:
371 * svg/SVGDescElement.h:
373 2008-02-26 Antti Koivisto <antti@apple.com>
377 Fix <rdar://problem/5761326>
378 REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang)
380 Generate better code with VS:
381 - Use ALWAYS_INLINE macro to guarantee versions of allowsAccessFrom() are reduced to single functions
382 - Refactor error reporting so that there is no need to construct/destruct Strings in common cases
383 - Add a separate version of the function for cases where error messages are not wanted
385 * bindings/js/JSDOMWindowCustom.cpp:
386 (WebCore::JSDOMWindow::customGetOwnPropertySlot):
387 * bindings/js/kjs_window.cpp:
388 (KJS::Window::allowsAccessFrom):
389 (KJS::Window::allowsAccessFromNoErrorMessage):
390 (KJS::Window::allowsAccessFromPrivate):
391 (KJS::Window::crossDomainAccessErrorMessage):
392 * bindings/js/kjs_window.h:
394 2008-02-26 Sam Weinig <sam@webkit.org>
396 Reviewed by Dave Hyatt.
398 - remove DeprecatedCString, DeprecatedArray, and ArrayImpl.
402 * WebCore.vcproj/WebCore.vcproj:
403 * WebCore.xcodeproj/project.pbxproj:
404 * WebCoreSources.bkl:
405 * platform/ArrayImpl.cpp: Removed.
406 * platform/ArrayImpl.h: Removed.
407 * platform/DeprecatedArray.h: Removed.
408 * platform/DeprecatedCString.cpp: Removed.
409 * platform/DeprecatedCString.h: Removed.
410 * platform/text/CString.cpp:
411 (WebCore::CString::length):
412 * platform/text/CString.h:
414 2008-02-26 David Hyatt <hyatt@apple.com>
416 Cleanup of childrenChanged in preparation for fixing the HTML5 spec slowdown.
418 Reviewed by Sam Weinig
421 (WebCore::Attr::childrenChanged):
422 * dom/ContainerNode.cpp:
423 (WebCore::ContainerNode::insertBefore):
424 (WebCore::ContainerNode::replaceChild):
425 (WebCore::ContainerNode::removeChild):
426 (WebCore::ContainerNode::removeChildren):
427 (WebCore::ContainerNode::appendChild):
428 (WebCore::ContainerNode::addChild):
429 (WebCore::ContainerNode::childrenChanged):
430 * dom/ContainerNode.h:
431 * dom/EventTargetNode.cpp:
432 (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent):
433 * dom/EventTargetNode.h:
434 * dom/NamedAttrMap.cpp:
435 (WebCore::NamedAttrMap::addAttribute):
436 (WebCore::NamedAttrMap::removeAttribute):
438 2008-02-26 Darin Adler <darin@apple.com>
442 - remove use of DeprecatedCString from Windows pasteboard code
444 * platform/win/ClipboardUtilitiesWin.cpp:
445 (WebCore::createGlobalData): Added an overload for Vector<char>.
446 Streamlined the logic a bit.
447 (WebCore::append): Added. Helper functions for appending to a
449 (WebCore::markupToCF_HTML): Rewrote to use Vector<char> instead
450 of DeprecatedCString. Also simplified the logic a bit and used
451 macros to handle the integer width.
452 (WebCore::urlToMarkup): Use Vector<UChar> instead of String.
453 (WebCore::replaceNewlinesWithWindowsStyleNewlines): Tweaked.
454 * platform/win/ClipboardUtilitiesWin.h: Update type of return
455 value from markupToCF_HTML. Did a bit of streamlining too.
456 * platform/win/ClipboardWin.cpp:
457 (WebCore::writeURL): Update for above changes.
458 (WebCore::ClipboardWin::declareAndWriteDragImage): Ditto.
459 (WebCore::ClipboardWin::writeRange): Ditto.
460 * platform/win/PasteboardWin.cpp:
461 (WebCore::Pasteboard::writeSelection): Ditto.
462 (WebCore::Pasteboard::writeURL): Ditto.
464 2008-02-26 Timothy Hatcher <timothy@apple.com>
466 Reviewed by Adam Roben.
468 <rdar://problem/5712777> REGRESSION: Arrow up/down in inspector
469 source list does not scroll when item at edge is reached (16572)
471 Use scrollIntoViewIfNeeded() instead of the hand-rolled scrollToElement
472 we were using in utilities.js.
474 * page/inspector/DocumentPanel.js: Use scrollIntoViewIfNeeded instead of scrollToElement.
475 * page/inspector/Resource.js: Ditto.
476 * page/inspector/inspector.js: Ditto.
477 * page/inspector/SourcePanel.js: Use scrollIntoViewIfNeeded instead
478 of scrollIntoView, so the source line is centered in the view if needed.
479 * page/inspector/utilities.js: Removed scrollToElement().
481 2008-02-26 David Hyatt <hyatt@apple.com>
485 http://bugs.webkit.org/show_bug.cgi?id=17485
487 Refine our behavior for empty inlines so that they work more correctly with margins/borders/padding.
488 Fixes a regression on huffingtonpost.com.
490 New tests added to fast/inline
492 * rendering/InlineFlowBox.cpp:
493 (WebCore::InlineFlowBox::computeLogicalBoxHeights):
494 (WebCore::InlineFlowBox::placeBoxesVertically):
495 (WebCore::InlineFlowBox::shrinkBoxesWithNoTextChildren):
496 * rendering/RenderFlow.cpp:
497 (WebCore::RenderFlow::calcMargins):
498 * rendering/RenderFlow.h:
499 * rendering/RenderObject.h:
500 (WebCore::RenderObject::hasHorizontalBordersPaddingOrMargin):
501 (WebCore::RenderObject::hasHorizontalBordersOrPadding):
502 * rendering/bidi.cpp:
503 (WebCore::getBorderPaddingMargin):
504 (WebCore::RenderBlock::layoutInlineChildren):
505 (WebCore::inlineFlowRequiresLineBox):
507 2008-02-26 Sam Weinig <sam@webkit.org>
511 * platform/text/PlatformString.h:
512 (WebCore::reverseFind):
514 2008-02-26 Dan Bernstein <mitz@apple.com>
516 Reviewed by Darin Adler.
518 - fix http://bugs.webkit.org/show_bug.cgi?id=17555
519 <rdar://problem/5766016> REGRESSION (r27351): Thumbnails positioned wrong on Getty Images results page
521 Test: fast/dynamic/subtree-table-cell-height.html
523 * rendering/RenderObject.cpp:
524 (WebCore::objectIsRelayoutBoundary): Exclude table cells, since their
525 height depends on their contents even if the CSS height property is
528 2008-02-25 Sam Weinig <sam@webkit.org>
530 Reviewed by Dan Bernstein.
532 Make the cleanPath function in CSSStyleSelector more efficient by using
535 * css/CSSStyleSelector.cpp:
536 (WebCore::cleanPath): Make this function work on a Vector<UChar> instead
537 of a String. Also remove unnecessary reverseFind call that could be acomplished
539 (WebCore::checkPseudoState): Remove reserveCapacity calls now that we are using
541 * platform/text/PlatformString.h:
542 (WebCore::find): Make this find generic enough that it can be used for
544 (WebCore::reverseFind): Implement reverseFind so that it can be used
545 for with a UChar* and length.
546 * platform/text/StringImpl.cpp:
547 (WebCore::StringImpl::find): Use implementation in PlatformString.cpp
548 (WebCore::StringImpl::reverseFind): Ditto,
550 2008-02-26 Satoshi Nakagawa <artension@gmail.com>
552 Reviewed by Darin. Tweaked and landed by Alexey.
554 http://bugs.webkit.org/show_bug.cgi?id=17411
555 Ideographic comma and full stop should be treated as line-breakable characters
557 Test: fast/text/line-breaks-after-ideographic-comma-or-full-stop.html
559 * platform/text/CharacterNames.h: Added ideographicComma and ideographicFullStop.
560 * rendering/break_lines.cpp: (WebCore::shouldBreakAfter): Added a workaround for an issue in
561 Unicode 5.0 that is causing this.
563 2008-02-26 MorganL <morganl.webkit@yahoo.com>
565 Reviewed by eseidel. Landed by eseidel
567 Fix improperly initialized m_isUpToDate member variable.
568 Fixs 50+ layout tests when run on Tiger.
569 http://bugs.webkit.org/show_bug.cgi?id=17549
571 * platform/network/cf/ResourceResponse.h:
572 (WebCore::ResourceResponse::ResourceResponse):
573 * platform/network/mac/ResourceResponse.h:
574 (WebCore::ResourceResponse::ResourceResponse):
576 2008-02-25 Dan Bernstein <mitz@apple.com>
578 Reviewed by Sam Weinig.
580 - fix http://bugs.webkit.org/show_bug.cgi?id=17152
581 Paragraphs indented with :first-letter and text-align CSS render incorrectly
583 Test: fast/text/apply-start-width-after-skipped-text.html
585 * rendering/bidi.cpp:
586 (WebCore::RenderBlock::findNextLineBreak): Improved the logic for when
587 to figure in the padding, border and margin before a text node when the
588 line begins inside a text node.
590 2008-02-25 Kevin Ollivier <kevino@theolliviers.com>
592 Windows build fix for wx port.
594 * loader/FTPDirectoryDocument.cpp:
596 2008-02-25 Mark Rowe <mrowe@apple.com>
600 * platform/network/cf/ResourceResponseCFNet.cpp:
601 (WebCore::ResourceResponse::platformCompare): Implement platformCompare for ResourceResponseCFNet.cpp.
603 2008-02-25 Beth Dakin <bdakin@apple.com>
607 Fixed for <rdar://problem/5760530> REGRESSION: Assertion failure in
608 Document::removePendingSheet() from r30438
610 r30438 added a call to CachedResource::error() from inside
611 Loader::didReceiveData() if a CSS file 4xxs. There was an
612 assumption in the loader, though, that either error() would be
613 called, or didFinishLoading() would be called, so some work is
614 duplicated in each. Now that we are calling an error() on files
615 that will also make it to didFinishLoading() (since they succeeded
616 in the network layer), we need to make sure we do not duplicate the
617 work. CachedCSSStyleSheet::error() calls checkNotify, which ends up
618 decrementing the document's pending style sheet counter.
619 checkNotify() was still getting called, though, through the normal
620 didFinishLoading code path, and the counter was being decremented
624 (WebCore::Loader::didFinishLoading):
625 (WebCore::Loader::didReceiveData):
627 2008-02-25 Mark Rowe <mrowe@apple.com>
629 Fix the Gtk, wx and Qt builds.
631 * GNUmakefile.am: Add new files.
632 * WebCore.pro: Ditto.
633 * WebCoreSources.bkl: Ditto.
634 * platform/network/AuthenticationChallengeBase.h: Fix up argument types.
636 2008-02-25 MorganL <morganl.webkit@yahoo.com>
638 Reviewed by Darin Adler.
640 Eliminate some #ifdefs from headers in platform/network.
641 http://bugs.webkit.org/show_bug.cgi?id=17210
645 * WebCore.vcproj/WebCore.vcproj:
646 * WebCore.xcodeproj/project.pbxproj:
647 * dom/XMLTokenizer.cpp:
648 * loader/ResourceLoader.h:
649 * platform/network/AuthenticationChallenge.cpp: Removed.
650 * platform/network/AuthenticationChallenge.h: Removed.
651 * platform/network/AuthenticationChallengeBase.cpp: Copied from platform/network/AuthenticationChallenge.cpp.
652 (WebCore::AuthenticationChallengeBase::AuthenticationChallengeBase):
653 (WebCore::AuthenticationChallengeBase::previousFailureCount):
654 (WebCore::AuthenticationChallengeBase::proposedCredential):
655 (WebCore::AuthenticationChallengeBase::protectionSpace):
656 (WebCore::AuthenticationChallengeBase::failureResponse):
657 (WebCore::AuthenticationChallengeBase::error):
658 (WebCore::AuthenticationChallengeBase::isNull):
659 (WebCore::AuthenticationChallengeBase::nullify):
660 (WebCore::AuthenticationChallengeBase::compare):
661 * platform/network/AuthenticationChallengeBase.h: Copied from platform/network/AuthenticationChallenge.h.
662 (WebCore::AuthenticationChallengeBase::platformCompare):
663 (WebCore::operator==):
664 (WebCore::operator!=):
665 * platform/network/ResourceError.cpp: Removed.
666 * platform/network/ResourceError.h: Removed.
667 * platform/network/ResourceErrorBase.cpp: Copied from platform/network/ResourceError.cpp.
668 (WebCore::ResourceErrorBase::lazyInit):
669 (WebCore::ResourceErrorBase::compare):
670 * platform/network/ResourceErrorBase.h: Copied from platform/network/ResourceError.h.
671 (WebCore::ResourceErrorBase::isNull):
672 (WebCore::ResourceErrorBase::domain):
673 (WebCore::ResourceErrorBase::errorCode):
674 (WebCore::ResourceErrorBase::failingURL):
675 (WebCore::ResourceErrorBase::localizedDescription):
676 (WebCore::ResourceErrorBase::ResourceErrorBase):
677 (WebCore::ResourceErrorBase::platformLazyInit):
678 (WebCore::ResourceErrorBase::platformCompare):
679 (WebCore::operator==):
680 * platform/network/ResourceResponseBase.cpp:
681 (WebCore::ResourceResponseBase::isHTTP):
682 (WebCore::ResourceResponseBase::url):
683 (WebCore::ResourceResponseBase::setUrl):
684 (WebCore::ResourceResponseBase::mimeType):
685 (WebCore::ResourceResponseBase::setMimeType):
686 (WebCore::ResourceResponseBase::expectedContentLength):
687 (WebCore::ResourceResponseBase::setExpectedContentLength):
688 (WebCore::ResourceResponseBase::textEncodingName):
689 (WebCore::ResourceResponseBase::setTextEncodingName):
690 (WebCore::ResourceResponseBase::suggestedFilename):
691 (WebCore::ResourceResponseBase::setSuggestedFilename):
692 (WebCore::ResourceResponseBase::httpStatusCode):
693 (WebCore::ResourceResponseBase::setHTTPStatusCode):
694 (WebCore::ResourceResponseBase::httpStatusText):
695 (WebCore::ResourceResponseBase::setHTTPStatusText):
696 (WebCore::ResourceResponseBase::httpHeaderField):
697 (WebCore::ResourceResponseBase::setHTTPHeaderField):
698 (WebCore::ResourceResponseBase::httpHeaderFields):
699 (WebCore::ResourceResponseBase::isAttachment):
700 (WebCore::ResourceResponseBase::setExpirationDate):
701 (WebCore::ResourceResponseBase::expirationDate):
702 (WebCore::ResourceResponseBase::setLastModifiedDate):
703 (WebCore::ResourceResponseBase::lastModifiedDate):
704 (WebCore::ResourceResponseBase::lazyInit):
705 (WebCore::ResourceResponseBase::compare):
706 * platform/network/ResourceResponseBase.h:
707 (WebCore::ResourceResponseBase::ResourceResponseBase):
708 (WebCore::ResourceResponseBase::platformLazyInit):
709 (WebCore::ResourceResponseBase::platformCompare):
710 (WebCore::operator==):
711 * platform/network/cf/AuthenticationCF.cpp:
712 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
713 (WebCore::AuthenticationChallenge::platformCompare):
714 * platform/network/cf/AuthenticationChallenge.h: Added.
715 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
716 (WebCore::AuthenticationChallenge::sourceHandle):
717 (WebCore::AuthenticationChallenge::cfURLAuthChallengeRef):
718 * platform/network/cf/ResourceError.h: Added.
719 (WebCore::ResourceError::ResourceError):
720 * platform/network/cf/ResourceErrorCF.cpp:
721 (WebCore::ResourceError::ResourceError):
722 (WebCore::ResourceError::platformLazyInit):
723 (WebCore::ResourceError::platformCompare):
724 (WebCore::ResourceError::operator CFStreamError):
725 * platform/network/cf/ResourceResponse.h:
726 (WebCore::ResourceResponse::ResourceResponse):
727 * platform/network/cf/ResourceResponseCFNet.cpp:
728 (WebCore::ResourceResponse::platformLazyInit):
729 * platform/network/curl/AuthenticationChallenge.h: Added.
730 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
731 * platform/network/curl/ResourceError.h: Added.
732 (WebCore::ResourceError::ResourceError):
733 * platform/network/curl/ResourceResponse.h:
734 (WebCore::ResourceResponse::ResourceResponse):
735 * platform/network/mac/AuthenticationChallenge.h: Added.
736 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
737 (WebCore::AuthenticationChallenge::sender):
738 (WebCore::AuthenticationChallenge::nsURLAuthenticationChallenge):
739 * platform/network/mac/AuthenticationMac.mm:
740 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
741 (WebCore::AuthenticationChallenge::platformCompare):
742 * platform/network/mac/ResourceError.h: Added.
743 (WebCore::ResourceError::ResourceError):
744 * platform/network/mac/ResourceErrorMac.mm:
745 (WebCore::ResourceError::platformLazyInit):
746 (WebCore::ResourceError::platformCompare):
747 * platform/network/mac/ResourceResponse.h:
748 (WebCore::ResourceResponse::ResourceResponse):
749 * platform/network/mac/ResourceResponseMac.mm:
750 (WebCore::ResourceResponse::platformLazyInit):
751 (WebCore::ResourceResponse::platformCompare):
752 * platform/network/qt/AuthenticationChallenge.h: Added.
753 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
754 * platform/network/qt/ResourceError.h: Added.
755 (WebCore::ResourceError::ResourceError):
756 * platform/network/qt/ResourceResponse.h:
757 (WebCore::ResourceResponse::ResourceResponse):
758 * xml/XSLTProcessor.cpp:
760 2008-02-25 Anders Carlsson <andersca@apple.com>
764 Move remaining render style objects over to start with a refcount of 1 and get
765 rid of DeprecatedDataRef.
767 * rendering/DataRef.h:
768 (WebCore::DataRef::operator*):
769 (WebCore::DataRef::operator->):
770 * rendering/RenderStyle.h:
771 * rendering/SVGRenderStyle.cpp:
772 (WebCore::SVGRenderStyle::SVGRenderStyle):
773 * rendering/SVGRenderStyle.h:
774 (WebCore::SVGRenderStyle::create):
775 (WebCore::SVGRenderStyle::copy):
776 * rendering/SVGRenderStyleDefs.cpp:
777 (StyleFillData::StyleFillData):
778 (StyleStrokeData::StyleStrokeData):
779 (StyleStopData::StyleStopData):
780 (StyleTextData::StyleTextData):
781 (StyleClipData::StyleClipData):
782 (StyleMaskData::StyleMaskData):
783 (StyleMarkerData::StyleMarkerData):
784 (StyleMiscData::StyleMiscData):
785 * rendering/SVGRenderStyleDefs.h:
786 (WebCore::StyleFillData::create):
787 (WebCore::StyleFillData::copy):
788 (WebCore::StyleStrokeData::create):
789 (WebCore::StyleStrokeData::copy):
790 (WebCore::StyleStopData::create):
791 (WebCore::StyleStopData::copy):
792 (WebCore::StyleTextData::create):
793 (WebCore::StyleTextData::copy):
794 (WebCore::StyleClipData::create):
795 (WebCore::StyleClipData::copy):
796 (WebCore::StyleMaskData::create):
797 (WebCore::StyleMaskData::copy):
798 (WebCore::StyleMarkerData::create):
799 (WebCore::StyleMarkerData::copy):
800 (WebCore::StyleMiscData::create):
801 (WebCore::StyleMiscData::copy):
803 2008-02-25 Dan Bernstein <mitz@apple.com>
805 Reviewed by Dave Hyatt.
807 - remove file-static BidiRun variables from bidi.cpp
809 * platform/text/BidiResolver.h:
810 (WebCore::BidiResolver::): Initialize m_logicallyLastRun.
811 (WebCore::BidiResolver::logicallyLastRun): Added.
812 (WebCore::BidiResolver::runCount): Made unsigned.
813 (WebCore::::reverseRuns): Changed ints to unsigned.
814 (WebCore::::createBidiRunsForLine): Made this function set
816 * rendering/RenderBlock.h:
817 * rendering/bidi.cpp:
818 (WebCore::BidiState::addRun): Removed setting of sLogicallyLastBidiRun.
819 (WebCore::RenderBlock::constructLine): Removed unused start parameter
820 and added run count and first and last run parameters. Replaced end
821 parameter with lastLine boolean and endObject pointer.
822 (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added first
823 and logically last run parameters.
824 (WebCore::RenderBlock::computeVerticalPositionsForLine): Added firstRun
826 (WebCore::RenderBlock::bidiReorderLine): Removed setting of static
828 (WebCore::RenderBlock::layoutInlineChildren): Changed to use BidiState
829 accessors instead of file statics.
831 2008-02-25 Rodney Dawes <dobey@wayofthemonkey.com>
833 Reviewed by Jon Honeycutt.
835 http://bugs.webkit.org/show_bug.cgi?id=16924
836 Bug 16924: Shared PluginDatabase, PluginPackage, and PlugInInfoStore implementations
838 Add PluginInfoStore.cpp and new PluginDatabase.cpp to GTK+ and Qt ports.
839 Remove old PlugInInfoStoreQt.cpp as it is obsoleted by shared code.
840 Add PluginInfoStore, PluginDatabase, and PluginStream files to Wx build.
841 Add new PluginDatabase.cpp to Windows build.
842 Add temporary stubs for new PluginDatabase and PluginPackage.
843 shared classes to GTK+, Qt, and Wx ports.
844 Copy PluginDatabaseWin.cpp to PluginDatabase.cpp to preserve history.
845 Remove shared code from PluginDatabaseWin.cpp.
846 Remove Windows-specific code from PluginDatabase.cpp.
847 Use PlatformModule and PlatformFileTime instead of HMODULE and FILETIME.
848 Remove extraneous PluginPackage:: from hash() class method prototype.
849 Subsume storeFileVersion into PluginPackage::fetchInfo.
850 Add cross-platform PlatformModuleVersion type definition.
851 Use PlatformModuleVersion to store the module version.
852 Rename m_fileVersion[ML]S to m_moduleVersion.
853 Change compareFileVersion to use PlatformModuleVersion as the argument.
854 Move PluginView::determineQuirks and m_quirks to PluginPackage.
855 Updated determineQuirks for the PlatformModuleVersion.
859 * WebCoreSources.bkl:
861 * WebCore.vcproj/WebCore.vcproj:
862 * Platform/FileSystem.h:
863 * platform/qt/PlugInInfoStoreQt.cpp:
864 * platform/gtk/TemporaryLinkStubs.cpp:
865 * platform/qt/TemporaryLinkStubs.cpp:
866 * platform/wx/TemporaryLinkStubs.cpp:
867 * plugins/PluginDatabase.cpp:
868 * plugins/PluginDatabase.h:
869 * plugins/win/PluginDatabaseWin.cpp:
870 * plugins/PluginPackage.h:
871 * plugins/win/PluginPackageWin.cpp:
872 * plugins/PluginView.h:
873 * plugins/win/PluginViewWin.cpp:
875 2008-02-25 Anders Carlsson <andersca@apple.com>
879 Make more style objects start out with a refcount of 1.
881 * rendering/RenderStyle.cpp:
882 (WebCore::StyleSurroundData::StyleSurroundData):
883 (WebCore::StyleBoxData::StyleBoxData):
884 (WebCore::StyleVisualData::StyleVisualData):
885 (WebCore::StyleBackgroundData::StyleBackgroundData):
886 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
887 (WebCore::StyleRareInheritedData::StyleRareInheritedData):
888 (WebCore::StyleInheritedData::StyleInheritedData):
889 * rendering/RenderStyle.h:
890 (WebCore::StyleSurroundData::create):
891 (WebCore::StyleSurroundData::copy):
892 (WebCore::StyleBoxData::create):
893 (WebCore::StyleBoxData::copy):
894 (WebCore::StyleVisualData::create):
895 (WebCore::StyleVisualData::copy):
896 (WebCore::StyleBackgroundData::create):
897 (WebCore::StyleBackgroundData::copy):
898 (WebCore::StyleBackgroundData::~StyleBackgroundData):
899 (WebCore::StyleRareNonInheritedData::create):
900 (WebCore::StyleRareNonInheritedData::copy):
901 (WebCore::StyleRareInheritedData::create):
902 (WebCore::StyleRareInheritedData::copy):
903 (WebCore::StyleInheritedData::create):
904 (WebCore::StyleInheritedData::copy):
906 2008-02-25 Anders Carlsson <andersca@apple.com>
910 Make some of the refcounted style objects start out with a refcount of 1.
912 * rendering/DataRef.h:
913 Make a DeprecatedDataRef class which is just a copy of the old DataRef class.
914 Change DataRef to use ::create() and ::copy() instead of the constructors.
915 Change DataRef's pointer to be a RefPtr instead.
917 * rendering/RenderStyle.cpp:
918 (WebCore::StyleMarqueeData::StyleMarqueeData):
919 (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
920 (WebCore::StyleMultiColData::StyleMultiColData):
921 (WebCore::StyleTransformData::StyleTransformData):
922 Start with a RefCount of 1.
924 * rendering/RenderStyle.h:
925 * rendering/SVGRenderStyle.h:
926 Add ::create() and ::copy() methods. Make not yet converted classes use DeprecatedDataRef.
928 2008-02-25 Darin Adler <darin@apple.com>
931 Based on a patch by Tim Steele <timsteele41@gmail.com>.
933 - fix http://bugs.webkit.org/show_bug.cgi?id=17186
934 Fragment navigation within a page permanently cancels meta refresh
936 Test: fast/loader/meta-refresh-anchor-click.html
938 * loader/FrameLoader.cpp:
939 (WebCore::FrameLoader::load): When load type is FrameLoadTypeRedirectWithLockedHistory,
940 always do a real load. This makes sure that meta refresh loads are treated as real loads
941 rather than anchor scrolls. Also tweaked formatting a bit.
942 (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): This function is
943 an alternate way to complete a load, so it needs to start the redirection timer if
944 redirection has already been scheduled.
946 2008-02-25 Dan Bernstein <mitz@apple.com>
948 Reviewed by Darin Adler.
950 - avoid counting spaces in non-justified text
952 * rendering/bidi.cpp:
953 Removed file-static numSpaces.
954 (WebCore::BidiState::addRun): Removed space counting.
955 (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added space
956 counting, conditional on the block having the text-align: justify
958 (WebCore::RenderBlock::bidiReorderLine): Removed initialization of
961 2008-02-25 Darin Adler <darin@apple.com>
965 * platform/graphics/cg/ImageSourceCG.cpp:
966 (WebCore::ImageSource::createFrameAtIndex): Put the string into a global
967 variable (because CFSTR is inefficient on Windows).
969 2008-02-25 Darin Adler <darin@apple.com>
973 * WebCore.base.exp: Export blankURL, and sort the file.
975 2008-02-25 Simon Hausmann <hausmann@webkit.org>
977 Reviewed by Mark Rowe.
979 Fix compilation with gcc 4.3, added stdio.h and unistd.h inclusions.
983 * editing/Selection.cpp:
984 * editing/SelectionController.cpp:
985 * editing/VisiblePosition.cpp:
986 * history/HistoryItem.cpp:
988 * loader/FTPDirectoryParser.cpp:
990 * platform/gtk/FileSystemGtk.cpp:
991 * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
992 * platform/text/TextCodecLatin1.cpp:
993 * platform/text/TextCodecUserDefined.cpp:
994 * rendering/CounterNode.cpp:
995 * rendering/RenderObject.cpp:
997 2008-02-25 Johnny Ding <johnnyding.webkit@gmail.com>
999 Reviewed by Darin Adler.
1001 - fix http://bugs.webkit.org/show_bug.cgi?id=17444
1003 In HTMLTokenizer::write, the code checks 'pendingScripts.isEmpty()' to decide
1004 whether to save prependingSrc or not. However, in HTMLTokenizer::scriptHandler
1005 and HTMLTokenizer::scriptExecution, the code checks testBit:LoadingExtScript
1006 to decide whether to save prependingSrc or not. The later behavior is not right
1007 because, in scriptHandler and scriptExecution, even the pendingScripts queue is
1008 empty, the testBit:LoadingExtScript might be TRUE.
1010 Test: fast/tokenizer/nested-multiple-scripts.html
1012 * html/HTMLTokenizer.cpp:
1013 (WebCore::HTMLTokenizer::scriptHandler): check pendingScripts.isEmpty() instead of
1014 checking state.loadingExtScript().
1015 (WebCore::HTMLTokenizer::scriptExecution): check pendingScripts.isEmpty() instead of
1016 checking state.loadingExtScript().
1018 2008-02-24 Darin Adler <darin@apple.com>
1020 * dom/Document.h: Removed stray duplicate declaration of
1021 RegisteredEventListenerList.
1023 2008-02-24 Darin Adler <darin@apple.com>
1026 (WebCore::Range::surroundContents): Removed incorrect comment.
1027 I added it a while ago, and I was just mixed up.
1029 2008-02-24 Darin Adler <darin@apple.com>
1031 - quick follow-up to that last check-in
1033 * platform/graphics/cg/ImageSourceCG.cpp:
1034 (WebCore::ImageSource::createFrameAtIndex): Use CFEqual instead of
1035 WebCore::String's == for speed.
1037 2008-02-24 Michael Knaup <michael.knaup@mac.com>
1041 Bug 8749: XBM rendered incorrectly as black on white
1043 xbm images are now created and rendered using black on a
1044 transparent background (same behavior as in Firefox)
1046 Test: platform/mac/fast/canvas/canvas-draw-xbm-image.html
1048 * platform/graphics/cg/ImageSourceCG.cpp:
1049 (WebCore::ImageSource::createFrameAtIndex):
1051 2008-02-24 Dan Bernstein <mitz@apple.com>
1053 Reviewed by Darin Adler.
1055 - fix http://bugs.webkit.org/show_bug.cgi?id=17471
1056 REGRESSION (r30438): Crash in deleteLineBoxes in cursor-adjusting code browsing Acid3
1058 Test: http/tests/misc/object-image-error.html
1060 * html/HTMLObjectElement.cpp:
1061 (WebCore::HTMLObjectElement::attach): Added an early return in case
1062 updateFromElement() has changed the object to use fallback content.
1064 2008-02-24 Dan Bernstein <mitz@apple.com>
1066 Reviewed by Darin Adler.
1068 - fix float positioning when a float that does not fit on the line is
1069 followed by a float that does
1071 Test: fast/block/float/narrow-after-wide.html
1073 * rendering/bidi.cpp:
1074 (WebCore::RenderBlock::findNextLineBreak): Changed to not position any
1075 more floats on the line once a float that does not fit is encountered.
1076 That float should be pushed to the next line, and so should all floats
1077 that follow, regardless of whether they can fit on the current line.
1079 2008-02-24 Darin Adler <darin@apple.com>
1083 - fix http://bugs.webkit.org/show_bug.cgi?id=16770
1084 Acid3 expects :visited styled links to restyle on iframe load
1086 Disentangle global history updating from the back/forward history.
1087 There are many cases where we don't want to create a new back/forward
1088 item, but we do still want to add to the global history (used for visited
1089 link coloring) in those cases.
1091 Test: fast/history/subframe-is-visited.html
1093 * loader/FrameLoader.cpp:
1094 (WebCore::FrameLoader::updateGlobalHistory): Renamed from
1095 addHistoryForCurrentLocation and removed the back/forward handling.
1096 (WebCore::FrameLoader::updateHistoryForStandardLoad): Streamlined logic a
1097 bit. Replaced call to addHistoryForCurrentLocation with a call to
1098 addBackForwardItemClippedAtTarget. Added an unconditional call to
1099 updateGlobalHistory.
1100 (WebCore::FrameLoader::updateHistoryForClientRedirect): Added a FIXME;
1101 why doesn't this function update global history?
1102 (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Ditto.
1103 (WebCore::FrameLoader::updateHistoryForReload): Replaced the direct call
1104 the client with a call to the new updateGlobalHistory function.
1105 (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Did
1106 the same changes as for updateHistoryForStandardLoad.
1107 * loader/FrameLoader.h: More of the same.
1109 * loader/FrameLoaderClient.h: Removed updateGlobalHistoryForReload and
1110 renamed updateGlobalHistoryForStandardLoad to updateGlobalHistory.
1112 * svg/graphics/SVGImageEmptyClients.h:
1113 (WebCore::SVGEmptyFrameLoaderClient::updateGlobalHistory): Updated to
1116 2008-02-23 Darin Adler <darin@apple.com>
1120 - fix http://bugs.webkit.org/show_bug.cgi?id=17508
1121 REGRESSION (r30535): mailto regression tests failing
1123 * html/HTMLFormElement.cpp:
1124 (WebCore::HTMLFormElement::submit): Restore the old logic, with its unpleasant
1125 trip through String do to the replace operation. It's inefficient, but there's
1126 no real reason to worry about the efficiency of mailto forms, since that feature
1129 2008-02-23 Darin Adler <darin@apple.com>
1133 - replace SegmentedString's use of DeprecatedValueList with Deque
1135 Testing indicates this is a slight speed-up for page loading.
1137 * platform/text/SegmentedString.cpp:
1138 (WebCore::SegmentedString::length): Update to use Deque.
1139 (WebCore::SegmentedString::setExcludeLineNumbers): Ditto.
1140 (WebCore::SegmentedString::append): Ditto.
1141 (WebCore::SegmentedString::prepend): Ditto.
1142 (WebCore::SegmentedString::advanceSubstring): Ditto.
1143 (WebCore::SegmentedString::toString): Ditto.
1144 * platform/text/SegmentedString.h: Tweak formatting. Don't bother making an entire
1145 class private with a single friend. Change m_sbstrings from a DeprecatedValueList
1148 2008-02-23 Darin Adler <darin@apple.com>
1152 - fix http://bugs.webkit.org/show_bug.cgi?id=17506
1153 REGRESSION (r30535): ASSERTION FAILED: i < size()
1155 * loader/TextResourceDecoder.cpp:
1156 (WebCore::findTextEncoding): Fix off-by-one in code that null-terminates
1159 2008-02-23 Matt Lilek <webkit@mattlilek.com>
1161 Not reviewed, build fix.
1163 * platform/network/cf/FormDataStreamCFNet.cpp:
1164 (WebCore::httpBodyFromRequest):
1165 * plugins/win/PluginViewWin.cpp:
1166 (WebCore::PluginView::handlePost):
1168 2008-02-23 Dan Bernstein <mitz@apple.com>
1172 * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
1173 (WebCore::GlyphPage::fill):
1174 * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
1175 (WebCore::GlyphPage::fill):
1177 2008-02-23 Dan Bernstein <mitz@apple.com>
1179 Reviewed by Anders Carlsson.
1181 - fix GlyphPage::fill() logic for partial page fills
1183 * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
1184 (WebCore::GlyphPage::fill): Changed the test for non-BMP characters to
1185 work correctly when the length parameter is less than a full page size.
1186 Also updated the comment.
1187 * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
1188 (WebCore::GlyphPage::fill): Ditto.
1190 2008-02-23 Kevin Ollivier <kevino@theolliviers.com>
1192 Reviewed by Darin Adler.
1194 Move text drawing into wxcode, as we need platform-dependent
1195 APIs for drawing non-kerned text, which wx doesn't yet have.
1196 (But hopefully will, once these APIs are fleshed out on all
1199 http://bugs.webkit.org/show_bug.cgi?id=17396
1201 * platform/graphics/wx/FontWx.cpp:
1202 (WebCore::Font::drawGlyphs):
1203 * platform/wx/wxcode/gtk/non-kerned-drawing.cpp: Added.
1204 * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp: Added.
1205 * platform/wx/wxcode/non-kerned-drawing.h: Added.
1206 * platform/wx/wxcode/win/non-kerned-drawing.cpp: Added.
1209 2008-02-23 Darin Adler <darin@apple.com>
1211 Pointed out by Mitz.
1213 * loader/TextResourceDecoder.cpp:
1214 (WebCore::find): Fix a "==" that was supposed to be ">".
1215 (WebCore::findIgnoringCase): Ditto.
1217 2008-02-23 Darin Adler <darin@apple.com>
1221 * html/HTMLFormElement.cpp:
1222 (WebCore::appendEncodedString): Fix buffer overrun in the code I just landed.
1224 2008-02-23 Darin Adler <darin@apple.com>
1228 - remove all but 1 remaining use of DeprecatedCString
1229 - change FormData to start refcount at 1
1231 * html/HTMLFormElement.cpp:
1232 (WebCore::appendString): Added. Helpers for Vector<char>.
1233 (WebCore::appendEncodedString): Renamed from encodeCString and changed to
1234 append to an existing Vector<char> to cut down a bit on memory allocation.
1235 (WebCore::HTMLFormElement::formData): Replace the DeprecatedCString called
1236 enc_string with a Vector<char> called encodedData. Change to use the new
1237 FormData::create function.
1238 (WebCore::HTMLFormElement::submit): Same thing, for the mailto form code.
1240 * loader/TextResourceDecoder.cpp:
1241 (WebCore::find): Added. Helper for searching in char* with length.
1242 (WebCore::findIgnoringCase): Ditto.
1243 (WebCore::findTextEncoding): Added. Helper for looking up a text encoding
1244 when we have a char* with length rather than a null-terminated char*.
1245 (WebCore::findXMLEncoding): Changed to use char* and length rather than
1246 DeprecatedCString. Also fixed some things that would be one-character
1247 buffer overruns in a string that's not null-terminated.
1248 (WebCore::TextResourceDecoder::checkForCSSCharset): Change to use
1249 findTextEncoding rather than constructing a CString to pass to the
1250 TextEncodingconstructor.
1251 (WebCore::TextResourceDecoder::checkForHeadCharset): Ditto.
1253 * platform/network/FormData.cpp:
1254 (WebCore::FormData::FormData): Changed to start refcount at 1.
1255 (WebCore::FormData::create): Added.
1256 (WebCore::FormData::copy): Call adoptRef since refcount starts at 1.
1257 * platform/network/FormData.h: Made constructor private. Added create functions.
1259 * platform/network/mac/ResourceRequestMac.mm:
1260 (WebCore::ResourceRequest::doUpdateResourceRequest): Call FormData::create.
1261 * xml/XMLHttpRequest.cpp:
1262 (WebCore::XMLHttpRequest::send): Ditto.
1264 2008-02-23 Darin Adler <darin@apple.com>
1268 - http://bugs.webkit.org/show_bug.cgi?id=17067
1269 eliminate attributes parameter from JSObject::put for speed/clarity
1271 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1272 (WebCore::JSCSSStyleDeclaration::customPut): Remove attributes argument.
1274 * bindings/js/JSCanvasPixelArrayCustom.cpp:
1275 (WebCore::JSCanvasPixelArray::indexGetter): Use early exit idiom.
1276 (WebCore::JSCanvasPixelArray::indexSetter): Moved length check into the
1277 CanvasPixelArray object, for consistency with the getter. Removed attributes
1280 * bindings/js/JSDOMWindowCustom.cpp:
1281 (WebCore::JSDOMWindow::customPut): Removed special case for variable
1282 initialization, which is not needed since that does use put any more.
1283 Removed attributes argument.
1285 * bindings/js/JSEventTargetBase.h:
1286 (WebCore::JSEventTargetBase::putValueProperty): Removed attributes argument.
1287 (WebCore::JSEventTargetBase::put): Ditto.
1288 (WebCore::JSEventTargetPrototype::self): Removed Internal flag.
1289 * bindings/js/JSEventTargetNode.cpp:
1290 (WebCore::JSEventTargetNode::put): Removed attributes argument.
1291 (WebCore::JSEventTargetNode::putValueProperty): Ditto.
1292 * bindings/js/JSEventTargetNode.h: Ditto.
1293 * bindings/js/JSHTMLAppletElementCustom.cpp:
1294 (WebCore::JSHTMLAppletElement::customPut): Ditto.
1295 * bindings/js/JSHTMLEmbedElementCustom.cpp:
1296 (WebCore::JSHTMLEmbedElement::customPut): Ditto.
1297 * bindings/js/JSHTMLInputElementBase.cpp:
1298 (WebCore::JSHTMLInputElementBase::put): Ditto.
1299 (WebCore::JSHTMLInputElementBase::putValueProperty): Ditto.
1300 * bindings/js/JSHTMLInputElementBase.h: Ditto.
1301 * bindings/js/JSHTMLObjectElementCustom.cpp:
1302 (WebCore::JSHTMLObjectElement::customPut): Ditto.
1303 * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1304 (WebCore::JSHTMLOptionsCollection::indexSetter): Ditto.
1305 * bindings/js/JSHTMLSelectElementCustom.cpp:
1306 (WebCore::JSHTMLSelectElement::indexSetter): Ditto.
1307 * bindings/js/JSHistoryCustom.cpp:
1308 (WebCore::JSHistory::customPut): Ditto.
1309 * bindings/js/JSLocation.cpp:
1310 (WebCore::JSLocation::put): Ditto.
1311 * bindings/js/JSLocation.h: Ditto.
1312 * bindings/js/JSXMLHttpRequest.cpp:
1313 (WebCore::JSXMLHttpRequest::put): Ditto.
1314 (WebCore::JSXMLHttpRequest::putValueProperty): Ditto.
1315 * bindings/js/JSXMLHttpRequest.h: Ditto.
1317 * bindings/js/kjs_dom.cpp:
1318 (WebCore::getRuntimeObject): Changed return type to JSObject*.
1319 * bindings/js/kjs_dom.h: Ditto.
1321 * bindings/js/kjs_events.cpp:
1322 (WebCore::JSClipboard::put): Removed attributes argument.
1323 (WebCore::JSClipboard::putValueProperty): Ditto.
1324 * bindings/js/kjs_events.h: Ditto.
1326 * bindings/js/kjs_html.cpp:
1327 (WebCore::runtimeObjectGetter): Updated for change to getRuntimeObject to
1328 return a JSObject. Used early exit idiom.
1329 (WebCore::runtimeObjectPropertyGetter): Ditto.
1330 (WebCore::runtimeObjectCustomGetOwnPropertySlot): Ditto.
1331 (WebCore::runtimeObjectCustomPut): Use hasProperty to check for properties
1332 that we should put with the property syntax instead of canPut.
1333 (WebCore::runtimeObjectImplementsCall): Ditto.
1334 (WebCore::runtimeObjectCallAsFunction): Ditto.
1335 * bindings/js/kjs_html.h: Removed attributes argument to runtimeObjectCustomPut.
1337 * bindings/js/kjs_window.cpp:
1338 (KJS::Window::put): Removed attributes argument.
1339 * bindings/js/kjs_window.h: Ditto.
1341 * bindings/scripts/CodeGeneratorJS.pm: Removed attributes argument from put,
1342 putValueProperty, customPut, and indexSetter.
1344 * html/CanvasPixelArray.h:
1345 (WebCore::CanvasPixelArray::set): Added index checking here, as in the get
1346 function. Before, the checking was done in the JavaScript bindings for set.
1348 2008-02-23 Brent Fulgham <bfulgham@gmail.com>
1350 Reviewed by Adam and Darin.
1352 http://bugs.webkit.org/show_bug.cgi?id=17442
1353 Correct the Windows Cairo implementation of GraphicsContext so
1354 that Windows 'WorldTransform' is kept in sync with the Cairo
1357 Also corrects an uninitialized variable in the Cairo Windows
1360 WARNING: NO TEST CASES ADDED OR CHANGED
1362 * platform/graphics/cairo/GraphicsContextCairo.cpp: Modify
1363 methods to call GraphicsContextPlatformPrivate calls, just
1364 as is done for the CoreGraphics version. These calls are
1365 nop's for everything but Windows.
1366 (WebCore::GraphicsContext::savePlatformState):
1367 (WebCore::GraphicsContext::restorePlatformState):
1368 (WebCore::GraphicsContext::clip):
1369 (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
1370 (WebCore::GraphicsContext::translate):
1371 (WebCore::GraphicsContext::concatCTM): Re-enable for Windows
1372 (WebCore::GraphicsContext::beginTransparencyLayer):
1373 (WebCore::GraphicsContext::endTransparencyLayer):
1374 (WebCore::GraphicsContext::rotate):
1375 (WebCore::GraphicsContext::scale):
1376 * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1377 * platform/graphics/win/GraphicsContextCGWin.cpp: Move common
1378 code for handling WorldTransform calls to parent class.
1379 * platform/graphics/win/GraphicsContextCairoWin.cpp: Add common
1380 code for handling WorldTransform calls.
1381 (WebCore::GraphicsContextPlatformPrivate::concatCTM): Change
1382 implementation so that it only handles WorldTransform. The
1383 Cairo update is done in GraphicsContextCairo.cpp
1384 * platform/graphics/win/GraphicsContextWin.cpp: Call platform-private
1385 methods to keep WorldTransform in sync.
1386 (WebCore::GraphicsContextPlatformPrivate::save):
1387 (WebCore::GraphicsContextPlatformPrivate::restore):
1388 (WebCore::GraphicsContextPlatformPrivate::clip):
1389 (WebCore::GraphicsContextPlatformPrivate::scale):
1390 (WebCore::GraphicsContextPlatformPrivate::rotate):
1391 (WebCore::GraphicsContextPlatformPrivate::translate):
1392 * platform/win/DragImageCairoWin.cpp:
1393 (WebCore::createDragImageFromImage): Correct uninitialized value
1395 2008-02-23 Dan Bernstein <mitz@apple.com>
1397 Reviewed by Dave Hyatt.
1399 - make non-autowrapping text clear floats
1401 Test: fast/text/whitespace/nowrap-clear-float.html
1403 * rendering/RenderBlock.cpp:
1404 (WebCore::RenderBlock::nextFloatBottomBelow): Renamed nearestFloat() to
1405 this and changed to avoid comparing bottom to 0 in each iteration.
1406 (WebCore::RenderBlock::getClearDelta): Updated comment for the rename.
1407 * rendering/RenderBlock.h:
1408 * rendering/bidi.cpp:
1409 (WebCore::RenderBlock::fitBelowFloats): Added. Factored out of
1410 findNextLineBreak() and simplified.
1411 (WebCore::RenderBlock::findNextLineBreak): Changed to call
1412 fitBelowFloats(). Fixed the bug by trying to fit below floats in the
1413 case of non-wrapping text. Removed some redundancy.
1415 2008-02-23 Sam Weinig <sam@webkit.org>
1417 Reviewed by Oliver Hunt.
1419 Fix for http://bugs.webkit.org/show_bug.cgi?id=17504
1420 Speed up DOM lists array subscription syntax by using the fast
1421 getOwnPropertySlot and set paths
1423 - 6x speed improvement on Oliver's ImageData put test.
1425 * bindings/scripts/CodeGeneratorJS.pm: Add fast path for getOwnPropertySlot
1426 and put when an indexGetter or indexSetter is used. We can not use the fast
1427 path if an overridingNameGetter is used as there would be no way to override.
1429 2008-02-23 Kevin Ollivier <kevino@theolliviers.com>
1431 wx build fix after JSImageData.cpp was added.
1433 * WebCoreSources.bkl:
1435 2008-02-23 Alexey Proskuryakov <ap@webkit.org>
1437 Windows build fix - move ThreadCondition implementation from WebCore to WTF.
1439 * WebCore.vcproj/WebCore.vcproj:
1440 * platform/win/ThreadConditionWin.cpp: Removed.
1442 2008-02-23 Alexey Proskuryakov <ap@webkit.org>
1446 Move basic threading support from WebCore to WTF.
1448 One call that remains in WebCore is callOnMainThread(), and it has its own header now.
1450 * ForwardingHeaders/wtf/Locker.h: Added.
1451 * ForwardingHeaders/wtf/MessageQueue.h: Added.
1452 * ForwardingHeaders/wtf/Threading.h: Added.
1455 * WebCore.vcproj/WebCore.vcproj:
1456 * WebCore.xcodeproj/project.pbxproj:
1457 * WebCoreSources.bkl:
1458 * bindings/js/JSCustomSQLTransactionCallback.cpp:
1459 * dom/XMLTokenizer.cpp:
1460 * loader/icon/IconDatabase.cpp:
1461 (WebCore::iconDatabase):
1462 * loader/icon/IconDatabase.h:
1463 * platform/Locker.h: Removed.
1464 * platform/MainThread.h: Copied from WebCore/platform/Threading.h.
1465 (WebCore::initializeThreadingAndMainThread):
1466 * platform/MessageQueue.h: Removed.
1467 * platform/SecurityOrigin.h:
1468 * platform/Threading.h: Removed.
1469 * platform/ThreadingNone.cpp: Removed.
1470 * platform/gtk/MainThreadGtk.cpp: Copied from WebCore/platform/gtk/ThreadingGtk.cpp.
1471 * platform/gtk/ThreadingGtk.cpp: Removed.
1472 * platform/mac/MainThreadMac.mm: Copied from WebCore/platform/mac/Threading.mm.
1473 * platform/mac/Threading.mm: Removed.
1474 * platform/pthreads: Removed.
1475 * platform/pthreads/ThreadingPthreads.cpp: Removed.
1476 * platform/qt/MainThreadQt.cpp: Copied from WebCore/platform/qt/ThreadingQt.cpp.
1477 * platform/qt/ThreadingQt.cpp: Removed.
1478 * platform/sql/SQLValue.h:
1479 * platform/sql/SQLiteAuthorizer.h:
1480 * platform/sql/SQLiteDatabase.h:
1481 * platform/win/MainThreadWin.cpp: Copied from WebCore/platform/win/ThreadingWin.cpp.
1482 (WebCore::initializeThreadingAndMainThread):
1483 * platform/win/MutexWin.cpp: Removed.
1484 * platform/win/ThreadingWin.cpp: Removed.
1485 * platform/wx/MainThreadWx.cpp: Copied from WebCore/platform/wx/ThreadingWx.cpp.
1486 * platform/wx/ThreadingWx.cpp: Removed.
1487 * storage/Database.cpp:
1488 (WebCore::Database::Database):
1489 * storage/Database.h:
1490 * storage/DatabaseTask.h:
1491 * storage/DatabaseThread.h:
1492 * storage/DatabaseTracker.cpp:
1493 * storage/OriginQuotaManager.h:
1494 * storage/SQLError.h:
1495 * storage/SQLResultSet.h:
1496 * storage/SQLStatement.h:
1497 * storage/SQLStatementCallback.h:
1498 * storage/SQLStatementErrorCallback.h:
1499 * storage/SQLTransaction.h:
1500 * storage/SQLTransactionCallback.h:
1501 * storage/SQLTransactionErrorCallback.h:
1504 2008-02-23 David Kilzer <ddkilzer@apple.com>
1506 Please clarify licensing for some files
1507 <http://bugs.webkit.org/show_bug.cgi?id=14970>
1511 * bindings/objc/WebScriptObject.h: Added Apple BSD-style license.
1512 * bindings/objc/WebScriptObjectPrivate.h: Ditto.
1513 * platform/text/mac/ShapeArabic.c: Added ICU license from WebCore/icu/LICENSE.
1515 2008-02-22 Justin Garcia <justin.garcia@apple.com>
1517 Reviewed by Anders Carlsson.
1519 <rdar://problem/5714333> Add document.getSelection()
1521 Add a synonym for window.getSelection() that FF supports. There were requests in
1522 this bugs dupes to also support the IE only document.selection, but IE's Selection
1523 object is too different than ours currently for that to be safe (specifically, we
1524 don't support enough of IE's TextRange methods on our DOM Range object yet). I
1525 filed <rdar://problem/5761233> to cover that.
1528 (WebCore::Document::getSelection): Added.
1530 * dom/Document.idl: Ditto. JS only since this is about web compatibility.
1532 2008-02-22 Oliver Hunt <oliver@apple.com>
1536 * WebCoreSources.bkl:
1538 2008-02-22 Oliver Hunt <oliver@apple.com>
1540 Once more with the cairo/qt/wx build fixing
1542 * platform/graphics/cairo/ImageBufferCairo.cpp:
1543 * platform/graphics/qt/ImageBufferQt.cpp:
1544 * platform/graphics/wx/ImageBufferWx.cpp:
1546 2008-02-22 Mark Rowe <mrowe@apple.com>
1548 Windows build fix. Add missing include of DeprecatedCString.h and sort existing includes.
1550 * platform/win/PasteboardWin.cpp:
1552 2008-02-22 Mark Rowe <mrowe@apple.com>
1554 Speculative Windows build fix.
1556 * platform/win/ClipboardUtilitiesWin.cpp: Add missing include of DeprecatedCString.h and sort existing includes.
1557 * platform/win/ClipboardWin.cpp: Ditto.
1559 2008-02-22 Oliver Hunt <oliver@apple.com>
1561 Build fix for windows, wx and qt
1563 * html/CanvasPixelArray.h:
1564 (WebCore::CanvasPixelArray::set):
1566 2008-02-22 Oliver Hunt <oliver@apple.com>
1568 Unbreak windows vcproj
1570 * WebCore.vcproj/WebCore.vcproj:
1572 2008-02-22 Oliver Hunt <oliver@apple.com>
1576 Support Canvas.getImageData and Canvas.createImageData
1578 This patch adds support for all the pixel reading portions
1579 of the HTML5 Canvas spec. There are two new types ImageData
1580 and CanvasPixelArray which are used to provide the HTML5
1581 ImageData object, and the required semantics for assignment
1582 to the ImageData data array.
1584 We only implement the CG version of ImageBuffer::getImageData,
1585 but the logic is null safe, so this will not introduce any
1586 crashes into other platforms, unfortunately it will result in
1587 JS Object detection "lying" on non-CG platforms.
1589 Tests: fast/canvas/canvas-ImageData-behaviour.html
1590 fast/canvas/canvas-getImageData.html
1592 * DerivedSources.make:
1595 * WebCore.vcproj/WebCore.vcproj:
1596 * WebCore.xcodeproj/project.pbxproj:
1597 * bindings/js/JSCanvasPixelArrayCustom.cpp: Added.
1598 (WebCore::JSCanvasPixelArray::indexGetter):
1599 (WebCore::JSCanvasPixelArray::indexSetter):
1601 * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1602 * bindings/scripts/CodeGeneratorJS.pm:
1603 * html/CanvasPixelArray.cpp: Added.
1604 (WebCore::CanvasPixelArray::create):
1605 * html/CanvasPixelArray.h: Added.
1606 (WebCore::CanvasPixelArray::data):
1607 (WebCore::CanvasPixelArray::length):
1608 (WebCore::CanvasPixelArray::set):
1609 (WebCore::CanvasPixelArray::get):
1610 * html/CanvasPixelArray.idl: Added.
1611 * html/CanvasRenderingContext2D.cpp:
1612 (WebCore::createEmptyImageData):
1613 (WebCore::CanvasRenderingContext2D::createImageData):
1614 (WebCore::CanvasRenderingContext2D::getImageData):
1615 * html/CanvasRenderingContext2D.h:
1616 * html/CanvasRenderingContext2D.idl:
1617 * html/HTMLCanvasElement.cpp:
1618 (WebCore::HTMLCanvasElement::convertLogicalToDevice):
1619 (WebCore::HTMLCanvasElement::createImageBuffer):
1620 * html/HTMLCanvasElement.h:
1621 * html/ImageData.cpp: Added.
1622 (WebCore::ImageData::create):
1623 (WebCore::ImageData::ImageData):
1624 * html/ImageData.h: Added.
1625 (WebCore::ImageData::width):
1626 (WebCore::ImageData::height):
1627 (WebCore::ImageData::data):
1628 * html/ImageData.idl: Added.
1629 * platform/graphics/ImageBuffer.h:
1630 * platform/graphics/cairo/ImageBufferCairo.cpp:
1631 (WebCore::ImageBuffer::getImageData):
1632 * platform/graphics/cg/ImageBufferCG.cpp:
1633 (WebCore::ImageBuffer::getImageData):
1634 * platform/graphics/qt/ImageBufferQt.cpp:
1635 (WebCore::ImageBuffer::getImageData):
1636 * platform/graphics/wx/ImageBufferWx.cpp:
1637 (WebCore::ImageBuffer::getImageData):
1639 2008-02-22 Sam Weinig <sam@webkit.org>
1641 Rubber-stamped by Adam Roben.
1643 Rid the project of the Devil known as DeprecatedString!
1648 * WebCore.vcproj/WebCore.vcproj:
1649 * WebCore.xcodeproj/project.pbxproj:
1650 * WebCoreSources.bkl:
1652 * html/HTMLFormElement.cpp:
1653 * platform/DeprecatedString.cpp: Removed.
1654 * platform/DeprecatedString.h: Removed.
1655 * platform/graphics/qt/IconQt.cpp:
1656 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
1657 * platform/gtk/CookieJarGtk.cpp:
1658 * platform/gtk/CursorGtk.cpp:
1659 * platform/gtk/KeyEventGtk.cpp:
1660 * platform/mac/DeprecatedStringMac.mm: Removed.
1661 * platform/network/qt/ResourceHandleQt.cpp:
1662 * platform/network/win/CookieJarWin.cpp:
1664 * platform/qt/ClipboardQt.cpp:
1665 * platform/qt/CookieJarQt.cpp:
1666 * platform/qt/CursorQt.cpp:
1667 * platform/symbian/DeprecatedStringSymbian.cpp: Removed.
1668 * platform/text/AtomicString.cpp:
1669 * platform/text/AtomicString.h:
1670 * platform/text/PlatformString.h:
1671 * platform/text/String.cpp:
1672 * platform/text/StringImpl.cpp:
1673 * platform/text/qt/StringQt.cpp:
1674 (WebCore::String::String):
1675 * platform/text/wx/StringWx.cpp:
1676 * platform/win/BString.cpp:
1677 * platform/win/BString.h:
1678 * platform/win/PasteboardWin.cpp:
1680 2008-02-22 Sam Weinig <sam@webkit.org>
1682 Reviewed by Geoff Garen.
1684 - Remove use of DeprecatedString in CSSStyleSelector.
1686 * css/CSSStyleSelector.cpp:
1687 (WebCore::findHash): Removed. Use find instead.
1688 (WebCore::findSlashDotDotSlash): Changed to take a UChar* and a length.
1689 (WebCore::findSlashSlash): Ditto.
1690 (WebCore::findSlashDotSlash): Ditto.
1691 (WebCore::containsColonSlashSlash): Ditto.
1692 (WebCore::cleanPath): Change to operate on a String.
1693 (WebCore::checkPseudoState): Changed to use a Vector as a buffer.
1695 2008-02-22 Geoffrey Garen <ggaren@apple.com>
1697 Reviewed by Sam Weinig.
1699 Fixed <rdar://problem/5057509> Repro leak of JSXMLHttpRequest and
1700 associated objects @ www.viamichelin.it, which was probably an underlying
1701 cause of <rdar://problem/5744037> Gmail out of memory (17455)
1703 If SubresourceLoader::create returned NULL, we would ref() / gcProtect()
1704 the XMLHttpRequest but think we hadn't, therefore never
1705 calling deref() / gcUnprotect().
1707 This could happen at gmail.com, since gmail.com attempts to send
1708 XMLHttpRequests from unload handlers in order to gather usage statistics.
1709 (According to comments in the code, SubresourceLoader::create returns
1710 NULL when called from an unload handler.)
1712 The solution is to ref() / gcProtect() only if SubresourceLoader::create
1713 doesn't return NULL. This make sense, since we only need to protect the
1714 request as long as it has an outstanding network transaction.
1716 * xml/XMLHttpRequest.cpp:
1717 (WebCore::XMLHttpRequest::XMLHttpRequest):
1718 (WebCore::XMLHttpRequest::send):
1720 2008-02-22 Darin Adler <darin@apple.com>
1722 Reviewed, tweaked and landed by Sam.
1724 - Make RegularExpression operate on Strings instead of DeprecatedStrings.
1726 * dom/DOMImplementation.cpp:
1727 (WebCore::DOMImplementation::isXMLMIMEType): Use string instead of DeprecatedString
1728 to build up the RegularExpression.
1730 (WebCore::createRegExpForLabels): Use String instead of DeprecatedString.
1731 (WebCore::Frame::searchForLabelsAboveCell): Ditto.
1732 (WebCore::Frame::searchForLabelsBeforeElement): Ditto.
1733 (WebCore::Frame::matchLabelsAgainstElement): Ditto.
1735 * page/mac/FrameMac.mm:
1736 (WebCore::regExpForLabels): Ditto.
1737 (WebCore::Frame::searchForNSLabelsAboveCell): Ditto.
1738 (WebCore::Frame::searchForLabelsBeforeElement): Ditto.
1739 (WebCore::Frame::matchLabelsAgainstElement): Ditto.
1741 * platform/text/RegularExpression.cpp:
1742 (WebCore::RegularExpression::Private::Private):
1743 (WebCore::RegularExpression::Private::compile):
1744 (WebCore::RegularExpression::RegularExpression):
1745 (WebCore::RegularExpression::operator=):
1746 (WebCore::RegularExpression::pattern):
1747 (WebCore::RegularExpression::match):
1748 (WebCore::RegularExpression::search):
1749 (WebCore::RegularExpression::searchRev):
1750 (WebCore::replace): Added.
1751 * platform/text/RegularExpression.h:
1752 Change functions to take Strings as input instead of DeprecatedStrings and
1753 reduce the complexity of the class by removing unneeded globbing support.
1755 2008-02-22 Jon Honeycutt <jhoneycutt@apple.com>
1759 <rdar://problem/5760360> REGRESSION(r30376): Crash loading plugin page
1760 during stress test (after only 5 min) - null dereference
1762 Full-frame plug-ins create PluginStream objects without loaders, as the
1763 PluginView receives the loading callbacks. We were trying to call
1764 setDefersLoading on these null pointers.
1766 * plugins/PluginStream.cpp:
1767 (WebCore::PluginStream::startStream): Add null check.
1768 (WebCore::PluginStream::destroyStream): Same.
1769 (WebCore::PluginStream::deliverData): Same.
1771 2008-02-22 Darin Adler <darin@apple.com>
1773 Reviewed and tweaked by Jon Honeycutt. Reviewed and landed by Sam.
1775 - Remove uses of DeprecatedString in Windows plugin code.
1777 * plugins/win/PluginPackageWin.cpp:
1778 (WebCore::getVersionInfo): Cleanup formatting.
1779 (WebCore::PluginPackage::freeLibraryTimerFired): Remove un-needed variable name.
1780 (WebCore::PluginPackage::storeFileVersion): Move casts.
1781 (WebCore::PluginPackage::fetchInfo): Use OwnArrayPtr and switch to more efficient
1783 (WebCore::PluginPackage::load): Fix whitespace.
1784 (WebCore::PluginPackage::hash): Make the hashCodes const
1785 * plugins/win/PluginViewWin.cpp:
1786 (WebCore::makeURL): Use String instead of DeprecatedString.
1787 (WebCore::parseRFC822HeaderFields): Ditto.
1788 (WebCore::PluginView::handlePost): Ditto.
1789 (WebCore::PluginView::status): Ditto.
1791 2008-02-22 Darin Adler <darin@apple.com>
1793 Reviewed, tweaked and landed by Sam.
1795 - Don't use DeprecatedString in HTMLTokenizer.
1797 * html/HTMLTokenizer.cpp:
1798 (WebCore::HTMLTokenizer::finish):
1799 * platform/text/PlatformString.h:
1802 2008-02-21 Sam Weinig <sam@webkit.org>
1804 Reviewed by Anders Carlsson.
1806 Fix for <rdar://problem/5757946>
1808 - Parse URLs before checking whether they are javascript: urls
1809 (which require security checks).
1811 * bindings/js/JSAttrCustom.cpp:
1812 (WebCore::JSAttr::setValue):
1813 * bindings/js/JSElementCustom.cpp:
1814 (WebCore::allowSettingSrcToJavascriptURL):
1815 * bindings/js/JSHTMLFrameElementCustom.cpp:
1816 (WebCore::allowSettingJavascriptURL):
1817 * bindings/js/JSHTMLIFrameElementCustom.cpp:
1818 (WebCore::JSHTMLIFrameElement::setSrc):
1820 2008-02-21 Ada Chan <adachan@apple.com>
1822 <rdar://problem/5757873> Buffer overrun in DeprecatedCString::find() in WebCore
1823 We could get a buffer overrun in DeprecatedCString::find() if the end of the
1824 string matches a beginning portion of the substring, for example, if string is
1825 "a" but the substring is "ab".
1826 The code as is also will not match things correctly under certain situations
1827 since the inner while loop increments the index. For example, we wouldn't find
1828 a match if the string is "aab..." and the substring is "ab". Changed the
1829 inner while loop to increment a temporary index into str.
1831 Test: fast/loader/charset-parse.html
1833 Reviewed by Dan Berstein.
1835 * platform/DeprecatedCString.cpp:
1836 (WebCore::DeprecatedCString::find):
1838 2008-02-21 David Hyatt <hyatt@apple.com>
1840 Fix for bug 17301. CSS media queries need to use the correct viewport
1841 when contained in documents inside iframes (rather than always using the
1842 top-level document's viewport). CSS media queries based on the viewport
1843 also needed to be dynamic and update as you resize the window (this is
1846 This patch gets Acid3 up to 86/100 with 3 colored boxes filled in.
1850 Added fast/media/viewport-media-query.html
1852 * css/CSSStyleSelector.cpp:
1853 (WebCore::CSSStyleSelector::CSSStyleSelector):
1854 (WebCore::CSSStyleSelector::addViewportDependentMediaQueryResult):
1855 (WebCore::CSSStyleSelector::affectedByViewportChange):
1856 * css/CSSStyleSelector.h:
1857 (WebCore::MediaQueryResult::MediaQueryResult):
1858 * css/MediaQueryEvaluator.cpp:
1859 (WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
1860 (WebCore::MediaQueryEvaluator):
1861 (WebCore::MediaQueryEvaluator::eval):
1862 (WebCore::colorMediaFeatureEval):
1863 (WebCore::monochromeMediaFeatureEval):
1864 (WebCore::device_aspect_ratioMediaFeatureEval):
1865 (WebCore::device_pixel_ratioMediaFeatureEval):
1866 (WebCore::gridMediaFeatureEval):
1867 (WebCore::device_heightMediaFeatureEval):
1868 (WebCore::device_widthMediaFeatureEval):
1869 (WebCore::heightMediaFeatureEval):
1870 (WebCore::widthMediaFeatureEval):
1871 (WebCore::min_colorMediaFeatureEval):
1872 (WebCore::max_colorMediaFeatureEval):
1873 (WebCore::min_monochromeMediaFeatureEval):
1874 (WebCore::max_monochromeMediaFeatureEval):
1875 (WebCore::min_device_aspect_ratioMediaFeatureEval):
1876 (WebCore::max_device_aspect_ratioMediaFeatureEval):
1877 (WebCore::min_device_pixel_ratioMediaFeatureEval):
1878 (WebCore::max_device_pixel_ratioMediaFeatureEval):
1879 (WebCore::min_heightMediaFeatureEval):
1880 (WebCore::max_heightMediaFeatureEval):
1881 (WebCore::min_widthMediaFeatureEval):
1882 (WebCore::max_widthMediaFeatureEval):
1883 (WebCore::min_device_heightMediaFeatureEval):
1884 (WebCore::max_device_heightMediaFeatureEval):
1885 (WebCore::min_device_widthMediaFeatureEval):
1886 (WebCore::max_device_widthMediaFeatureEval):
1887 * css/MediaQueryEvaluator.h:
1888 * css/MediaQueryExp.cpp:
1889 (WebCore::MediaQueryExp::~MediaQueryExp):
1890 * css/MediaQueryExp.h:
1891 (WebCore::MediaQueryExp::value):
1892 (WebCore::MediaQueryExp::isViewportDependent):
1893 * html/HTMLMediaElement.cpp:
1894 (WebCore::HTMLMediaElement::pickMedia):
1895 * page/FrameView.cpp:
1896 (WebCore::FrameView::layout):
1898 2008-02-21 Anders Carlsson <andersca@apple.com>
1902 Make more classes start out with a refcount of 1.
1904 * dom/QualifiedName.cpp:
1905 (WebCore::QNameComponentsTranslator::translate):
1906 (WebCore::QualifiedName::QualifiedName):
1907 * dom/QualifiedName.h:
1908 (WebCore::QualifiedName::QualifiedNameImpl::create):
1909 (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
1910 * history/BackForwardList.cpp:
1911 (WebCore::BackForwardList::BackForwardList):
1912 * history/BackForwardList.h:
1913 (WebCore::BackForwardList::create):
1915 (WebCore::Page::Page):
1916 * platform/text/CString.cpp:
1917 (WebCore::CString::init):
1918 (WebCore::CString::newUninitialized):
1919 (WebCore::CString::copyBufferIfNeeded):
1920 * platform/text/CString.h:
1921 (WebCore::CStringBuffer::create):
1922 (WebCore::CStringBuffer::CStringBuffer):
1924 2008-02-21 Kevin Ollivier <kevino@theolliviers.com>
1926 wx build fix for the domString() -> string() rename in r30443.
1928 * platform/graphics/wx/FontPlatformDataWx.cpp:
1929 (WebCore::FontPlatformData::FontPlatformData):
1931 2008-02-21 Antti Koivisto <antti@apple.com>
1933 Reviewed by Sam Weinig.
1935 <rdar://problem/5753789>
1936 REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang)
1938 Ensure all versions of allowsAccessFrom are inlined to single functions.
1939 This is a 2% win in browser hosted Sunspider.
1941 * bindings/js/kjs_window.cpp:
1942 (KJS::Window::allowsAccessFrom):
1943 (KJS::Window::allowsAccessFromPrivate):
1944 * bindings/js/kjs_window.h:
1946 2008-02-21 Dan Bernstein <mitz@apple.com>
1948 Reviewed by Sam Weinig.
1952 * rendering/bidi.cpp:
1953 (WebCore::bidiNext): Removed redundant isBR() check -- isText() returns
1954 true for RenderLineBreak.
1955 (WebCore::bidiFirst): Ditto.
1956 (WebCore::shouldSkipWhitespaceAfterStartObject):
1957 (WebCore::RenderBlock::findNextLineBreak):
1959 2008-02-21 Geoffrey Garen <ggaren@apple.com>
1961 Reviewed by David Harrison.
1963 Fixed <rdar://problem/5756125> REGRESSION: A crash occurs at
1964 WebCore::Frame::scriptProxy() when completing a search with Package Tracker widget
1966 Test: fast/dom/script-element-without-frame-crash.html
1968 * html/HTMLTokenizer.cpp:
1969 (WebCore::HTMLTokenizer::parseTag): Added back a NULL check that was
1970 accidentally removed in r30325.
1972 2008-02-21 Rodney Dawes <dobey@wayofthemonkey.com>
1974 GTK+ build fix. s/domString()/string()/
1976 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1977 (FontPlatformData::FontPlatformData):
1979 2008-02-20 Dan Bernstein <mitz@apple.com>
1981 Reviewed by Dave Hyatt.
1983 - fix http://bugs.webkit.org/show_bug.cgi?id=17465
1984 REGRESSION: <DIV> tokenized into Div if still searching for DOCTYPE
1986 Test: fast/tokenizer/doctype-search-reset.html
1988 * html/HTMLTokenizer.cpp:
1989 (WebCore::HTMLTokenizer::parseTag):
1991 2008-02-20 Dan Bernstein <mitz@apple.com>
1993 Reviewed by Dave Hyatt.
1995 - fix http://bugs.webkit.org/show_bug.cgi?id=17464
1996 REGRESSION: Crash in RenderBlock::findNextLineBreak reading r30444 commit email in GMail
1998 Test: fast/text/wbr-in-pre-crash.html
2000 * rendering/bidi.cpp:
2001 (WebCore::RenderBlock::findNextLineBreak):
2003 2008-02-20 Oliver Hunt <oliver@apple.com>
2007 Bug 17303: Canvas crash in ImageBuffer
2009 We handle a null GraphicsContext everywhere, but we weren't checking for
2010 a null ImageBuffer, which is what will result in a null GraphicsContext in
2013 Test: fast/canvas/access-zero-sized-canvas.html
2015 * html/HTMLCanvasElement.cpp:
2017 2008-02-20 David Hyatt <hyatt@apple.com>
2019 Fix the layout test failure that never should have passed in the first
2020 place by making changes to media lists actually result in the recomputation
2021 of the style selector. Now it passes for the right reasons and not because
2024 Reviewed by Sam Weinig
2026 * css/MediaList.cpp:
2027 (WebCore::MediaList::deleteMedium):
2028 (WebCore::MediaList::setMediaText):
2029 (WebCore::MediaList::appendMedium):
2030 (WebCore::MediaList::notifyChanged):
2033 (WebCore::Document::attach):
2035 2008-02-20 Darin Adler <darin@apple.com>
2037 Reviewed, tweaked and landed by Sam.
2039 - make markup functions not use DeprecatedString.
2041 * editing/markup.cpp:
2042 (WebCore::append): Added.
2043 (WebCore::escapeContentText): Build up string using a Vector.
2044 (WebCore::appendStartMarkup): Use String instead of DeprecatedString.
2046 2008-02-20 Darin Adler <darin@apple.com>
2048 Reviewed, tweaked and landed by Sam.
2050 - make TextIterator use a Vector instead of a DeprecatedString.
2052 * editing/TextIterator.cpp:
2053 (WebCore::CharacterIterator::string): Build up the String using a
2055 (WebCore::WordAwareIterator::advance): Switch to using Vector functions.
2056 (WebCore::WordAwareIterator::length): Ditto.
2057 (WebCore::WordAwareIterator::characters): Ditto.
2058 * editing/TextIterator.h: Use a Vector<UChar> for the buffer instead
2059 of DeprecatedString.
2061 2008-02-20 Darin Adler <darin@apple.com>
2063 Reviewed, tweaked and landed by Sam.
2065 - make HTMLInterchange return a String instead of a DeprecatedString
2067 * editing/HTMLInterchange.cpp:
2068 (WebCore::): Return a String from convertedSpaceString.
2069 (WebCore::convertHTMLTextToInterchangeFormat): Use a Vector instead of
2070 a DeprecatedString to build up the return String.
2071 * editing/HTMLInterchange.h:
2073 2008-02-20 Eric Seidel <eric@webkit.org>
2077 Remove m_drawingContext and change m_data to m_imageBuffer
2079 * html/HTMLCanvasElement.cpp:
2080 (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2081 (WebCore::HTMLCanvasElement::reset):
2082 (WebCore::HTMLCanvasElement::paint):
2083 (WebCore::HTMLCanvasElement::createImageBuffer):
2084 (WebCore::HTMLCanvasElement::buffer):
2085 (WebCore::HTMLCanvasElement::createPlatformImage):
2086 * html/HTMLCanvasElement.h:
2088 2008-02-20 Anders Carlsson <andersca@apple.com>
2092 Rename AtomicString::domString() to AtomicString::string().
2094 * css/CSSComputedStyleDeclaration.cpp:
2095 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2096 * css/CSSFontSelector.cpp:
2097 (WebCore::CSSFontSelector::getFontData):
2099 (WebCore::Attr::createTextChild):
2101 (WebCore::Comment::nodeName):
2103 (WebCore::Document::recalcStyleSelector):
2104 (WebCore::Document::setHTMLWindowEventListener):
2105 (WebCore::Document::formElementsState):
2106 * dom/StyledElement.cpp:
2107 (WebCore::StyledElement::parseMappedAttribute):
2109 (WebCore::Text::nodeName):
2110 * editing/SelectionController.cpp:
2111 (WebCore::SelectionController::debugRenderer):
2112 * html/HTMLCollection.cpp:
2113 (WebCore::HTMLCollection::checkForNameMatch):
2114 * html/HTMLElement.cpp:
2115 (WebCore::HTMLElement::nodeName):
2116 (WebCore::HTMLElement::setHTMLEventListener):
2117 * html/HTMLFormCollection.cpp:
2118 (WebCore::HTMLFormCollection::getNamedFormItem):
2119 * html/HTMLImageElement.cpp:
2120 (WebCore::HTMLImageElement::parseMappedAttribute):
2121 (WebCore::HTMLImageElement::isURLAttribute):
2122 * html/HTMLLinkElement.cpp:
2123 (WebCore::HTMLLinkElement::parseMappedAttribute):
2124 (WebCore::HTMLLinkElement::tokenizeRelAttribute):
2125 * html/HTMLObjectElement.cpp:
2126 (WebCore::HTMLObjectElement::isURLAttribute):
2127 (WebCore::HTMLObjectElement::containsJavaApplet):
2128 * html/HTMLParamElement.cpp:
2129 (WebCore::HTMLParamElement::isURLAttribute):
2130 * html/HTMLParser.cpp:
2131 (WebCore::HTMLParser::handleIsindex):
2132 * html/HTMLScriptElement.cpp:
2133 (WebCore::HTMLScriptElement::insertedIntoDocument):
2134 (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript):
2135 * html/HTMLStyleElement.cpp:
2136 (WebCore::HTMLStyleElement::parseMappedAttribute):
2137 * html/HTMLTokenizer.cpp:
2138 (WebCore::HTMLTokenizer::parseTag):
2139 * html/HTMLViewSourceDocument.cpp:
2140 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
2141 * loader/FrameLoader.cpp:
2142 (WebCore::FrameLoader::saveDocumentState):
2143 * page/FrameTree.cpp:
2144 (WebCore::FrameTree::uniqueChildName):
2145 * platform/text/AtomicString.h:
2146 (WebCore::AtomicString::string):
2147 (WebCore::AtomicString::contains):
2148 (WebCore::AtomicString::find):
2149 (WebCore::AtomicString::startsWith):
2150 (WebCore::AtomicString::endsWith):
2151 * rendering/RenderPartObject.cpp:
2152 (WebCore::RenderPartObject::updateWidget):
2153 * svg/SVGElement.cpp:
2154 (WebCore::SVGElement::addSVGEventListener):
2155 * svg/SVGSVGElement.cpp:
2156 (WebCore::SVGSVGElement::addSVGWindowEventListener):
2157 * xml/XPathFunctions.cpp:
2158 (WebCore::XPath::FunLocalName::evaluate):
2159 (WebCore::XPath::FunNamespaceURI::evaluate):
2160 (WebCore::XPath::FunName::evaluate):
2162 2008-02-20 Brent Fulgham <bfulgham@gmail.com>
2166 http://bugs.webkit.org/show_bug.cgi?id=17336
2167 Provide implementations for Windows (Cairo) build of WebKit that
2168 handles font formatting.
2169 - Split font implementation files to allow maximal code sharing
2170 between CG and Cairo back-ends.
2172 * WebCore.vcproj/WebCore.vcproj:
2173 * platform/graphics/SimpleFontData.h: Add signatures for private win
2174 initialization functions.
2175 * platform/graphics/win/FontCacheWin.cpp:
2176 (WebCore::FontCache::platformInit):
2177 (WebCore::FontCache::createFontPlatformData):
2178 * platform/graphics/win/FontCairoWin.cpp: Removed. Universal version
2179 is now part of platform/graphics/cairo.
2180 * platform/graphics/win/FontCustomPlatformDataCairo.cpp: Added.
2181 (WebCore::FontCustomPlatformDataCairo::~FontCustomPlatformDataCairo):
2182 (WebCore::FontCustomPlatformDataCairo::fontPlatformData):
2183 (WebCore::releaseData):
2184 (WebCore::createFontCustomPlatformData):
2185 * platform/graphics/win/FontCustomPlatformDataCairo.h: Added.
2186 (WebCore::FontCustomPlatformDataCairo::FontCustomPlatformDataCairo):
2187 * platform/graphics/win/FontPlatformData.h:
2188 (WebCore::FontPlatformData::FontPlatformData):
2189 (WebCore::FontPlatformData::fontFace):
2190 (WebCore::FontPlatformData::scaledFont):
2191 (WebCore::FontPlatformData::operator==):
2192 * platform/graphics/win/FontPlatformDataCGWin.cpp: Copied from WebCore/platform/graphics/win/FontPlatformDataWin.cpp.
2193 (WebCore::FontPlatformData::platformDataInit):
2194 * platform/graphics/win/FontPlatformDataCairoWin.cpp: Added.
2195 (WebCore::FontPlatformData::platformDataInit):
2196 (WebCore::FontPlatformData::FontPlatformData):
2197 (WebCore::FontPlatformData::setFont):
2198 * platform/graphics/win/FontPlatformDataWin.cpp: Moved CG-specific
2199 code to FontPlatformDataCG.cpp.
2200 (WebCore::FontPlatformData::FontPlatformData):
2201 * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp: Copied from WebCore/platform/graphics/win/GlyphPageTreeNodeWin.cpp.
2202 * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp: Copied from WebCore/platform/graphics/win/GlyphPageTreeNodeWin.cpp.
2203 (WebCore::GlyphPage::fill):
2204 * platform/graphics/win/GlyphPageTreeNodeWin.cpp: Removed. Replaced
2205 with CG- and Cairo-specific versions.
2206 * platform/graphics/win/SimpleFontDataCGWin.cpp:
2207 (WebCore::SimpleFontData::platformInit):
2208 (WebCore::SimpleFontData::platformDestroy):
2209 (WebCore::SimpleFontData::platformWidthForGlyph):
2210 * platform/graphics/win/SimpleFontDataCairoWin.cpp:
2211 (WebCore::SimpleFontData::platformInit):
2212 (WebCore::SimpleFontData::platformDestroy):
2213 (WebCore::SimpleFontData::platformWidthForGlyph):
2214 (WebCore::SimpleFontData::setFont):
2215 * platform/graphics/win/SimpleFontDataWin.cpp:
2216 (WebCore::SimpleFontData::initGDIFont):
2217 (WebCore::SimpleFontData::platformCommonDestroy):
2218 (WebCore::SimpleFontData::widthForGDIGlyph):
2220 2008-02-20 Darin Adler <darin@apple.com>
2224 * dom/Node.h: Took out unneeded forward declaration of TextStream.
2226 2008-02-20 Darin Adler <darin@apple.com>
2230 * rendering/RenderObject.h: Took out unneeded forward declaration of TextStream.
2232 2008-02-20 David Hyatt <hyatt@apple.com>
2234 Fix for bug 16760, incorrect <object> MIME type handling and fallback
2239 * html/HTMLImageLoader.cpp:
2240 (WebCore::HTMLImageLoader::notifyFinished):
2241 If the image had an error, make sure to do <object> fallback.
2243 * html/HTMLObjectElement.cpp:
2244 (WebCore::HTMLObjectElement::renderFallbackContent):
2245 Before doing fallback check if there is a MIME type mismatch between
2246 an image type and a non-image type. If so, detach and re-attach after
2247 storing the correct MIME type.
2249 * loader/loader.cpp:
2250 (WebCore::Loader::didReceiveData):
2251 Consider it an error when a 404 is encountered on a CachedResource load.
2253 2008-02-20 Anders Carlsson <andersca@apple.com>
2257 StringImpl constructors used by AtomicString should start with a refcount of 1.
2259 * platform/text/AtomicString.cpp:
2260 (WebCore::AtomicString::add):
2261 * platform/text/AtomicString.h:
2262 * platform/text/StringImpl.cpp:
2263 (WebCore::StringImpl::StringImpl):
2265 2008-02-20 Darin Adler <darin@apple.com>
2267 * bindings/js/kjs_navigator.cpp:
2268 (WebCore::needsYouTubeQuirk): Tweak comments.
2270 2008-02-20 Anders Carlsson <andersca@apple.com>
2274 Change all refcounted classes in page/ to start with a refcount of 1.
2277 (WebCore::BarInfo::BarInfo):
2279 (WebCore::BarInfo::create):
2281 (WebCore::Console::Console):
2283 (WebCore::Console::create):
2284 * page/DOMSelection.cpp:
2285 (WebCore::DOMSelection::DOMSelection):
2286 * page/DOMSelection.h:
2287 (WebCore::DOMSelection::create):
2288 * page/DOMWindow.cpp:
2289 (WebCore::DOMWindow::DOMWindow):
2290 (WebCore::DOMWindow::screen):
2291 (WebCore::DOMWindow::history):
2292 (WebCore::DOMWindow::locationbar):
2293 (WebCore::DOMWindow::menubar):
2294 (WebCore::DOMWindow::personalbar):
2295 (WebCore::DOMWindow::scrollbars):
2296 (WebCore::DOMWindow::statusbar):
2297 (WebCore::DOMWindow::toolbar):
2298 (WebCore::DOMWindow::console):
2299 (WebCore::DOMWindow::getSelection):
2301 (WebCore::DOMWindow::create):
2303 (WebCore::Frame::domWindow):
2305 (WebCore::History::History):
2307 (WebCore::History::create):
2308 * page/InspectorController.cpp:
2309 (WebCore::InspectorResource::create):
2310 (WebCore::InspectorResource::InspectorResource):
2311 (WebCore::InspectorDatabaseResource::create):
2312 (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
2313 (WebCore::InspectorController::didLoadResourceFromMemoryCache):
2314 (WebCore::InspectorController::identifierForInitialRequest):
2315 (WebCore::InspectorController::didOpenDatabase):
2317 (WebCore::Plugin::create):
2318 (WebCore::Plugin::Plugin):
2320 (WebCore::Screen::Screen):
2322 (WebCore::Screen::create):
2324 2008-02-20 Sam Weinig <sam@webkit.org>
2326 Reviewed by Darin and Geoff.
2328 - <rdar://problem/5754378> work around missing video on YouTube front page with a site-specific hack
2330 * WebCore.base.exp: Updated.
2332 * bindings/js/kjs_navigator.cpp:
2333 (WebCore::needsYouTubeQuirk): Added. Return true on Windows only when the quirk is needed.
2334 (WebCore::Navigator::getValueProperty): For the appVersion property, if needsYouTubeQuirk
2335 return true, then return the empty string.
2337 * page/Settings.cpp:
2338 (WebCore::Settings::Settings): Set m_needsSiteSpecificQuirks to false.
2339 (WebCore::Settings::setNeedsSiteSpecificQuirks): Added.
2340 * page/Settings.h: Added m_needsSiteSpecificQuirks.
2341 (WebCore::Settings::needsSiteSpecificQuirks): Added.
2343 2008-02-20 David Hyatt <hyatt@apple.com>
2345 Fix for bug 12751, doctype nodes aren't part of the Document (Acid3).
2347 Reviewed by Sam Weinig
2349 Many tests added in fast/doctypes.
2351 * dom/DOMImplementation.cpp:
2352 (WebCore::DOMImplementation::createDocument):
2353 (WebCore::DOMImplementation::createHTMLDocument):
2355 (WebCore::Document::Document):
2356 (WebCore::Document::setDocType):
2357 (WebCore::Document::attach):
2358 (WebCore::Document::getImageMap):
2360 (WebCore::Document::doctype):
2361 (WebCore::Document::):
2362 (WebCore::Document::determineParseMode):
2363 (WebCore::Document::setParseMode):
2364 (WebCore::Document::parseMode):
2365 (WebCore::Document::inCompatMode):
2366 (WebCore::Document::inAlmostStrictMode):
2367 (WebCore::Document::inStrictMode):
2368 * dom/DocumentType.cpp:
2369 (WebCore::DocumentType::cloneNode):
2370 (WebCore::DocumentType::insertedIntoDocument):
2371 (WebCore::DocumentType::removedFromDocument):
2372 * dom/DocumentType.h:
2374 (WebCore::Node::childAllowed):
2375 * dom/StyledElement.cpp:
2376 (WebCore::StyledElement::attributeChanged):
2377 * dom/XMLTokenizer.cpp:
2378 (WebCore::XMLTokenizer::internalSubset):
2380 * editing/markup.cpp:
2381 (WebCore::appendStartMarkup):
2382 * html/HTMLAppletElement.cpp:
2383 (WebCore::HTMLAppletElement::createRenderer):
2384 * html/HTMLDocument.cpp:
2385 (WebCore::HTMLDocument::HTMLDocument):
2386 (WebCore::HTMLDocument::childAllowed):
2387 (WebCore::HTMLDocument::determineParseMode):
2388 * html/HTMLDocument.h:
2389 * html/HTMLMapElement.cpp:
2390 (WebCore::HTMLMapElement::parseMappedAttribute):
2391 * html/HTMLParamElement.cpp:
2392 (WebCore::HTMLParamElement::parseMappedAttribute):
2393 * html/HTMLParser.cpp:
2394 (WebCore::HTMLParser::parseDoctypeToken):
2395 * html/HTMLParser.h:
2396 * html/HTMLTokenizer.cpp:
2397 (WebCore::HTMLTokenizer::reset):
2398 (WebCore::HTMLTokenizer::parseDoctype):
2399 (WebCore::HTMLTokenizer::parseTag):
2400 (WebCore::HTMLTokenizer::write):
2401 (WebCore::HTMLTokenizer::finish):
2402 (WebCore::HTMLTokenizer::processDoctypeToken):
2403 * html/HTMLTokenizer.h:
2405 (WebCore::DoctypeToken::DoctypeToken):
2406 (WebCore::DoctypeToken::reset):
2407 (WebCore::DoctypeToken::state):
2408 (WebCore::DoctypeToken::setState):
2409 (WebCore::HTMLTokenizer::State::inDoctype):
2410 (WebCore::HTMLTokenizer::State::setInDoctype):
2411 (WebCore::HTMLTokenizer::State::needsSpecialWriteHandling):
2412 (WebCore::HTMLTokenizer::State::):
2413 * html/HTMLViewSourceDocument.cpp:
2414 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
2415 (WebCore::HTMLViewSourceDocument::addViewSourceDoctypeToken):
2416 * html/HTMLViewSourceDocument.h:
2417 * loader/FrameLoader.cpp:
2418 (WebCore::FrameLoader::write):
2419 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2421 (WebCore::Frame::documentTypeString):
2422 * page/inspector/utilities.js:
2423 * xml/XSLTProcessor.cpp:
2424 (WebCore::XSLTProcessor::createDocumentFromSource):
2426 2008-02-20 Anders Carlsson <andersca@apple.com>
2430 Change most SVG related classes to start out with a ref count of 1.
2432 * bindings/js/JSSVGPointListCustom.cpp:
2433 (WebCore::JSSVGPointList::initialize):
2434 (WebCore::JSSVGPointList::insertItemBefore):
2435 (WebCore::JSSVGPointList::replaceItem):
2436 (WebCore::JSSVGPointList::appendItem):
2437 * bindings/js/JSSVGTransformListCustom.cpp:
2438 (WebCore::JSSVGTransformList::initialize):
2439 (WebCore::JSSVGTransformList::insertItemBefore):
2440 (WebCore::JSSVGTransformList::replaceItem):
2441 (WebCore::JSSVGTransformList::appendItem):
2442 * rendering/SVGCharacterLayoutInfo.h:
2443 (WebCore::SVGCharOnPath::create):
2444 (WebCore::SVGCharOnPath::SVGCharOnPath):
2445 * rendering/SVGRootInlineBox.cpp:
2446 (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
2447 * svg/SVGAnimationElement.cpp:
2448 (WebCore::SVGAnimationElement::parseBeginOrEndValue):
2449 * svg/SVGClipPathElement.cpp:
2450 (WebCore::SVGClipPathElement::canvasResource):
2451 * svg/SVGElementInstance.cpp:
2452 (WebCore::SVGElementInstance::childNodes):
2453 * svg/SVGElementInstanceList.cpp:
2454 (WebCore::SVGElementInstanceList::SVGElementInstanceList):
2455 * svg/SVGElementInstanceList.h:
2456 (WebCore::SVGElementInstanceList::create):
2457 * svg/SVGFitToViewBox.cpp:
2458 (WebCore::SVGFitToViewBox::SVGFitToViewBox):
2459 * svg/SVGGradientElement.cpp:
2460 (WebCore::SVGGradientElement::SVGGradientElement):
2461 (WebCore::SVGGradientElement::canvasResource):
2462 * svg/SVGImageElement.cpp:
2463 (WebCore::SVGImageElement::SVGImageElement):
2464 * svg/SVGLengthList.h:
2465 (WebCore::SVGLengthList::create):
2467 (WebCore::SVGList::SVGList):
2468 (WebCore::SVGPODListItem::create):
2469 (WebCore::SVGPODListItem::copy):
2470 (WebCore::SVGPODListItem::SVGPODListItem):
2471 (WebCore::SVGPODList::initialize):
2472 (WebCore::SVGPODList::insertItemBefore):
2473 (WebCore::SVGPODList::replaceItem):
2474 (WebCore::SVGPODList::appendItem):
2475 (WebCore::SVGPODList::SVGPODList):
2476 * svg/SVGMarkerElement.cpp:
2477 (WebCore::SVGMarkerElement::canvasResource):
2478 * svg/SVGMaskElement.cpp:
2479 (WebCore::SVGMaskElement::canvasResource):
2480 * svg/SVGNumberList.h:
2481 (WebCore::SVGNumberList::create):
2482 * svg/SVGPathElement.cpp:
2483 (WebCore::SVGPathElement::createSVGPathSegClosePath):
2484 (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
2485 (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
2486 (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
2487 (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
2488 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
2489 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
2490 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
2491 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
2492 (WebCore::SVGPathElement::createSVGPathSegArcAbs):
2493 (WebCore::SVGPathElement::createSVGPathSegArcRel):
2494 (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
2495 (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
2496 (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
2497 (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
2498 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
2499 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
2500 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
2501 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
2502 (WebCore::SVGPathElement::pathSegList):
2503 * svg/SVGPathElement.h:
2505 (WebCore::SVGPathSeg::SVGPathSeg):
2506 * svg/SVGPathSegArc.h:
2507 (WebCore::SVGPathSegArcAbs::create):
2508 (WebCore::SVGPathSegArcRel::create):
2509 * svg/SVGPathSegClosePath.h:
2510 (WebCore::SVGPathSegClosePath::create):
2511 * svg/SVGPathSegCurvetoCubic.h:
2512 (WebCore::SVGPathSegCurvetoCubicAbs::create):
2513 (WebCore::SVGPathSegCurvetoCubicRel::create):
2514 * svg/SVGPathSegCurvetoCubicSmooth.h:
2515 (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
2516 (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
2517 * svg/SVGPathSegCurvetoQuadratic.h:
2518 (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
2519 (WebCore::SVGPathSegCurvetoQuadraticRel::create):
2520 * svg/SVGPathSegCurvetoQuadraticSmooth.h:
2521 (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
2522 (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
2523 * svg/SVGPathSegLineto.h:
2524 (WebCore::SVGPathSegLinetoAbs::create):
2525 (WebCore::SVGPathSegLinetoRel::create):
2526 * svg/SVGPathSegLinetoHorizontal.h:
2527 (WebCore::SVGPathSegLinetoHorizontalAbs::create):
2528 (WebCore::SVGPathSegLinetoHorizontalRel::create):
2529 * svg/SVGPathSegLinetoVertical.h:
2530 (WebCore::SVGPathSegLinetoVerticalAbs::create):
2531 (WebCore::SVGPathSegLinetoVerticalRel::create):
2532 * svg/SVGPathSegList.h:
2533 (WebCore::SVGPathSegList::create):
2534 * svg/SVGPathSegMoveto.h:
2535 (WebCore::SVGPathSegMovetoAbs::create):
2536 (WebCore::SVGPathSegMovetoRel::create):
2537 * svg/SVGPatternElement.cpp:
2538 (WebCore::SVGPatternElement::SVGPatternElement):
2539 (WebCore::SVGPatternElement::canvasResource):
2540 * svg/SVGPointList.h:
2541 (WebCore::SVGPointList::create):
2542 * svg/SVGPolyElement.cpp:
2543 (WebCore::SVGPolyElement::points):
2544 * svg/SVGPreserveAspectRatio.cpp:
2545 (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
2546 * svg/SVGPreserveAspectRatio.h:
2547 (WebCore::SVGPreserveAspectRatio::create):
2548 * svg/SVGRenderingIntent.h:
2549 (WebCore::SVGRenderingIntent::SVGRenderingIntent):
2550 * svg/SVGStringList.h:
2551 (WebCore::SVGStringList::create):
2552 * svg/SVGStyledTransformableElement.cpp:
2553 (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
2555 (WebCore::SVGTests::requiredFeatures):
2556 (WebCore::SVGTests::requiredExtensions):
2557 (WebCore::SVGTests::systemLanguage):
2558 * svg/SVGTextElement.cpp:
2559 (WebCore::SVGTextElement::SVGTextElement):
2560 * svg/SVGTextPositioningElement.cpp:
2561 (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
2562 * svg/SVGTransformList.h:
2563 (WebCore::SVGTransformList::create):
2564 * svg/SVGUnitTypes.h:
2565 (WebCore::SVGUnitTypes::SVGUnitTypes):
2566 * svg/SVGViewElement.cpp:
2567 (WebCore::SVGViewElement::viewTarget):
2568 * svg/SVGViewSpec.cpp:
2569 (WebCore::SVGViewSpec::SVGViewSpec):
2570 * svg/graphics/SVGPaintServer.cpp:
2571 (WebCore::SVGPaintServer::sharedSolidPaintServer):
2572 * svg/graphics/SVGPaintServer.h:
2573 * svg/graphics/SVGPaintServerGradient.h:
2574 (WebCore::SVGPaintServerGradient::SharedStopCache::create):
2575 (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache):
2576 * svg/graphics/SVGPaintServerLinearGradient.h:
2577 (WebCore::SVGPaintServerLinearGradient::create):
2578 * svg/graphics/SVGPaintServerPattern.h:
2579 (WebCore::SVGPaintServerPattern::create):
2580 * svg/graphics/SVGPaintServerRadialGradient.h:
2581 (WebCore::SVGPaintServerRadialGradient::create):
2582 * svg/graphics/SVGPaintServerSolid.h:
2583 (WebCore::SVGPaintServerSolid::create):
2584 * svg/graphics/SVGResource.cpp:
2585 (WebCore::SVGResource::SVGResource):
2586 * svg/graphics/SVGResource.h:
2587 * svg/graphics/SVGResourceClipper.h:
2588 (WebCore::SVGResourceClipper::create):
2589 * svg/graphics/SVGResourceMarker.h:
2590 (WebCore::SVGResourceMarker::create):
2591 * svg/graphics/SVGResourceMasker.h:
2592 (WebCore::SVGResourceMasker::create):
2593 * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
2594 (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache):
2596 2008-02-20 Darin Adler <darin@apple.com>
2600 - make conversion from CSS ParseString to String and AtomicString
2601 automatic and remove all the explicit calls to do the conversion
2603 - fix CSS parsing to do fewer allocations, mostly by using the
2604 equalIgnoringCase function in CSSParser
2606 * css/CSSGrammar.y: Take out all the explicit atomicString and
2607 domString calls now that ParseString knows how to convert itself.
2609 * css/CSSParser.cpp:
2610 (WebCore::equal): Added.
2611 (WebCore::equalIgnoringCase): Allow non-lettters.
2612 (WebCore::ParseString::lower): Used charactersAreAllASCII.
2613 (WebCore::unitFromString): Use equal.
2614 (WebCore::CSSParser::parseValue): Removed unneeded call to domString.
2615 (WebCore::CSSParser::parseContent): Use equalIgnoringCase.
2616 (WebCore::CSSParser::parseBackgroundImage): Removed unneeded call to domString.
2617 (WebCore::CSSParser::parseTransitionTimingFunction): Use equalIgnoringCase.
2618 (WebCore::CSSParser::parseDashboardRegions): More of the same.
2619 (WebCore::CSSParser::parseCounterContent): Ditto.
2620 (WebCore::CSSParser::parseShape): Use equalIgnoringCase.
2621 (WebCore::CSSParser::parseFontFamily): Removed unneeded calls to domString.
2622 (WebCore::CSSParser::parseFontFaceSrc): More.
2623 (WebCore::CSSParser::parseFontFaceUnicodeRange): More.
2624 (WebCore::CSSParser::parseColor): Don't lowercase here -- setNamedColor now
2625 handles the case folding.
2626 (WebCore::CSSParser::parseColorFromValue): More.
2627 (WebCore::CSSParser::parseBorderImage): More.
2628 (WebCore::CSSParser::parseCounter): More.
2629 (WebCore::TransformOperationInfo::TransformOperationInfo): More.
2630 (WebCore::CSSParser::parseTransform): More.
2631 (WebCore::CSSParser::createCharsetRule): More.
2632 (WebCore::CSSParser::createImportRule): More.
2634 * css/CSSParser.h: Removed domString and atomicString functions.
2635 (WebCore::ParseString::operator String): Added. Allows conversion to String
2636 without an explicit function call.
2637 (WebCore::ParseString::operator AtomicString): Ditto.
2639 * css/MediaQueryExp.cpp:
2640 (WebCore::MediaQueryExp::MediaQueryExp): Removed a call to domString.
2641 * css/SVGCSSParser.cpp:
2642 (WebCore::CSSParser::parseSVGValue): Removed calls to domString.
2644 * platform/graphics/Color.cpp:
2645 (WebCore::findNamedColor): Call toASCIILower on each character as we copy
2646 it into the 8-bit character buffer to make the operation fold case.
2648 2008-02-20 Justin Garcia <justin.garcia@apple.com>
2650 Reviewed by Darin Adler.
2652 <rdar://problem/5694920> Typing (esp. deleting) is slower due to TOT WebCore changes
2654 * editing/DeleteSelectionCommand.cpp:
2655 (WebCore::DeleteSelectionCommand::initializeStartEnd): The common case here
2656 is where there are no special elements. Avoid creating VisiblePositions in
2657 that case. Additionally, this change postpones the more expensive creation
2658 of an upstream VisiblePosition until the last possible moment.
2659 (WebCore::DeleteSelectionCommand::saveTypingStyleState):
2660 (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Add an
2661 early return for a common case: deleting characters that are all inside the
2662 same text node. In that case the style at the start of the selection will
2663 not change during the delete, so there is no need to save/recompute it.
2664 (WebCore::DeleteSelectionCommand::saveFullySelectedAnchor): Early return
2665 before VisiblePosition creation if the ends of the selection aren't enclosed
2667 * editing/TypingCommand.cpp:
2668 (WebCore::TypingCommand::markMisspellingsAfterTyping): Early return if spell
2669 checking isn't enabled.
2671 2008-02-20 Alexey Proskuryakov <ap@webkit.org>
2673 Incorporates some improvements made by Dan Bernstein.
2677 http://bugs.webkit.org/show_bug.cgi?id=17106
2678 <rdar://problem/5750722> Debug build ASSERTs on page load
2680 Test: fast/encoding/GBK/close-gbk-converter.html
2682 * platform/text/TextCodecICU.cpp:
2683 (WebCore::getGbkEscape): Changed to use a switch instead of a HashMap, as there
2684 are only four values.
2685 (WebCore::gbkCallbackEscape): Check the reason why the function is called, and do not attempt
2686 getting an escape character if it's not UCNV_UNASSIGNED.
2687 (WebCore::gbkCallbackSubstitute): Ditto.
2689 2008-02-20 Alexey Proskuryakov <ap@webkit.org>
2693 * xml/XMLHttpRequest.cpp:
2694 (WebCore::isSafeRequestHeader):
2695 (WebCore::XMLHttpRequest::setRequestHeader):
2697 2008-02-20 Alexey Proskuryakov <ap@webkit.org>
2701 <rdar://problem/5749455> Unable to set the Referer header in Dashboard using XMLHttpRequest
2703 Cannot be tested in DRT.
2705 * xml/XMLHttpRequest.cpp: (WebCore::canSetRequestHeader): Assume that a request that can load
2706 local files can also set any headers.
2708 2008-02-19 Darin Adler <darin@apple.com>
2712 - removed use of DeprecatedString for font family names
2714 * css/CSSFontSelector.cpp:
2715 (WebCore::CSSFontSelector::addFontFaceRule): Update for name change.
2716 * css/CSSParser.cpp:
2717 (WebCore::CSSParser::parseFontFamily): Update to use new appendSpaceSeparated
2718 function and String rather than DeprecatedString.
2719 * css/CSSStyleSelector.cpp:
2720 (WebCore::CSSStyleSelector::applyProperty): Updated for name change.
2721 * css/FontFamilyValue.cpp:
2722 (WebCore::FontFamilyValue::FontFamilyValue): Replaced code using a regular
2723 expression with code that does the same thing more efficiently.
2724 (WebCore::FontFamilyValue::appendSpaceSeparated): Added.
2725 (WebCore::FontFamilyValue::cssText): Updated for name change.
2726 * css/FontFamilyValue.h: Changed DeprecatedString to String. Renamed fontName
2727 to familyName and parsedFontName to m_familyName. Removed unused genericFamilyType
2728 and m_genericFamilyType. Added appendSpaceSeparated so that m_familyName can
2729 be private instead of public.
2731 2008-02-19 Darin Adler <darin@apple.com>
2733 - fix build when SVG is not enabled
2735 * rendering/RenderTreeAsText.cpp: Added include of "TextStream.h".
2737 2008-02-19 Anders Carlsson <andersca@apple.com>
2741 Change all classes in xml/ to start out with a ref count of 1.
2743 * bindings/js/JSCustomXPathNSResolver.h:
2744 * bindings/js/JSXMLHttpRequest.cpp:
2745 (WebCore::JSXMLHttpRequest::JSXMLHttpRequest):
2746 * bindings/js/JSXSLTProcessor.cpp:
2747 (WebCore::JSXSLTProcessor::JSXSLTProcessor):
2748 * bindings/objc/DOMCustomXPathNSResolver.h:
2749 (WebCore::DOMCustomXPathNSResolver::create):
2750 * bindings/scripts/CodeGeneratorJS.pm:
2751 * bindings/scripts/CodeGeneratorObjC.pm:
2753 (WebCore::Document::applyXSLTransform):
2754 (WebCore::Document::createExpression):
2755 (WebCore::Document::createNSResolver):
2756 (WebCore::Document::evaluate):
2758 (WebCore::DOMParser::create):
2759 (WebCore::DOMParser::DOMParser):
2760 * xml/NativeXPathNSResolver.h:
2761 (WebCore::NativeXPathNSResolver::create):
2762 * xml/XMLHttpRequest.cpp:
2763 (WebCore::XMLHttpRequest::XMLHttpRequest):
2764 * xml/XMLHttpRequest.h:
2765 (WebCore::XMLHttpRequest::create):
2766 * xml/XMLSerializer.h:
2767 (WebCore::XMLSerializer::create):
2768 (WebCore::XMLSerializer::XMLSerializer):
2769 * xml/XPathEvaluator.cpp:
2770 (WebCore::XPathEvaluator::createNSResolver):
2771 * xml/XPathEvaluator.h:
2772 (WebCore::XPathEvaluator::create):
2773 (WebCore::XPathEvaluator::XPathEvaluator):
2774 * xml/XPathExpression.cpp:
2775 (WebCore::XPathExpression::createExpression):
2776 (WebCore::XPathExpression::evaluate):
2777 * xml/XPathExpression.h:
2778 (WebCore::XPathExpression::create):
2779 (WebCore::XPathExpression::XPathExpression):
2780 * xml/XPathNSResolver.h:
2781 * xml/XPathResult.cpp:
2782 (WebCore::XPathResult::XPathResult):
2783 * xml/XPathResult.h:
2784 (WebCore::XPathResult::create):
2785 * xml/XPathValue.cpp:
2786 (WebCore::XPath::Value::modifiableNodeSet):
2788 (WebCore::XPath::ValueData::create):
2789 (WebCore::XPath::ValueData::ValueData):
2790 (WebCore::XPath::Value::Value):
2791 * xml/XSLTProcessor.h:
2792 (WebCore::XSLTProcessor::create):
2793 (WebCore::XSLTProcessor::XSLTProcessor):
2795 2008-02-19 Darin Adler <darin@apple.com>
2799 - Trimmed down TextStream and weaned it from DeprecatedString.
2801 * page/mac/WebCoreFrameBridge.mm:
2802 (-[WebCoreFrameBridge renderTreeAsExternalRepresentation]):
2803 Removed now-unneeded call to getNSString.
2805 * platform/text/TextStream.cpp: Removed unused functions.
2806 Use snprintf instead of sprintf, for better security.
2807 (WebCore::TextStream::release): Added.
2808 * platform/text/TextStream.h: Removed lots of unneeded stuff.
2810 * rendering/RenderTreeAsText.cpp:
2811 (WebCore::externalRepresentation): Changed to use String instead
2812 of DeprecatedString.
2813 * rendering/RenderTreeAsText.h: Ditto.
2815 * rendering/SVGRenderTreeAsText.cpp:
2816 (WebCore::writeSVGInlineTextBox): Use "\n" instead of endl.
2817 (WebCore::write): Ditto.
2818 (WebCore::writeRenderResources): Ditto.
2820 2008-02-19 Justin Garcia <justin.garcia@apple.com>
2822 Reviewed by Darin Adler.
2824 <rdar://problem/5694920> Typing (esp. deleting) is slower due to TOT WebCore changes
2826 This brings performance on the phone back to old levels. Andre and I are doing
2827 some formal testing to see exactly where we stand.
2830 (WebCore::enclosingBlockIgnoringEditability): Added. This is enclosingBlock
2831 without the expensive editability checks. upstream and downstream can avoid
2832 those because they do their own editability checking.
2833 (WebCore::Position::upstream):
2834 (WebCore::Position::downstream):
2836 2008-02-19 Chris Fleizach <cfleizach@apple.com>
2840 <rdar://problem/3663560> AXLink for a "name" (anchor) on same page should include an AXLinkedUIElementAttribute
2842 * bridge/mac/WebCoreAXObject.mm:
2843 (-[WebCoreAXObject linkedUIElement]):
2844 Returns the linked-to AX object (if the specified one is ignored by accessibility, returns the next un-ignored one by traversing the DOM).
2846 (-[WebCoreAXObject accessibilityAttributeNames]):
2847 (-[WebCoreAXObject accessibilityAttributeValue:]):
2848 Support NSAccessibilityLinkedUIElementsAttribute.
2850 2008-02-19 Darin Adler <darin@apple.com>
2854 - Removed old debugging aids, Node::dump, RenderObject::dump, and
2855 RenderObject::information, that used DeprecatedString.
2857 * dom/CharacterData.cpp: Removed override of Node::dump.
2858 * dom/CharacterData.h: Ditto.
2859 * dom/Element.cpp: Ditto.
2860 * dom/Element.h: Ditto.
2861 * dom/EventTargetNode.cpp: Ditto.
2862 * dom/EventTargetNode.h: Ditto.
2863 * dom/Node.cpp: Removed Node::dump.
2864 * dom/Node.h: Ditto.
2866 * rendering/RenderBlock.cpp: Removed override of RenderObject::dump.
2867 * rendering/RenderBlock.h: Ditto.
2868 * rendering/RenderFrameSet.cpp: Ditto.
2869 * rendering/RenderFrameSet.h: Ditto.
2870 * rendering/RenderObject.cpp: Removed RenderObject::dump and
2871 RenderObject::information.
2872 * rendering/RenderObject.h: Ditto.
2873 * rendering/RenderTable.cpp: Removed override of RenderObject::dump.
2874 * rendering/RenderTable.h: Ditto.
2875 * rendering/RenderTableCell.cpp: Ditto.
2876 * rendering/RenderTableCell.h: Ditto.
2877 * rendering/RenderTableCol.cpp: Ditto.
2878 * rendering/RenderTableCol.h: Ditto.
2879 * rendering/RenderTableSection.cpp: Ditto.
2880 * rendering/RenderTableSection.h: Ditto.
2882 * rendering/RenderTreeAsText.h: Removed unneeded include of TextStream.h
2883 and added forward declarations as appropriate.
2885 * svg/SVGSVGElement.cpp: Removed unneeded include of TextStream.h.
2886 * svg/graphics/SVGResourceClipper.cpp: And here.
2887 * svg/graphics/SVGResourceFilter.cpp: Ditto.
2888 * svg/graphics/filters/SVGFEBlend.cpp: Ditto.
2889 * svg/graphics/filters/SVGFEComponentTransfer.cpp: Ditto.
2890 * svg/graphics/filters/SVGFEComposite.cpp: Ditto.
2891 * svg/graphics/filters/SVGFEDiffuseLighting.cpp: Ditto.
2892 * svg/graphics/filters/SVGFEGaussianBlur.cpp: Ditto.
2893 * svg/graphics/filters/SVGFEImage.cpp: Ditto.
2894 * svg/graphics/filters/SVGFEMerge.cpp: Ditto.
2895 * svg/graphics/filters/SVGFEMorphology.cpp: Ditto.
2896 * svg/graphics/filters/SVGFEOffset.cpp: Ditto.
2897 * svg/graphics/filters/SVGFESpecularLighting.cpp: Ditto.
2898 * svg/graphics/filters/SVGFETurbulence.cpp: Ditto.
2899 * svg/graphics/filters/SVGFilterEffect.cpp: Ditto.
2901 2008-02-19 Beth Dakin <bdakin@apple.com>
2905 Fix for <rdar://problem/5729674> Seed: Crash in
2906 RenderButton::setStyle at http://www.dinorpg.com
2908 Inputs should not honor first-letter.
2910 * rendering/RenderBlock.cpp:
2911 (WebCore::RenderBlock::updateFirstLetter):
2913 2008-02-19 Dan Bernstein <mitz@apple.com>
2915 Reviewed by Darin Adler.
2917 - fix <rdar://problem/5637569> CrashTracer: [REGRESSION] 620 crashes in Safari at com.apple.WebCore: WebCore::RenderBox::setStaticY + 15
2919 Test: fast/text/wbr-styled.html
2921 Changed RenderWordBreak to inherit from RenderText instead of
2924 * rendering/RenderBlock.cpp:
2925 (WebCore::RenderBlock::calcInlinePrefWidths):
2926 * rendering/RenderFlow.h:
2927 * rendering/RenderText.cpp:
2928 (WebCore::RenderText::renderName):
2929 (WebCore::RenderText::isTextFragment):
2930 (WebCore::RenderText::isWordBreak):
2931 * rendering/RenderText.h:
2932 * rendering/RenderWordBreak.cpp:
2933 (WebCore::RenderWordBreak::RenderWordBreak):
2934 * rendering/RenderWordBreak.h:
2935 * rendering/bidi.cpp:
2936 (WebCore::RenderBlock::findNextLineBreak):
2938 2008-02-19 Anders Carlsson <andersca@apple.com>
2943 * loader/mac/LoaderNSURLExtras.h:
2944 * loader/mac/LoaderNSURLExtras.m:
2945 Move unused functions to WebKit (where they are used)
2947 (vectorContainsString):
2948 Use const references.
2950 * platform/mac/WebCoreSystemInterface.h:
2951 * platform/mac/WebCoreSystemInterface.mm:
2952 Remove wkNSURLProtocolClassForReqest.
2954 2008-02-19 Justin Garcia <justin.garcia@apple.com>
2956 Reviewed by Darin Adler.
2958 <rdar://problem/5694920> Typing (esp. deleting) is slower due to TOT WebCore
2960 These changes bring deleting performance back to old levels on the phone
2961 except for deleting the first space to the right of a word, which we are
2965 (WebCore::Position::upstream): Avoid the use of enclosingBlock when determining
2966 if we have left the original enclosing block or entered a new one, and avoid
2967 rootEditableElement for determining if we have changed editability. These
2968 operations are expensive.
2969 (WebCore::Position::downstream): Ditto.
2971 2008-02-19 Darin Adler <darin@apple.com>
2973 Rubber stamped by Anders.
2975 - removed explicit initialization to 1 for RefCounted; that's now the default
2977 * loader/ResourceLoader.cpp:
2978 (WebCore::ResourceLoader::ResourceLoader): Removed RefCounted initializer.
2979 * platform/network/ResourceHandle.cpp:
2980 (WebCore::ResourceHandle::ResourceHandle): Ditto.
2981 * platform/text/StringImpl.cpp:
2982 (WebCore::StringImpl::StringImpl): Ditto.
2984 2008-02-18 Anders Carlsson <andersca@apple.com>
2988 Make ResourceLoader and ResourceHandle start out with a refcount of 1.
2990 * loader/MainResourceLoader.cpp:
2991 (WebCore::MainResourceLoader::create):
2992 * loader/NetscapePlugInStreamLoader.cpp:
2993 (WebCore::NetscapePlugInStreamLoader::create):
2994 * loader/ResourceLoader.cpp:
2995 (WebCore::ResourceLoader::ResourceLoader):
2996 * loader/SubresourceLoader.cpp:
2997 (WebCore::SubresourceLoader::create):
2998 * platform/network/ResourceHandle.cpp:
2999 (WebCore::ResourceHandle::ResourceHandle):
3000 (WebCore::ResourceHandle::create):
3002 2008-02-19 Alp Toker <alp@atoker.com>
3004 Reviewed by Mark Rowe.
3006 http://bugs.webkit.org/show_bug.cgi?id=16863
3007 [GTK] tab focusing doesn't work
3009 GDK_MOD2_MASK doesn't always mean meta so we can't use it to identify
3012 Use GDK_META_MASK where available, otherwise do not support the meta
3013 key. This matches the behaviour of other applications.
3015 Also add a comment noting that the platform event constructors need to
3016 be kept in sync (it's not obvious that there are multiple places that
3017 check the key state).
3019 * platform/gtk/KeyEventGtk.cpp:
3020 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3021 * platform/gtk/MouseEventGtk.cpp:
3022 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3023 * platform/gtk/WheelEventGtk.cpp:
3024 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3026 2008-02-18 Brady Eidson <beidson@apple.com>
3028 Reviewed by Sam Weinig's white rhino tusk stamp
3030 SQLiteTransaction::stop() should also reset the transaction-in-progress flag in its parent SQLiteDatabase
3032 * platform/sql/SQLiteTransaction.cpp:
3033 (WebCore::SQLiteTransaction::stop):
3035 2008-02-18 Brady Eidson <beidson@apple.com>
3039 Fix for <rdar://5747529> - ObjC Exception can cause JSLock to never be released
3041 Test: platform/mac/plugins/webScriptObject-exception-deadlock.html
3043 * bindings/objc/WebScriptObject.mm:
3044 (-[WebScriptObject valueForKey:]): The line `resultObj = [super valueForKey:key]; // defaults to throwing an exception`
3045 says it all - it throws an exception. This method also happens to hold the JSLock. Problematically, when the exeception
3046 is thrown and the method exited, the JSLock is never released. Fix that without otherwise changing behavior by holding the
3047 JSLock in two individual scopes - Right before the exception and right after.
3049 2008-02-18 Darin Adler <darin@apple.com>
3053 - reduce use of DeprecatedString and memory allocations in processing of CSS
3054 - remove unnecessary double -> float -> double trip in the CSS parser
3055 - cleaned up names and structure in CSS grammar
3057 * css/CSSGrammar.y: Remove getPropertyID and getValueID. Both are now in CSSParser.cpp
3058 instead, and they now work on ParseString and String objects and don't require the caller
3059 to put the string into a char*. Gave members of the %union more sensible names, removed
3060 duplicates, and sorted into a logical order. Put the %expect back in, rather than leaving
3062 * css/CSSParser.cpp:
3063 (WebCore::equalIgnoringCase): Added.
3064 (WebCore::hasPrefix): Added.
3065 (WebCore::CSSParser::parseTransitionProperty): Changed to call the new cssPropertyID,
3066 which obviates the need to call lower() and utf8() or to allocate memory at all. Also
3067 used equalIgnoringCase rather than putting the value into a String just to compare it.
3068 (WebCore::CSSParser::lex): Replaced convertASCIIToFloat with charactersToDouble. This change
3069 along with the CSSGrammar.y change, removes the double -> float -> double round trip, and
3070 affects the result of one layout test.
3071 (WebCore::cssPropertyID): Added. Gets the property ID from the gperf hash table, but
3072 without allocating any memory.
3073 (WebCore::cssValueKeywordID): Ditto.
3074 * css/CSSParser.h: Removed declaration for deprecatedString function (now used only in
3075 CSSParser.cpp; soon to be deleted). Added cssPropertyID and cssValueKeywordID functions.
3077 * css/CSSStyleDeclaration.cpp:
3078 (WebCore::CSSStyleDeclaration::getPropertyCSSValue): Call cssPropertyID instead of propertyID.
3079 (WebCore::CSSStyleDeclaration::getPropertyValue): Ditto.
3080 (WebCore::CSSStyleDeclaration::getPropertyPriority): Ditto.
3081 (WebCore::CSSStyleDeclaration::getPropertyShorthand): Ditto.
3082 (WebCore::CSSStyleDeclaration::isPropertyImplicit): Ditto.
3083 (WebCore::CSSStyleDeclaration::setProperty): Ditto.
3084 (WebCore::CSSStyleDeclaration::removeProperty): Ditto.
3085 (WebCore::CSSStyleDeclaration::isPropertyName): Ditto.
3086 * css/CSSStyleDeclaration.h: Removed unnecessary includes, unnecessary Noncopyable boilerplate,
3087 and the getPropertyID function declaration along with its associated apology comment.
3089 * css/makevalues.pl: Generate constants instead of macros for CSS value numbers (but not an
3090 enumeration, like properties, since you rarely have any reason to handle all values, but
3091 often have a reason to handle all properties). Renamed the constant for the number of CSS
3092 value keywords from CSS_VAL_TOTAL to numCSSValueKeywords, and added maxCSSValueKeywordLength.
3094 * platform/text/String.cpp:
3095 (WebCore::charactersToDouble): Made this function more efficient by using a stack buffer
3096 rather than a CString.
3098 2008-02-18 Dan Bernstein <mitz@apple.com>
3100 Reviewed by Dave Hyatt.
3102 - fix <rdar://problem/5736225> crash in svgFontAndFaceElementForFontData on digitalstrom.org/cms
3104 Test: fast/css/font-face-multiple-remote-sources.html
3106 * css/CSSFontFace.cpp:
3107 (WebCore::CSSFontFace::fontLoaded):
3108 * css/CSSSegmentedFontFace.cpp:
3109 (WebCore::CSSSegmentedFontFace::fontLoaded):
3111 2008-02-18 Darin Adler <darin@apple.com>
3115 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3116 (WebCore::hasCSSPropertyNamePrefix): Added.
3117 (WebCore::cssPropertyName): Reimplement to not use DeprecatedString. Also made faster
3118 by using a Vector<UChar> and eliminating all the string operations.
3120 2008-02-18 Stephanie Lewis <slewis@apple.com>
3124 Remove workaround for <rdar://problem/5695848>.
3126 * platform/network/cf/ResourceResponseCFNet.cpp:
3127 (WebCore::ResourceResponse::doUpdateResourceResponse):
3129 2008-02-18 Samuel Weinig <sam@webkit.org>
3131 Reviewed by Geoff Garen.
3133 Fix for http://bugs.webkit.org/show_bug.cgi?id=17419
3134 Remove CompatMode from JavaScriptCore as it is never set to anything other than NativeMode
3136 * bindings/js/kjs_proxy.cpp:
3137 (WebCore::KJSProxy::initScript):
3139 2008-02-18 Alp Toker <alp@atoker.com>
3141 Reviewed by Mark Rowe.
3143 http://bugs.webkit.org/show_bug.cgi?id=17381
3144 [CURL] Regression: data URL parsing broken after DeprecatedString removal (Acid2)
3146 This patch resolves the regression for the GTK+ port.
3148 * platform/network/curl/ResourceHandleManager.cpp:
3149 (WebCore::parseDataUrl):
3151 2008-02-18 Darin Adler <darin@apple.com>
3155 * platform/network/win/ResourceHandleWin.cpp:
3156 (WebCore::ResourceHandle::onHandleCreated): Use String instead of DeprecatedString.
3157 (WebCore::ResourceHandle::start): Ditto.
3159 2008-02-18 Darin Adler <darin@apple.com>
3163 * platform/network/win/CookieJarWin.cpp:
3164 (WebCore::setCookies): Use String instead of DeprecatedString.
3165 (WebCore::cookies): Ditto.
3167 2008-02-18 Darin Adler <darin@apple.com>
3171 - removed use of DeprecatedString in the Color class
3173 * platform/graphics/Color.cpp:
3174 (WebCore::Color::parseHexColor): Streamlined logic a bit with early returns.
3175 Used toASCIIHexValue a character at a time rather than using toIntStrict
3177 (WebCore::findNamedColor): Added. Uses a fixed-size char buffer to look up
3178 a color using the gperf-generated findColor function. Saves a memory allocation
3179 vs. the old version that called DeprecatedString::latin1().
3180 (WebCore::Color::setNamedColor): Changed to use findNamedColor.
3182 2008-02-18 Darin Adler <darin@apple.com>
3186 * editing/htmlediting.cpp:
3187 (WebCore::stringWithRebalancedWhitespace): Changed to use String instead of
3190 2008-02-18 Darin Adler <darin@apple.com>
3194 * editing/SelectionController.cpp:
3195 (WebCore::SelectionController::debugRenderer): Changed to use String instead of
3198 2008-02-18 Darin Adler <darin@apple.com>
3200 Reviewed and landed by Sam.
3202 Remove DeprecatedStringList.
3206 * WebCore.vcproj/WebCore.vcproj:
3207 * WebCore.xcodeproj/project.pbxproj:
3208 * WebCoreSources.bkl:
3209 * editing/markup.cpp:
3210 * platform/DeprecatedStringList.cpp: Removed.
3211 * platform/DeprecatedStringList.h: Removed.
3212 * platform/mac/DeprecatedStringListMac.mm: Removed.
3214 2008-02-18 Darin Adler <darin@apple.com>
3218 * css/CSSPrimitiveValueMappings.h: Add default cases to all the switch statements.
3219 This will ease the way some day if we decide to use an enum instead of int; otherwise
3220 we'll have a ton of "unhandled enum value" warnings here.
3222 2008-02-18 Alp Toker <alp@atoker.com>
3224 Build fix for GTK+ < 2.10. Fall back to simple text clipboard copy
3225 with older GTK+ versions for now.
3227 * platform/gtk/PasteboardGtk.cpp:
3228 (WebCore::Pasteboard::writeSelection):
3230 2008-02-18 Darin Adler <darin@apple.com>
3234 * WebCore.base.exp: Export a couple of WebCore::String functions we plan to use
3235 in the future in WebKit.
3237 2008-02-18 Darin Adler <darin@apple.com>
3241 * DerivedSources.make: Added the scripts to the ENABLE_SVG versions of the rules
3242 for CSSPropertyNames.h and CSSValueKeywords.h. Somehow that got left out, so the
3243 files would not be regenerated if the scripts were changed (but would if SVG was
3246 2008-02-18 Alexey Proskuryakov <ap@webkit.org>
3250 * platform/KURL.h: (WebCore::KURL::operator const String&): Added, to avoid unexpected
3251 conversion via UString (as in bug 17418).
3253 2008-02-18 Jon Honeycutt <jhoneycutt@apple.com>
3257 <rdar://problem/5744899> Crash in Flash when clicking "Yes" to abort
3258 slow script Flash 9 dialog at http://www.kidzui.com
3260 When navigating to a new page, we stop all outstanding PluginStreams.
3261 Flash hangs in the call to NPP_URLNotify. It eventually displays the
3262 "slow script" dialog, which relinquishes control to the system. While
3263 this dialog is running, the request we are in the process of cancelling
3264 completes, and we re-enter Flash to deliver the data. When the dialog
3265 is dismissed, the internal state of Flash has changed, and Flash
3266 crashes with a null dereference.
3268 To work around this, we can defer loading before entering plug-in code,
3269 so that even if a plug-in yields to the system, we won't get callbacks
3270 while we're handling a callback.
3272 * plugins/PluginStream.cpp:
3273 (WebCore::PluginStream::startStream): Defers loads while calling into
3275 (WebCore::PluginStream::destroyStream): Same.
3276 (WebCore::PluginStream::deliverData): Same.
3277 (WebCore::PluginStream::didFail): Protect 'this' from deletion by
3278 destroyStream. Null out m_loader only after destroyStream returns.
3279 (WebCore::PluginStream::didFinishLoading): Same.
3281 2008-02-18 Alexey Proskuryakov <ap@webkit.org>
3285 http://bugs.webkit.org/show_bug.cgi?id=17418
3286 REGRESSION: Assertion failure dragging image (JSLock::lockCount() > 0)
3288 * platform/win/ClipboardWin.cpp:
3289 (WebCore::ClipboardWin::declareAndWriteDragImage): Explicitly convert from KURL to String,
3290 as an implicit conversion uses UString and thus needs a JSLock.
3292 2008-02-17 Sam Weinig <sam@webkit.org>
3296 * loader/FrameLoader.cpp:
3297 (WebCore::FrameLoader::changeLocation):
3299 2008-02-17 Sam Weinig <sam@webkit.org>
3303 * WebCore.xcodeproj/project.pbxproj:
3305 2008-02-17 Alp Toker <alp@atoker.com>
3307 Attempt to fix the Wx build (has been broken all weekend).
3309 Stub out some graphics functions.
3311 * platform/graphics/wx/GraphicsContextWx.cpp:
3312 (WebCore::GraphicsContext::beginPath):
3313 (WebCore::GraphicsContext::addPath):
3314 * platform/graphics/wx/PathWx.cpp:
3315 (WebCore::Path::isEmpty):
3317 2008-02-17 Julien Chaffraix <julien.chaffraix@gmail.com>
3319 Reviewed by Alexey Proskuryakov.
3321 http://bugs.webkit.org/show_bug.cgi?id=16989
3322 bug 16989 : Add send() flag checks in XmlHttpRequest
3324 Splitted XmlHttpRequest::abort into abort (called from JavaScript) and internalAbort that
3325 perform the cancellation and is called mainly from internal methods.
3327 Tests: http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html
3328 http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html
3329 http/tests/xmlhttprequest/xmlhttprequest-test-send-flag.html
3331 * xml/XMLHttpRequest.cpp:
3332 (WebCore::XMLHttpRequest::open): Now call internalAbort() and moved readyState change into method
3333 (WebCore::XMLHttpRequest::send): Added m_loader check
3334 (WebCore::XMLHttpRequest::abort): Now update readyState and clear the request headers as specified
3337 (WebCore::XMLHttpRequest::internalAbort): Perform cancellation internal operations (no readyState update)
3338 (WebCore::XMLHttpRequest::setRequestHeader): Added m_loader check
3340 (WebCore::XMLHttpRequest::processSyncLoadResults): Now call internalAbort() instead of abort()
3341 (WebCore::XMLHttpRequest::willSendRequest): Ditto
3342 (WebCore::XMLHttpRequest::cancelRequests): Ditto
3343 (WebCore::XMLHttpRequest::detachRequests): Ditto
3344 * xml/XMLHttpRequest.h: Added the private internalAbort method
3346 2008-02-17 Sam Weinig <sam@webkit.org>
3348 Reviewed by Dan Bernstein.
3350 Fix for http://bugs.webkit.org/show_bug.cgi?id=17365
3351 document.createEvent("MessageEvent") throws NOT_SUPPORTED_ERR
3353 - Updated fast/events/event-instanceof.html to test document.createEvent("MessageEvent").
3355 * DerivedSources.make:
3356 Generate Objective-C binding for DOMProgressEvent which was missing.
3358 * WebCore.xcodeproj/project.pbxproj:
3359 Add missing DOMProgressEvent files to the project.
3361 * bindings/js/JSEventCustom.cpp:
3363 Clean up and add case for SVGZoomEvent that was missing.
3365 * bindings/objc/DOMEvents.mm:
3366 (+[DOMEvent _wrapEvent:WebCore::]):
3367 Clean up and add cases for ProgressEvent and MessageEvent that were missing.
3370 (WebCore::Document::createEvent):
3371 Add case for MessageEvent.
3373 2008-02-17 Adam Treat <treat@kde.org>
3375 Reviewed by Eric Seidel.
3377 http://bugs.webkit.org/show_bug.cgi?id=17008
3378 Meta refresh does not work with cache turned off
3380 Fix for issue noticed on http://adserver.vivox.com/2
3382 * loader/FrameLoader.cpp:
3383 (WebCore::FrameLoader::changeLocation):
3385 2008-02-17 Alp Toker <alp@atoker.com>
3387 Reviewed by Sam Weinig.
3389 Fix for change made in r30355. Issue noticed by İsmail Dönmez.
3391 Verify SSL certs by default, but allow checks to be disabled with an
3392 environment variable (WEBKIT_IGNORE_SSL_ERRORS) for now.
3394 * platform/network/curl/ResourceHandleManager.cpp:
3395 (WebCore::ResourceHandleManager::startJob):
3397 2008-02-17 Bin Chen <binary.chen@gmail.com>
3399 Reviewed by Alp Toker.
3401 http://bugs.webkit.org/show_bug.cgi?id=17404
3402 Bug 17404: curl certification problem
3404 Disable SSL cert verification until we have a way of distributing
3405 certs and/or reporting SSL errors to the user.
3407 * platform/network/curl/ResourceHandleManager.cpp:
3408 (WebCore::ResourceHandleManager::startJob):
3410 2008-02-17 Alp Toker <alp@atoker.com>
3412 Reviewed by Mark Rowe.
3414 DevHelp fails to load local files; URL truncated by one character.
3416 Fix a file:// URL regression introduced in KURL.cpp r30243.
3418 * platform/KURL.cpp:
3419 (WebCore::KURL::KURL):
3421 2008-02-17 Dan Bernstein <mitz@apple.com>
3423 Reviewed by Darin Adler.
3425 - fix http://bugs.webkit.org/show_bug.cgi?id=17033
3426 <rdar://problem/5709315> REGRESSION: Really long <option> causes unnecessary page scroll bars to accommodate content
3428 Test: fast/forms/control-clip-overflow.html
3430 * rendering/RenderFlow.cpp:
3431 (WebCore::RenderFlow::lowestPosition): Account for control clipping.
3432 (WebCore::RenderFlow::rightmostPosition): Ditto.
3433 (WebCore::RenderFlow::leftmostPosition): Ditto.
3435 2008-02-16 Oliver Hunt <oliver@apple.com>
3439 Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
3441 Use cross-platform code to determine the dirty rects for
3442 fill and stroke operations
3444 * html/CanvasRenderingContext2D.cpp:
3445 (WebCore::CanvasRenderingContext2D::fill):
3446 (WebCore::CanvasRenderingContext2D::stroke):
3447 Added a FIXME as code inspection shows a trivial under-painting
3448 bug, although we currently ignore dirty rect tracking on canvas
3449 and repaint the whole thing anyway.
3450 (WebCore::CanvasRenderingContext2D::fillRect):
3452 2008-02-16 Sam Weinig <sam@webkit.org>
3454 Reviewed by Darin Adler.
3456 Take another step in the direction of getting rid of DeprecatedString
3457 by moving all the to{NumericType} off of it.
3459 - Create free functions that take a UChar* buffer and length to do
3460 the string-to-number conversions. This allows us to avoid two allocations
3461 if we don't already have a String and is consistent with the design we would
3463 - Since the toInt (and family) functions on DeprecatedString were slightly
3464 different than the ones on String (they didn't allow trailing garbage),
3465 an extra set of 'Strict' toInt functions were added that have this behavior.
3467 * platform/graphics/Color.cpp:
3468 (WebCore::Color::parseHexColor):
3469 * platform/text/PlatformString.h:
3470 * platform/text/String.cpp:
3471 (WebCore::String::percentage):
3472 (WebCore::String::toIntStrict):
3473 (WebCore::String::toUIntStrict):
3474 (WebCore::String::toInt64Strict):
3475 (WebCore::String::toUInt64Strict):
3476 (WebCore::String::toUInt):
3477 (WebCore::String::toDouble):
3478 (WebCore::isCharacterAllowedInBase):
3479 (WebCore::toIntegralType):
3480 (WebCore::lengthOfCharactersAsInteger):
3481 (WebCore::charactersToIntStrict):
3482 (WebCore::charactersToUIntStrict):
3483 (WebCore::charactersToInt64Strict):
3484 (WebCore::charactersToUInt64Strict):
3485 (WebCore::charactersToInt):
3486 (WebCore::charactersToUInt):
3487 (WebCore::charactersToInt64):
3488 (WebCore::charactersToUInt64):
3489 (WebCore::charactersToDouble):
3490 (WebCore::charactersToFloat):
3491 * platform/text/StringImpl.cpp:
3492 (WebCore::parseLength):
3493 (WebCore::StringImpl::toIntStrict):
3494 (WebCore::StringImpl::toUIntStrict):
3495 (WebCore::StringImpl::toInt64Strict):
3496 (WebCore::StringImpl::toUInt64Strict):
3497 (WebCore::StringImpl::toInt):
3498 (WebCore::StringImpl::toUInt):
3499 (WebCore::StringImpl::toInt64):
3500 (WebCore::StringImpl::toUInt64):
3501 (WebCore::StringImpl::toDouble):
3502 (WebCore::StringImpl::toFloat):
3503 * platform/text/StringImpl.h:
3504 * svg/SVGAnimationElement.cpp:
3505 (WebCore::SVGAnimationElement::parseClockValue):
3506 * svg/SVGFETurbulenceElement.cpp:
3507 (WebCore::SVGFETurbulenceElement::parseMappedAttribute):
3509 2008-02-16 Dan Bernstein <mitz@apple.com>
3511 Reviewed by Sam Weinig.
3513 - fix fixed-pitch font measurement of control characters that render
3516 Test: fast/text/fixed-pitch-control-characters.html
3518 * rendering/RenderText.cpp:
3519 (WebCore::RenderText::widthFromCache):
3521 2008-02-16 Kevin Ollivier <kevino@theolliviers.com>
3525 * platform/graphics/wx/GraphicsContextWx.cpp:
3526 (WebCore::GraphicsContext::drawImage):
3528 2008-02-16 Jan Michael Alonzo <jmalonzo@unpluggable.com>
3530 Reviewed by Alp Toker.
3532 Cross document messaging GTK+/autotools build fix.
3536 2008-02-15 Oliver Hunt <oliver@apple.com>
3538 Build fix for Qt and Cairo builds
3540 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3541 (WebCore::GraphicsContext::drawImage):
3542 * platform/graphics/qt/GraphicsContextQt.cpp:
3544 2008-02-15 Oliver Hunt <oliver@apple.com>
3548 Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
3549 Refactor CanvasRenderingContext2D::drawImage(HTMLCanvasElement) to remove evil ifdefs
3551 Add logic draw(ImageBuffer*) method to GraphicsContext to handle
3552 painting the source canvas content.
3554 * html/CanvasRenderingContext2D.cpp:
3555 (WebCore::CanvasRenderingContext2D::drawImage):
3556 * html/HTMLCanvasElement.cpp:
3557 (WebCore::HTMLCanvasElement::buffer):
3558 * html/HTMLCanvasElement.h:
3559 * platform/graphics/GraphicsContext.h:
3560 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3561 (WebCore::GraphicsContext::drawImage):
3562 * platform/graphics/cg/GraphicsContextCG.cpp:
3563 (WebCore::GraphicsContext::paintBuffer):
3564 (WebCore::GraphicsContext::drawImage):
3565 * platform/graphics/qt/GraphicsContextQt.cpp:
3566 (WebCore::GraphicsContext::drawImage):
3568 2008-02-15 Kevin Ollivier <kevino@theolliviers.com>
3570 Reviewed by David Hyatt.
3572 Using GetNativeFontInfoDesc() to generate the hash value was
3573 leading to duplicate entries in the HashMap. Use the font object's
3576 http://bugs.webkit.org/show_bug.cgi?id=17371
3578 * platform/graphics/wx/FontPlatformData.h:
3579 (WebCore::FontPlatformData::computeHash):
3581 2008-02-15 Ada Chan <adachan@apple.com>
3583 When parsing url we get from a CFURLRef, we need to null terminate
3584 the string for the case when url ends with a '/'.