1 2008-02-28 Mark Rowe <mrowe@apple.com>
3 Reviewed by Dave Hyatt.
5 Make use of new CGFont APIs on Leopard rather than making a WebKitSystemInterface call.
7 * DerivedSources.make: Add Tiger-only symbols to the export file when running on Tiger.
8 * WebCore.Tiger.exp: Added. Move Tiger-only symbol here from WebCore.base.exp.
10 * platform/graphics/mac/SimpleFontDataMac.mm:
11 (WebCore::SimpleFontData::platformInit): Use Leopard APIs when building on Leopard.
12 * platform/mac/WebCoreSystemInterface.h: Don't declare wkGetFontMetrics on Leopard as it is unused.
13 * platform/mac/WebCoreSystemInterface.mm: Ditto.
15 2008-02-28 Matt Lilek <webkit@mattlilek.com>
17 Reviewed by Tim Hatcher.
19 Bug 16535: Stylesheets loaded with @import are not editable
20 http://bugs.webkit.org/show_bug.cgi?id=16535
21 <rdar://problem/5712899>
23 Sheets loaded using @import were incorrectly being flagged as non-editable
24 user agent sheets because their parent sheet doesn't have an ownerNode. We now
25 check to make sure sheets also don't have a href before restricting their editability.
27 * page/inspector/StylesSidebarPane.js:
29 2008-02-28 Rodney Dawes <dobey@wayofthemonkey.com>
31 Reviewed by Adam Roben.
33 Copy PluginPackageWin.cpp to shared PluginPackage.cpp.
34 Add PluginPackage.cpp to build configurations.
35 Remove PluginPackage destructor from TemporaryLinkStubs.cpp.
36 Use cross-platform pathGetFilename method.
37 Remove platform-specific code from shared PluginPackage implementation.
38 Remove shared code from PluginPackageWin.cpp.
43 * WebCore.vcproj/WebCore.vcproj:
44 * platform/gtk/TemporaryLinkStubs.cpp:
45 * platform/qt/TemporaryLinkStubs.cpp:
46 * platform/wx/TemporaryLinkStubs.cpp:
47 * plugins/PluginPackage.cpp:
48 * plugins/win/PluginPackageWin.cpp:
50 2008-02-28 Justin Garcia <justin.garcia@apple.com>
52 Reviewed by Darin Adler.
54 <rdar://problem/4930986> REGRESSION: Paste As Quotation pastes black text instead of blue
56 Add a second style span at copy time to hold document default styles. This helps us
57 differentiate between those and user applied styles at paste time, where we'll want
58 to let Mail's Paste As Quotation blockquote override document default styles, but
61 * css/CSSComputedStyleDeclaration.cpp:
62 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed the unit type used
63 for -webkit-text-stroke-width from CSS_NUMBER to CSS_PX, to match other properties that
64 are thick | medium | thin | <length>. Before, there was a mismatch between the unit
65 type of -webkit-text-stroke-width property values in a CSSComputedStyleDeclaration for
66 an element and that element's inlineStyleDecl(), causing identical values to always appear
68 * editing/ReplaceSelectionCommand.cpp:
69 (WebCore::ReplaceSelectionCommand::handlePasteAsQuotationNode): Fixed. Don't just change
70 the class to an empty string, completely remove it, it's no longer needed.
71 (WebCore::handleStyleSpansBeforeInsertion): Moved the optimization from doApply here.
72 (WebCore::ReplaceSelectionCommand::handleStyleSpans):
73 Added, replaces removeRedundantStyles.
74 We aren't (yet) removing all redundant styles, just those on style spans, so I removed the
75 unused code and renamed the function.
76 There won't be more than two style spans that we need to consider, the one with the
77 source document's default styles and styles on the commonAncestor of the copied Range,
78 so don't look for more than two.
79 Let elements that wrap the incoming fragment override the source document's styles.
80 (WebCore::ReplaceSelectionCommand::doApply): Moved code to handleStyleSpansBeforeInsertion
81 and call the renamed handleStyleSpans.
82 * editing/ReplaceSelectionCommand.h:
84 (WebCore::removeDefaultStyles): Added. Don't add document defaults to the style span
85 that holds user applied styles, since they'll be added to their own style span.
86 (WebCore::createMarkup):
87 Add a second style span that holds just the document defaults. This lets us differentiate
88 between those and user applied styles at paste time.
89 Mail blockquotes are just another type of special element, moved their handling there. This
90 also lets paste code make assumptions about the position of the two style spans (they are
91 *always* parent-child).
93 2008-02-28 Brent Fulgham <bfulgham@gmail.com>
95 http://bugs.webkit.org/show_bug.cgi?id=17576
96 Modify RenderThemeWin to use SOFT_LINK
98 Reviewed by Adam Roben.
100 * rendering/RenderThemeWin.h: Remove unneeded library handle
101 * rendering/RenderThemeWin.cpp: Change to use SOFT_LINK
102 rather than hand-coded load library calls.
104 2008-02-28 Dan Bernstein <mitz@apple.com>
106 Reviewed by Darin Adler.
108 - fix http://bugs.webkit.org/show_bug.cgi?id=17590
109 ASSERTION FAILED: subject in jsRegExpExecute()
111 * page/mac/FrameMac.mm:
112 (WebCore::Frame::matchLabelsAgainstElement): Added an early return in
113 case the element name is empty.
115 2008-02-28 Justin Garcia <justin.garcia@apple.com>
117 Reviewed by Dan Bernstein
119 Small editing speed up.
122 (WebCore::Position::upstream): Don't check for a change in editability
123 if the current node hasn't changed.
124 (WebCore::Position::downstream): Ditto.
126 2008-02-27 Dan Bernstein <mitz@apple.com>
128 Reviewed by John Sullivan.
130 - fix <rdar://problem/5607547> Single letter surrounded by soft hyphens can disappear
132 Test: fast/text/soft-hyphen-2.html
134 * rendering/bidi.cpp:
135 (WebCore::chopMidpointsAt): Changed to iterate midpoints backwards, so
136 that if there are two midpoints at the given position, only the last one
139 2008-02-27 Dan Bernstein <mitz@apple.com>
141 Reviewed by Darin Adler.
143 - make centered text in right-to-left blocks spill over to the left
145 Test: fast/text/align-center-rtl-spill.html
147 * rendering/bidi.cpp:
148 (WebCore::RenderBlock::computeHorizontalPositionsForLine):
150 2008-02-27 Dan Bernstein <mitz@apple.com>
152 Reviewed by Darin Adler.
154 - more bidi.cpp cleanup
156 * platform/text/BidiResolver.h:
157 (WebCore::BidiCharacterRun::destroy): Added. Overridden by BidiRun .
158 (WebCore::BidiResolver<Iterator, Run>::addRun): Moved BidiState::addRun()
160 (WebCore::BidiResolver<Iterator, Run>::appendRun): Changed to use
162 (WebCore::BidiResolver<Iterator, Run>::deleteRuns): Changed to use
163 destroy(), avoiding the need to specialize this method in BidiState.
164 * rendering/bidi.cpp:
165 (WebCore::BidiRun::destroy): Removed the RenderArena parameter.
166 (WebCore::BidiState::deleteRuns): Removed now-unnecessary specialization.
167 (WebCore::BidiState::addRun): Removed now-unnecessary specialization.
168 (WebCore::RenderBlock::createLineBoxes):
169 (WebCore::RenderBlock::constructLine):
170 (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added a FIXME.
171 (WebCore::RenderBlock::computeVerticalPositionsForLine):
172 (WebCore::buildCompactRuns):
173 (WebCore::RenderBlock::layoutInlineChildren):
174 (WebCore::RenderBlock::determineStartPosition):
175 (WebCore::RenderBlock::determineEndPosition):
176 (WebCore::RenderBlock::matchedEndLine):
177 (WebCore::skipNonBreakingSpace):
178 (WebCore::RenderBlock::skipWhitespace):
179 (WebCore::shouldSkipWhitespaceAfterStartObject):
181 (WebCore::BidiRun): Added m_ prefixes to several member variables.
183 2008-02-27 Sam Weinig <sam@webkit.org>
187 Fix for <rdar://problem/5768769>
189 - Don't allow cross-origin calls using window.functionName.call(otherFrame)
192 * bindings/js/JSLocation.cpp:
193 (WebCore::jsLocationProtoFuncToString): Do same-origin check.
194 * bindings/js/kjs_window.cpp:
195 (KJS::windowProtoFuncAToB): Ditto.
196 (KJS::windowProtoFuncBToA): Ditto.
197 (KJS::windowProtoFuncOpen): Ditto.
198 (KJS::windowProtoFuncClearTimeout): Ditto.
199 * bindings/scripts/CodeGeneratorJS.pm: Ditto.
201 2008-02-27 David Hyatt <hyatt@apple.com>
203 More cleanup in preparation for fixing the HTML5 spec performance regression.
205 Reviewed by Sam Weinig
208 (WebCore::Attr::childrenChanged):
210 * dom/ContainerNode.cpp:
211 (WebCore::ContainerNode::insertBefore):
212 (WebCore::ContainerNode::replaceChild):
213 (WebCore::ContainerNode::removeChild):
214 (WebCore::ContainerNode::removeChildren):
215 (WebCore::ContainerNode::appendChild):
216 (WebCore::ContainerNode::addChild):
217 (WebCore::ContainerNode::childrenChanged):
218 * dom/ContainerNode.h:
220 (WebCore::Document::childrenChanged):
223 (WebCore::Element::childrenChanged):
226 (WebCore::Node::childrenChanged):
227 * html/HTMLObjectElement.cpp:
228 (WebCore::HTMLObjectElement::childrenChanged):
229 * html/HTMLObjectElement.h:
230 * html/HTMLOptGroupElement.cpp:
231 (WebCore::HTMLOptGroupElement::childrenChanged):
232 * html/HTMLOptGroupElement.h:
233 * html/HTMLOptionElement.cpp:
234 (WebCore::HTMLOptionElement::childrenChanged):
235 * html/HTMLOptionElement.h:
236 * html/HTMLScriptElement.cpp:
237 (WebCore::HTMLScriptElement::childrenChanged):
238 * html/HTMLScriptElement.h:
239 * html/HTMLSelectElement.cpp:
240 (WebCore::HTMLSelectElement::childrenChanged):
241 * html/HTMLSelectElement.h:
242 * html/HTMLStyleElement.cpp:
243 (WebCore::HTMLStyleElement::childrenChanged):
244 * html/HTMLStyleElement.h:
245 * html/HTMLTextAreaElement.cpp:
246 (WebCore::HTMLTextAreaElement::childrenChanged):
247 * html/HTMLTextAreaElement.h:
248 * html/HTMLTitleElement.cpp:
249 (WebCore::HTMLTitleElement::childrenChanged):
250 * html/HTMLTitleElement.h:
251 * svg/SVGClipPathElement.cpp:
252 (WebCore::SVGClipPathElement::childrenChanged):
253 * svg/SVGClipPathElement.h:
254 * svg/SVGDefinitionSrcElement.cpp:
255 (WebCore::SVGDefinitionSrcElement::childrenChanged):
256 * svg/SVGDefinitionSrcElement.h:
257 * svg/SVGFontFaceElement.cpp:
258 (WebCore::SVGFontFaceElement::childrenChanged):
259 * svg/SVGFontFaceElement.h:
260 * svg/SVGFontFaceFormatElement.cpp:
261 (WebCore::SVGFontFaceFormatElement::childrenChanged):
262 * svg/SVGFontFaceFormatElement.h:
263 * svg/SVGFontFaceSrcElement.cpp:
264 (WebCore::SVGFontFaceSrcElement::childrenChanged):
265 * svg/SVGFontFaceSrcElement.h:
266 * svg/SVGFontFaceUriElement.cpp:
267 (WebCore::SVGFontFaceUriElement::childrenChanged):
268 * svg/SVGFontFaceUriElement.h:
269 * svg/SVGGElement.cpp:
270 (WebCore::SVGGElement::childrenChanged):
272 * svg/SVGGradientElement.cpp:
273 (WebCore::SVGGradientElement::childrenChanged):
274 * svg/SVGGradientElement.h:
275 * svg/SVGMarkerElement.cpp:
276 (WebCore::SVGMarkerElement::childrenChanged):
277 * svg/SVGMarkerElement.h:
278 * svg/SVGMaskElement.cpp:
279 (WebCore::SVGMaskElement::childrenChanged):
280 * svg/SVGMaskElement.h:
281 * svg/SVGPatternElement.cpp:
282 (WebCore::SVGPatternElement::childrenChanged):
283 * svg/SVGPatternElement.h:
284 * svg/SVGStyleElement.cpp:
285 (WebCore::SVGStyleElement::childrenChanged):
286 * svg/SVGStyleElement.h:
287 * svg/SVGStyledElement.cpp:
288 (WebCore::SVGStyledElement::childrenChanged):
289 * svg/SVGStyledElement.h:
290 * svg/SVGTitleElement.cpp:
291 (WebCore::SVGTitleElement::childrenChanged):
292 * svg/SVGTitleElement.h:
293 * svg/SVGUseElement.cpp:
294 (WebCore::SVGUseElement::childrenChanged):
295 * svg/SVGUseElement.h:
297 2008-02-27 Julien Chaffraix <julien.chaffraix@gmail.com>
301 http://bugs.webkit.org/show_bug.cgi?id=17481
302 Several consecutive calls to XMLHttpRequest::open should dispatch only one readyState event
304 Test: http/tests/xmlhttprequest/xmlhttprequest-multiple-open.html
306 * xml/XMLHttpRequest.cpp:
307 (WebCore::XMLHttpRequest::open):
309 2008-02-27 Sriram Neelakandan <sriram.neelakandan@gmail.com>
311 Reviewed, tweaked and landed by ap.
313 http://bugs.webkit.org/show_bug.cgi?id=17487
314 HTMLInput mysteriously fails to work if ICU dat file is missing
316 * platform/text/TextBreakIteratorICU.cpp: (WebCore::setUpIterator): Assert that the iterator
319 2008-02-27 Adam Roben <aroben@apple.com>
321 Windows build fix after r30616
323 * platform/win/ClipboardWin.cpp:
325 2008-02-27 Nikolas Zimmermann <zimmermann@kde.org>
329 Small style cleanup, and obvious fix: SVGGElement reacted on
330 'clipPathUnits' changes, which is a funny copy&paste error.
332 * svg/SVGGElement.cpp:
333 (WebCore::SVGGElement::parseMappedAttribute):
334 (WebCore::SVGGElement::svgAttributeChanged):
335 (WebCore::SVGGElement::createRenderer):
337 2008-02-27 Nikolas Zimmermann <zimmermann@kde.org>
341 Cleanup coding style. Still on my way to fix dynamic updates of all SVG elements.
342 Currently at SVGF*. SVGDefs/DescElement don't need any dyn update fixes but cleanups.
344 * svg/SVGDefsElement.cpp:
345 (WebCore::SVGDefsElement::createRenderer):
346 * svg/SVGDefsElement.h:
347 * svg/SVGDescElement.h:
349 2008-02-26 Antti Koivisto <antti@apple.com>
353 Fix <rdar://problem/5761326>
354 REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang)
356 Generate better code with VS:
357 - Use ALWAYS_INLINE macro to guarantee versions of allowsAccessFrom() are reduced to single functions
358 - Refactor error reporting so that there is no need to construct/destruct Strings in common cases
359 - Add a separate version of the function for cases where error messages are not wanted
361 * bindings/js/JSDOMWindowCustom.cpp:
362 (WebCore::JSDOMWindow::customGetOwnPropertySlot):
363 * bindings/js/kjs_window.cpp:
364 (KJS::Window::allowsAccessFrom):
365 (KJS::Window::allowsAccessFromNoErrorMessage):
366 (KJS::Window::allowsAccessFromPrivate):
367 (KJS::Window::crossDomainAccessErrorMessage):
368 * bindings/js/kjs_window.h:
370 2008-02-26 Sam Weinig <sam@webkit.org>
372 Reviewed by Dave Hyatt.
374 - remove DeprecatedCString, DeprecatedArray, and ArrayImpl.
378 * WebCore.vcproj/WebCore.vcproj:
379 * WebCore.xcodeproj/project.pbxproj:
380 * WebCoreSources.bkl:
381 * platform/ArrayImpl.cpp: Removed.
382 * platform/ArrayImpl.h: Removed.
383 * platform/DeprecatedArray.h: Removed.
384 * platform/DeprecatedCString.cpp: Removed.
385 * platform/DeprecatedCString.h: Removed.
386 * platform/text/CString.cpp:
387 (WebCore::CString::length):
388 * platform/text/CString.h:
390 2008-02-26 David Hyatt <hyatt@apple.com>
392 Cleanup of childrenChanged in preparation for fixing the HTML5 spec slowdown.
394 Reviewed by Sam Weinig
397 (WebCore::Attr::childrenChanged):
398 * dom/ContainerNode.cpp:
399 (WebCore::ContainerNode::insertBefore):
400 (WebCore::ContainerNode::replaceChild):
401 (WebCore::ContainerNode::removeChild):
402 (WebCore::ContainerNode::removeChildren):
403 (WebCore::ContainerNode::appendChild):
404 (WebCore::ContainerNode::addChild):
405 (WebCore::ContainerNode::childrenChanged):
406 * dom/ContainerNode.h:
407 * dom/EventTargetNode.cpp:
408 (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent):
409 * dom/EventTargetNode.h:
410 * dom/NamedAttrMap.cpp:
411 (WebCore::NamedAttrMap::addAttribute):
412 (WebCore::NamedAttrMap::removeAttribute):
414 2008-02-26 Darin Adler <darin@apple.com>
418 - remove use of DeprecatedCString from Windows pasteboard code
420 * platform/win/ClipboardUtilitiesWin.cpp:
421 (WebCore::createGlobalData): Added an overload for Vector<char>.
422 Streamlined the logic a bit.
423 (WebCore::append): Added. Helper functions for appending to a
425 (WebCore::markupToCF_HTML): Rewrote to use Vector<char> instead
426 of DeprecatedCString. Also simplified the logic a bit and used
427 macros to handle the integer width.
428 (WebCore::urlToMarkup): Use Vector<UChar> instead of String.
429 (WebCore::replaceNewlinesWithWindowsStyleNewlines): Tweaked.
430 * platform/win/ClipboardUtilitiesWin.h: Update type of return
431 value from markupToCF_HTML. Did a bit of streamlining too.
432 * platform/win/ClipboardWin.cpp:
433 (WebCore::writeURL): Update for above changes.
434 (WebCore::ClipboardWin::declareAndWriteDragImage): Ditto.
435 (WebCore::ClipboardWin::writeRange): Ditto.
436 * platform/win/PasteboardWin.cpp:
437 (WebCore::Pasteboard::writeSelection): Ditto.
438 (WebCore::Pasteboard::writeURL): Ditto.
440 2008-02-26 Timothy Hatcher <timothy@apple.com>
442 Reviewed by Adam Roben.
444 <rdar://problem/5712777> REGRESSION: Arrow up/down in inspector
445 source list does not scroll when item at edge is reached (16572)
447 Use scrollIntoViewIfNeeded() instead of the hand-rolled scrollToElement
448 we were using in utilities.js.
450 * page/inspector/DocumentPanel.js: Use scrollIntoViewIfNeeded instead of scrollToElement.
451 * page/inspector/Resource.js: Ditto.
452 * page/inspector/inspector.js: Ditto.
453 * page/inspector/SourcePanel.js: Use scrollIntoViewIfNeeded instead
454 of scrollIntoView, so the source line is centered in the view if needed.
455 * page/inspector/utilities.js: Removed scrollToElement().
457 2008-02-26 David Hyatt <hyatt@apple.com>
461 http://bugs.webkit.org/show_bug.cgi?id=17485
463 Refine our behavior for empty inlines so that they work more correctly with margins/borders/padding.
464 Fixes a regression on huffingtonpost.com.
466 New tests added to fast/inline
468 * rendering/InlineFlowBox.cpp:
469 (WebCore::InlineFlowBox::computeLogicalBoxHeights):
470 (WebCore::InlineFlowBox::placeBoxesVertically):
471 (WebCore::InlineFlowBox::shrinkBoxesWithNoTextChildren):
472 * rendering/RenderFlow.cpp:
473 (WebCore::RenderFlow::calcMargins):
474 * rendering/RenderFlow.h:
475 * rendering/RenderObject.h:
476 (WebCore::RenderObject::hasHorizontalBordersPaddingOrMargin):
477 (WebCore::RenderObject::hasHorizontalBordersOrPadding):
478 * rendering/bidi.cpp:
479 (WebCore::getBorderPaddingMargin):
480 (WebCore::RenderBlock::layoutInlineChildren):
481 (WebCore::inlineFlowRequiresLineBox):
483 2008-02-26 Sam Weinig <sam@webkit.org>
487 * platform/text/PlatformString.h:
488 (WebCore::reverseFind):
490 2008-02-26 Dan Bernstein <mitz@apple.com>
492 Reviewed by Darin Adler.
494 - fix http://bugs.webkit.org/show_bug.cgi?id=17555
495 <rdar://problem/5766016> REGRESSION (r27351): Thumbnails positioned wrong on Getty Images results page
497 Test: fast/dynamic/subtree-table-cell-height.html
499 * rendering/RenderObject.cpp:
500 (WebCore::objectIsRelayoutBoundary): Exclude table cells, since their
501 height depends on their contents even if the CSS height property is
504 2008-02-25 Sam Weinig <sam@webkit.org>
506 Reviewed by Dan Bernstein.
508 Make the cleanPath function in CSSStyleSelector more efficient by using
511 * css/CSSStyleSelector.cpp:
512 (WebCore::cleanPath): Make this function work on a Vector<UChar> instead
513 of a String. Also remove unnecessary reverseFind call that could be acomplished
515 (WebCore::checkPseudoState): Remove reserveCapacity calls now that we are using
517 * platform/text/PlatformString.h:
518 (WebCore::find): Make this find generic enough that it can be used for
520 (WebCore::reverseFind): Implement reverseFind so that it can be used
521 for with a UChar* and length.
522 * platform/text/StringImpl.cpp:
523 (WebCore::StringImpl::find): Use implementation in PlatformString.cpp
524 (WebCore::StringImpl::reverseFind): Ditto,
526 2008-02-26 Satoshi Nakagawa <artension@gmail.com>
528 Reviewed by Darin. Tweaked and landed by Alexey.
530 http://bugs.webkit.org/show_bug.cgi?id=17411
531 Ideographic comma and full stop should be treated as line-breakable characters
533 Test: fast/text/line-breaks-after-ideographic-comma-or-full-stop.html
535 * platform/text/CharacterNames.h: Added ideographicComma and ideographicFullStop.
536 * rendering/break_lines.cpp: (WebCore::shouldBreakAfter): Added a workaround for an issue in
537 Unicode 5.0 that is causing this.
539 2008-02-26 MorganL <morganl.webkit@yahoo.com>
541 Reviewed by eseidel. Landed by eseidel
543 Fix improperly initialized m_isUpToDate member variable.
544 Fixs 50+ layout tests when run on Tiger.
545 http://bugs.webkit.org/show_bug.cgi?id=17549
547 * platform/network/cf/ResourceResponse.h:
548 (WebCore::ResourceResponse::ResourceResponse):
549 * platform/network/mac/ResourceResponse.h:
550 (WebCore::ResourceResponse::ResourceResponse):
552 2008-02-25 Dan Bernstein <mitz@apple.com>
554 Reviewed by Sam Weinig.
556 - fix http://bugs.webkit.org/show_bug.cgi?id=17152
557 Paragraphs indented with :first-letter and text-align CSS render incorrectly
559 Test: fast/text/apply-start-width-after-skipped-text.html
561 * rendering/bidi.cpp:
562 (WebCore::RenderBlock::findNextLineBreak): Improved the logic for when
563 to figure in the padding, border and margin before a text node when the
564 line begins inside a text node.
566 2008-02-25 Kevin Ollivier <kevino@theolliviers.com>
568 Windows build fix for wx port.
570 * loader/FTPDirectoryDocument.cpp:
572 2008-02-25 Mark Rowe <mrowe@apple.com>
576 * platform/network/cf/ResourceResponseCFNet.cpp:
577 (WebCore::ResourceResponse::platformCompare): Implement platformCompare for ResourceResponseCFNet.cpp.
579 2008-02-25 Beth Dakin <bdakin@apple.com>
583 Fixed for <rdar://problem/5760530> REGRESSION: Assertion failure in
584 Document::removePendingSheet() from r30438
586 r30438 added a call to CachedResource::error() from inside
587 Loader::didReceiveData() if a CSS file 4xxs. There was an
588 assumption in the loader, though, that either error() would be
589 called, or didFinishLoading() would be called, so some work is
590 duplicated in each. Now that we are calling an error() on files
591 that will also make it to didFinishLoading() (since they succeeded
592 in the network layer), we need to make sure we do not duplicate the
593 work. CachedCSSStyleSheet::error() calls checkNotify, which ends up
594 decrementing the document's pending style sheet counter.
595 checkNotify() was still getting called, though, through the normal
596 didFinishLoading code path, and the counter was being decremented
600 (WebCore::Loader::didFinishLoading):
601 (WebCore::Loader::didReceiveData):
603 2008-02-25 Mark Rowe <mrowe@apple.com>
605 Fix the Gtk, wx and Qt builds.
607 * GNUmakefile.am: Add new files.
608 * WebCore.pro: Ditto.
609 * WebCoreSources.bkl: Ditto.
610 * platform/network/AuthenticationChallengeBase.h: Fix up argument types.
612 2008-02-25 MorganL <morganl.webkit@yahoo.com>
614 Reviewed by Darin Adler.
616 Eliminate some #ifdefs from headers in platform/network.
617 http://bugs.webkit.org/show_bug.cgi?id=17210
621 * WebCore.vcproj/WebCore.vcproj:
622 * WebCore.xcodeproj/project.pbxproj:
623 * dom/XMLTokenizer.cpp:
624 * loader/ResourceLoader.h:
625 * platform/network/AuthenticationChallenge.cpp: Removed.
626 * platform/network/AuthenticationChallenge.h: Removed.
627 * platform/network/AuthenticationChallengeBase.cpp: Copied from platform/network/AuthenticationChallenge.cpp.
628 (WebCore::AuthenticationChallengeBase::AuthenticationChallengeBase):
629 (WebCore::AuthenticationChallengeBase::previousFailureCount):
630 (WebCore::AuthenticationChallengeBase::proposedCredential):
631 (WebCore::AuthenticationChallengeBase::protectionSpace):
632 (WebCore::AuthenticationChallengeBase::failureResponse):
633 (WebCore::AuthenticationChallengeBase::error):
634 (WebCore::AuthenticationChallengeBase::isNull):
635 (WebCore::AuthenticationChallengeBase::nullify):
636 (WebCore::AuthenticationChallengeBase::compare):
637 * platform/network/AuthenticationChallengeBase.h: Copied from platform/network/AuthenticationChallenge.h.
638 (WebCore::AuthenticationChallengeBase::platformCompare):
639 (WebCore::operator==):
640 (WebCore::operator!=):
641 * platform/network/ResourceError.cpp: Removed.
642 * platform/network/ResourceError.h: Removed.
643 * platform/network/ResourceErrorBase.cpp: Copied from platform/network/ResourceError.cpp.
644 (WebCore::ResourceErrorBase::lazyInit):
645 (WebCore::ResourceErrorBase::compare):
646 * platform/network/ResourceErrorBase.h: Copied from platform/network/ResourceError.h.
647 (WebCore::ResourceErrorBase::isNull):
648 (WebCore::ResourceErrorBase::domain):
649 (WebCore::ResourceErrorBase::errorCode):
650 (WebCore::ResourceErrorBase::failingURL):
651 (WebCore::ResourceErrorBase::localizedDescription):
652 (WebCore::ResourceErrorBase::ResourceErrorBase):
653 (WebCore::ResourceErrorBase::platformLazyInit):
654 (WebCore::ResourceErrorBase::platformCompare):
655 (WebCore::operator==):
656 * platform/network/ResourceResponseBase.cpp:
657 (WebCore::ResourceResponseBase::isHTTP):
658 (WebCore::ResourceResponseBase::url):
659 (WebCore::ResourceResponseBase::setUrl):
660 (WebCore::ResourceResponseBase::mimeType):
661 (WebCore::ResourceResponseBase::setMimeType):
662 (WebCore::ResourceResponseBase::expectedContentLength):
663 (WebCore::ResourceResponseBase::setExpectedContentLength):
664 (WebCore::ResourceResponseBase::textEncodingName):
665 (WebCore::ResourceResponseBase::setTextEncodingName):
666 (WebCore::ResourceResponseBase::suggestedFilename):
667 (WebCore::ResourceResponseBase::setSuggestedFilename):
668 (WebCore::ResourceResponseBase::httpStatusCode):
669 (WebCore::ResourceResponseBase::setHTTPStatusCode):
670 (WebCore::ResourceResponseBase::httpStatusText):
671 (WebCore::ResourceResponseBase::setHTTPStatusText):
672 (WebCore::ResourceResponseBase::httpHeaderField):
673 (WebCore::ResourceResponseBase::setHTTPHeaderField):
674 (WebCore::ResourceResponseBase::httpHeaderFields):
675 (WebCore::ResourceResponseBase::isAttachment):
676 (WebCore::ResourceResponseBase::setExpirationDate):
677 (WebCore::ResourceResponseBase::expirationDate):
678 (WebCore::ResourceResponseBase::setLastModifiedDate):
679 (WebCore::ResourceResponseBase::lastModifiedDate):
680 (WebCore::ResourceResponseBase::lazyInit):
681 (WebCore::ResourceResponseBase::compare):
682 * platform/network/ResourceResponseBase.h:
683 (WebCore::ResourceResponseBase::ResourceResponseBase):
684 (WebCore::ResourceResponseBase::platformLazyInit):
685 (WebCore::ResourceResponseBase::platformCompare):
686 (WebCore::operator==):
687 * platform/network/cf/AuthenticationCF.cpp:
688 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
689 (WebCore::AuthenticationChallenge::platformCompare):
690 * platform/network/cf/AuthenticationChallenge.h: Added.
691 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
692 (WebCore::AuthenticationChallenge::sourceHandle):
693 (WebCore::AuthenticationChallenge::cfURLAuthChallengeRef):
694 * platform/network/cf/ResourceError.h: Added.
695 (WebCore::ResourceError::ResourceError):
696 * platform/network/cf/ResourceErrorCF.cpp:
697 (WebCore::ResourceError::ResourceError):
698 (WebCore::ResourceError::platformLazyInit):
699 (WebCore::ResourceError::platformCompare):
700 (WebCore::ResourceError::operator CFStreamError):
701 * platform/network/cf/ResourceResponse.h:
702 (WebCore::ResourceResponse::ResourceResponse):
703 * platform/network/cf/ResourceResponseCFNet.cpp:
704 (WebCore::ResourceResponse::platformLazyInit):
705 * platform/network/curl/AuthenticationChallenge.h: Added.
706 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
707 * platform/network/curl/ResourceError.h: Added.
708 (WebCore::ResourceError::ResourceError):
709 * platform/network/curl/ResourceResponse.h:
710 (WebCore::ResourceResponse::ResourceResponse):
711 * platform/network/mac/AuthenticationChallenge.h: Added.
712 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
713 (WebCore::AuthenticationChallenge::sender):
714 (WebCore::AuthenticationChallenge::nsURLAuthenticationChallenge):
715 * platform/network/mac/AuthenticationMac.mm:
716 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
717 (WebCore::AuthenticationChallenge::platformCompare):
718 * platform/network/mac/ResourceError.h: Added.
719 (WebCore::ResourceError::ResourceError):
720 * platform/network/mac/ResourceErrorMac.mm:
721 (WebCore::ResourceError::platformLazyInit):
722 (WebCore::ResourceError::platformCompare):
723 * platform/network/mac/ResourceResponse.h:
724 (WebCore::ResourceResponse::ResourceResponse):
725 * platform/network/mac/ResourceResponseMac.mm:
726 (WebCore::ResourceResponse::platformLazyInit):
727 (WebCore::ResourceResponse::platformCompare):
728 * platform/network/qt/AuthenticationChallenge.h: Added.
729 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
730 * platform/network/qt/ResourceError.h: Added.
731 (WebCore::ResourceError::ResourceError):
732 * platform/network/qt/ResourceResponse.h:
733 (WebCore::ResourceResponse::ResourceResponse):
734 * xml/XSLTProcessor.cpp:
736 2008-02-25 Anders Carlsson <andersca@apple.com>
740 Move remaining render style objects over to start with a refcount of 1 and get
741 rid of DeprecatedDataRef.
743 * rendering/DataRef.h:
744 (WebCore::DataRef::operator*):
745 (WebCore::DataRef::operator->):
746 * rendering/RenderStyle.h:
747 * rendering/SVGRenderStyle.cpp:
748 (WebCore::SVGRenderStyle::SVGRenderStyle):
749 * rendering/SVGRenderStyle.h:
750 (WebCore::SVGRenderStyle::create):
751 (WebCore::SVGRenderStyle::copy):
752 * rendering/SVGRenderStyleDefs.cpp:
753 (StyleFillData::StyleFillData):
754 (StyleStrokeData::StyleStrokeData):
755 (StyleStopData::StyleStopData):
756 (StyleTextData::StyleTextData):
757 (StyleClipData::StyleClipData):
758 (StyleMaskData::StyleMaskData):
759 (StyleMarkerData::StyleMarkerData):
760 (StyleMiscData::StyleMiscData):
761 * rendering/SVGRenderStyleDefs.h:
762 (WebCore::StyleFillData::create):
763 (WebCore::StyleFillData::copy):
764 (WebCore::StyleStrokeData::create):
765 (WebCore::StyleStrokeData::copy):
766 (WebCore::StyleStopData::create):
767 (WebCore::StyleStopData::copy):
768 (WebCore::StyleTextData::create):
769 (WebCore::StyleTextData::copy):
770 (WebCore::StyleClipData::create):
771 (WebCore::StyleClipData::copy):
772 (WebCore::StyleMaskData::create):
773 (WebCore::StyleMaskData::copy):
774 (WebCore::StyleMarkerData::create):
775 (WebCore::StyleMarkerData::copy):
776 (WebCore::StyleMiscData::create):
777 (WebCore::StyleMiscData::copy):
779 2008-02-25 Dan Bernstein <mitz@apple.com>
781 Reviewed by Dave Hyatt.
783 - remove file-static BidiRun variables from bidi.cpp
785 * platform/text/BidiResolver.h:
786 (WebCore::BidiResolver::): Initialize m_logicallyLastRun.
787 (WebCore::BidiResolver::logicallyLastRun): Added.
788 (WebCore::BidiResolver::runCount): Made unsigned.
789 (WebCore::::reverseRuns): Changed ints to unsigned.
790 (WebCore::::createBidiRunsForLine): Made this function set
792 * rendering/RenderBlock.h:
793 * rendering/bidi.cpp:
794 (WebCore::BidiState::addRun): Removed setting of sLogicallyLastBidiRun.
795 (WebCore::RenderBlock::constructLine): Removed unused start parameter
796 and added run count and first and last run parameters. Replaced end
797 parameter with lastLine boolean and endObject pointer.
798 (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added first
799 and logically last run parameters.
800 (WebCore::RenderBlock::computeVerticalPositionsForLine): Added firstRun
802 (WebCore::RenderBlock::bidiReorderLine): Removed setting of static
804 (WebCore::RenderBlock::layoutInlineChildren): Changed to use BidiState
805 accessors instead of file statics.
807 2008-02-25 Rodney Dawes <dobey@wayofthemonkey.com>
809 Reviewed by Jon Honeycutt.
811 http://bugs.webkit.org/show_bug.cgi?id=16924
812 Bug 16924: Shared PluginDatabase, PluginPackage, and PlugInInfoStore implementations
814 Add PluginInfoStore.cpp and new PluginDatabase.cpp to GTK+ and Qt ports.
815 Remove old PlugInInfoStoreQt.cpp as it is obsoleted by shared code.
816 Add PluginInfoStore, PluginDatabase, and PluginStream files to Wx build.
817 Add new PluginDatabase.cpp to Windows build.
818 Add temporary stubs for new PluginDatabase and PluginPackage.
819 shared classes to GTK+, Qt, and Wx ports.
820 Copy PluginDatabaseWin.cpp to PluginDatabase.cpp to preserve history.
821 Remove shared code from PluginDatabaseWin.cpp.
822 Remove Windows-specific code from PluginDatabase.cpp.
823 Use PlatformModule and PlatformFileTime instead of HMODULE and FILETIME.
824 Remove extraneous PluginPackage:: from hash() class method prototype.
825 Subsume storeFileVersion into PluginPackage::fetchInfo.
826 Add cross-platform PlatformModuleVersion type definition.
827 Use PlatformModuleVersion to store the module version.
828 Rename m_fileVersion[ML]S to m_moduleVersion.
829 Change compareFileVersion to use PlatformModuleVersion as the argument.
830 Move PluginView::determineQuirks and m_quirks to PluginPackage.
831 Updated determineQuirks for the PlatformModuleVersion.
835 * WebCoreSources.bkl:
837 * WebCore.vcproj/WebCore.vcproj:
838 * Platform/FileSystem.h:
839 * platform/qt/PlugInInfoStoreQt.cpp:
840 * platform/gtk/TemporaryLinkStubs.cpp:
841 * platform/qt/TemporaryLinkStubs.cpp:
842 * platform/wx/TemporaryLinkStubs.cpp:
843 * plugins/PluginDatabase.cpp:
844 * plugins/PluginDatabase.h:
845 * plugins/win/PluginDatabaseWin.cpp:
846 * plugins/PluginPackage.h:
847 * plugins/win/PluginPackageWin.cpp:
848 * plugins/PluginView.h:
849 * plugins/win/PluginViewWin.cpp:
851 2008-02-25 Anders Carlsson <andersca@apple.com>
855 Make more style objects start out with a refcount of 1.
857 * rendering/RenderStyle.cpp:
858 (WebCore::StyleSurroundData::StyleSurroundData):
859 (WebCore::StyleBoxData::StyleBoxData):
860 (WebCore::StyleVisualData::StyleVisualData):
861 (WebCore::StyleBackgroundData::StyleBackgroundData):
862 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
863 (WebCore::StyleRareInheritedData::StyleRareInheritedData):
864 (WebCore::StyleInheritedData::StyleInheritedData):
865 * rendering/RenderStyle.h:
866 (WebCore::StyleSurroundData::create):
867 (WebCore::StyleSurroundData::copy):
868 (WebCore::StyleBoxData::create):
869 (WebCore::StyleBoxData::copy):
870 (WebCore::StyleVisualData::create):
871 (WebCore::StyleVisualData::copy):
872 (WebCore::StyleBackgroundData::create):
873 (WebCore::StyleBackgroundData::copy):
874 (WebCore::StyleBackgroundData::~StyleBackgroundData):
875 (WebCore::StyleRareNonInheritedData::create):
876 (WebCore::StyleRareNonInheritedData::copy):
877 (WebCore::StyleRareInheritedData::create):
878 (WebCore::StyleRareInheritedData::copy):
879 (WebCore::StyleInheritedData::create):
880 (WebCore::StyleInheritedData::copy):
882 2008-02-25 Anders Carlsson <andersca@apple.com>
886 Make some of the refcounted style objects start out with a refcount of 1.
888 * rendering/DataRef.h:
889 Make a DeprecatedDataRef class which is just a copy of the old DataRef class.
890 Change DataRef to use ::create() and ::copy() instead of the constructors.
891 Change DataRef's pointer to be a RefPtr instead.
893 * rendering/RenderStyle.cpp:
894 (WebCore::StyleMarqueeData::StyleMarqueeData):
895 (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
896 (WebCore::StyleMultiColData::StyleMultiColData):
897 (WebCore::StyleTransformData::StyleTransformData):
898 Start with a RefCount of 1.
900 * rendering/RenderStyle.h:
901 * rendering/SVGRenderStyle.h:
902 Add ::create() and ::copy() methods. Make not yet converted classes use DeprecatedDataRef.
904 2008-02-25 Darin Adler <darin@apple.com>
907 Based on a patch by Tim Steele <timsteele41@gmail.com>.
909 - fix http://bugs.webkit.org/show_bug.cgi?id=17186
910 Fragment navigation within a page permanently cancels meta refresh
912 Test: fast/loader/meta-refresh-anchor-click.html
914 * loader/FrameLoader.cpp:
915 (WebCore::FrameLoader::load): When load type is FrameLoadTypeRedirectWithLockedHistory,
916 always do a real load. This makes sure that meta refresh loads are treated as real loads
917 rather than anchor scrolls. Also tweaked formatting a bit.
918 (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): This function is
919 an alternate way to complete a load, so it needs to start the redirection timer if
920 redirection has already been scheduled.
922 2008-02-25 Dan Bernstein <mitz@apple.com>
924 Reviewed by Darin Adler.
926 - avoid counting spaces in non-justified text
928 * rendering/bidi.cpp:
929 Removed file-static numSpaces.
930 (WebCore::BidiState::addRun): Removed space counting.
931 (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added space
932 counting, conditional on the block having the text-align: justify
934 (WebCore::RenderBlock::bidiReorderLine): Removed initialization of
937 2008-02-25 Darin Adler <darin@apple.com>
941 * platform/graphics/cg/ImageSourceCG.cpp:
942 (WebCore::ImageSource::createFrameAtIndex): Put the string into a global
943 variable (because CFSTR is inefficient on Windows).
945 2008-02-25 Darin Adler <darin@apple.com>
949 * WebCore.base.exp: Export blankURL, and sort the file.
951 2008-02-25 Simon Hausmann <hausmann@webkit.org>
953 Reviewed by Mark Rowe.
955 Fix compilation with gcc 4.3, added stdio.h and unistd.h inclusions.
959 * editing/Selection.cpp:
960 * editing/SelectionController.cpp:
961 * editing/VisiblePosition.cpp:
962 * history/HistoryItem.cpp:
964 * loader/FTPDirectoryParser.cpp:
966 * platform/gtk/FileSystemGtk.cpp:
967 * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
968 * platform/text/TextCodecLatin1.cpp:
969 * platform/text/TextCodecUserDefined.cpp:
970 * rendering/CounterNode.cpp:
971 * rendering/RenderObject.cpp:
973 2008-02-25 Johnny Ding <johnnyding.webkit@gmail.com>
975 Reviewed by Darin Adler.
977 - fix http://bugs.webkit.org/show_bug.cgi?id=17444
979 In HTMLTokenizer::write, the code checks 'pendingScripts.isEmpty()' to decide
980 whether to save prependingSrc or not. However, in HTMLTokenizer::scriptHandler
981 and HTMLTokenizer::scriptExecution, the code checks testBit:LoadingExtScript
982 to decide whether to save prependingSrc or not. The later behavior is not right
983 because, in scriptHandler and scriptExecution, even the pendingScripts queue is
984 empty, the testBit:LoadingExtScript might be TRUE.
986 Test: fast/tokenizer/nested-multiple-scripts.html
988 * html/HTMLTokenizer.cpp:
989 (WebCore::HTMLTokenizer::scriptHandler): check pendingScripts.isEmpty() instead of
990 checking state.loadingExtScript().
991 (WebCore::HTMLTokenizer::scriptExecution): check pendingScripts.isEmpty() instead of
992 checking state.loadingExtScript().
994 2008-02-24 Darin Adler <darin@apple.com>
996 * dom/Document.h: Removed stray duplicate declaration of
997 RegisteredEventListenerList.
999 2008-02-24 Darin Adler <darin@apple.com>
1002 (WebCore::Range::surroundContents): Removed incorrect comment.
1003 I added it a while ago, and I was just mixed up.
1005 2008-02-24 Darin Adler <darin@apple.com>
1007 - quick follow-up to that last check-in
1009 * platform/graphics/cg/ImageSourceCG.cpp:
1010 (WebCore::ImageSource::createFrameAtIndex): Use CFEqual instead of
1011 WebCore::String's == for speed.
1013 2008-02-24 Michael Knaup <michael.knaup@mac.com>
1017 Bug 8749: XBM rendered incorrectly as black on white
1019 xbm images are now created and rendered using black on a
1020 transparent background (same behavior as in Firefox)
1022 Test: platform/mac/fast/canvas/canvas-draw-xbm-image.html
1024 * platform/graphics/cg/ImageSourceCG.cpp:
1025 (WebCore::ImageSource::createFrameAtIndex):
1027 2008-02-24 Dan Bernstein <mitz@apple.com>
1029 Reviewed by Darin Adler.
1031 - fix http://bugs.webkit.org/show_bug.cgi?id=17471
1032 REGRESSION (r30438): Crash in deleteLineBoxes in cursor-adjusting code browsing Acid3
1034 Test: http/tests/misc/object-image-error.html
1036 * html/HTMLObjectElement.cpp:
1037 (WebCore::HTMLObjectElement::attach): Added an early return in case
1038 updateFromElement() has changed the object to use fallback content.
1040 2008-02-24 Dan Bernstein <mitz@apple.com>
1042 Reviewed by Darin Adler.
1044 - fix float positioning when a float that does not fit on the line is
1045 followed by a float that does
1047 Test: fast/block/float/narrow-after-wide.html
1049 * rendering/bidi.cpp:
1050 (WebCore::RenderBlock::findNextLineBreak): Changed to not position any
1051 more floats on the line once a float that does not fit is encountered.
1052 That float should be pushed to the next line, and so should all floats
1053 that follow, regardless of whether they can fit on the current line.
1055 2008-02-24 Darin Adler <darin@apple.com>
1059 - fix http://bugs.webkit.org/show_bug.cgi?id=16770
1060 Acid3 expects :visited styled links to restyle on iframe load
1062 Disentangle global history updating from the back/forward history.
1063 There are many cases where we don't want to create a new back/forward
1064 item, but we do still want to add to the global history (used for visited
1065 link coloring) in those cases.
1067 Test: fast/history/subframe-is-visited.html
1069 * loader/FrameLoader.cpp:
1070 (WebCore::FrameLoader::updateGlobalHistory): Renamed from
1071 addHistoryForCurrentLocation and removed the back/forward handling.
1072 (WebCore::FrameLoader::updateHistoryForStandardLoad): Streamlined logic a
1073 bit. Replaced call to addHistoryForCurrentLocation with a call to
1074 addBackForwardItemClippedAtTarget. Added an unconditional call to
1075 updateGlobalHistory.
1076 (WebCore::FrameLoader::updateHistoryForClientRedirect): Added a FIXME;
1077 why doesn't this function update global history?
1078 (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Ditto.
1079 (WebCore::FrameLoader::updateHistoryForReload): Replaced the direct call
1080 the client with a call to the new updateGlobalHistory function.
1081 (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Did
1082 the same changes as for updateHistoryForStandardLoad.
1083 * loader/FrameLoader.h: More of the same.
1085 * loader/FrameLoaderClient.h: Removed updateGlobalHistoryForReload and
1086 renamed updateGlobalHistoryForStandardLoad to updateGlobalHistory.
1088 * svg/graphics/SVGImageEmptyClients.h:
1089 (WebCore::SVGEmptyFrameLoaderClient::updateGlobalHistory): Updated to
1092 2008-02-23 Darin Adler <darin@apple.com>
1096 - fix http://bugs.webkit.org/show_bug.cgi?id=17508
1097 REGRESSION (r30535): mailto regression tests failing
1099 * html/HTMLFormElement.cpp:
1100 (WebCore::HTMLFormElement::submit): Restore the old logic, with its unpleasant
1101 trip through String do to the replace operation. It's inefficient, but there's
1102 no real reason to worry about the efficiency of mailto forms, since that feature
1105 2008-02-23 Darin Adler <darin@apple.com>
1109 - replace SegmentedString's use of DeprecatedValueList with Deque
1111 Testing indicates this is a slight speed-up for page loading.
1113 * platform/text/SegmentedString.cpp:
1114 (WebCore::SegmentedString::length): Update to use Deque.
1115 (WebCore::SegmentedString::setExcludeLineNumbers): Ditto.
1116 (WebCore::SegmentedString::append): Ditto.
1117 (WebCore::SegmentedString::prepend): Ditto.
1118 (WebCore::SegmentedString::advanceSubstring): Ditto.
1119 (WebCore::SegmentedString::toString): Ditto.
1120 * platform/text/SegmentedString.h: Tweak formatting. Don't bother making an entire
1121 class private with a single friend. Change m_sbstrings from a DeprecatedValueList
1124 2008-02-23 Darin Adler <darin@apple.com>
1128 - fix http://bugs.webkit.org/show_bug.cgi?id=17506
1129 REGRESSION (r30535): ASSERTION FAILED: i < size()
1131 * loader/TextResourceDecoder.cpp:
1132 (WebCore::findTextEncoding): Fix off-by-one in code that null-terminates
1135 2008-02-23 Matt Lilek <webkit@mattlilek.com>
1137 Not reviewed, build fix.
1139 * platform/network/cf/FormDataStreamCFNet.cpp:
1140 (WebCore::httpBodyFromRequest):
1141 * plugins/win/PluginViewWin.cpp:
1142 (WebCore::PluginView::handlePost):
1144 2008-02-23 Dan Bernstein <mitz@apple.com>
1148 * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
1149 (WebCore::GlyphPage::fill):
1150 * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
1151 (WebCore::GlyphPage::fill):
1153 2008-02-23 Dan Bernstein <mitz@apple.com>
1155 Reviewed by Anders Carlsson.
1157 - fix GlyphPage::fill() logic for partial page fills
1159 * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
1160 (WebCore::GlyphPage::fill): Changed the test for non-BMP characters to
1161 work correctly when the length parameter is less than a full page size.
1162 Also updated the comment.
1163 * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
1164 (WebCore::GlyphPage::fill): Ditto.
1166 2008-02-23 Kevin Ollivier <kevino@theolliviers.com>
1168 Reviewed by Darin Adler.
1170 Move text drawing into wxcode, as we need platform-dependent
1171 APIs for drawing non-kerned text, which wx doesn't yet have.
1172 (But hopefully will, once these APIs are fleshed out on all
1175 http://bugs.webkit.org/show_bug.cgi?id=17396
1177 * platform/graphics/wx/FontWx.cpp:
1178 (WebCore::Font::drawGlyphs):
1179 * platform/wx/wxcode/gtk/non-kerned-drawing.cpp: Added.
1180 * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp: Added.
1181 * platform/wx/wxcode/non-kerned-drawing.h: Added.
1182 * platform/wx/wxcode/win/non-kerned-drawing.cpp: Added.
1185 2008-02-23 Darin Adler <darin@apple.com>
1187 Pointed out by Mitz.
1189 * loader/TextResourceDecoder.cpp:
1190 (WebCore::find): Fix a "==" that was supposed to be ">".
1191 (WebCore::findIgnoringCase): Ditto.
1193 2008-02-23 Darin Adler <darin@apple.com>
1197 * html/HTMLFormElement.cpp:
1198 (WebCore::appendEncodedString): Fix buffer overrun in the code I just landed.
1200 2008-02-23 Darin Adler <darin@apple.com>
1204 - remove all but 1 remaining use of DeprecatedCString
1205 - change FormData to start refcount at 1
1207 * html/HTMLFormElement.cpp:
1208 (WebCore::appendString): Added. Helpers for Vector<char>.
1209 (WebCore::appendEncodedString): Renamed from encodeCString and changed to
1210 append to an existing Vector<char> to cut down a bit on memory allocation.
1211 (WebCore::HTMLFormElement::formData): Replace the DeprecatedCString called
1212 enc_string with a Vector<char> called encodedData. Change to use the new
1213 FormData::create function.
1214 (WebCore::HTMLFormElement::submit): Same thing, for the mailto form code.
1216 * loader/TextResourceDecoder.cpp:
1217 (WebCore::find): Added. Helper for searching in char* with length.
1218 (WebCore::findIgnoringCase): Ditto.
1219 (WebCore::findTextEncoding): Added. Helper for looking up a text encoding
1220 when we have a char* with length rather than a null-terminated char*.
1221 (WebCore::findXMLEncoding): Changed to use char* and length rather than
1222 DeprecatedCString. Also fixed some things that would be one-character
1223 buffer overruns in a string that's not null-terminated.
1224 (WebCore::TextResourceDecoder::checkForCSSCharset): Change to use
1225 findTextEncoding rather than constructing a CString to pass to the
1226 TextEncodingconstructor.
1227 (WebCore::TextResourceDecoder::checkForHeadCharset): Ditto.
1229 * platform/network/FormData.cpp:
1230 (WebCore::FormData::FormData): Changed to start refcount at 1.
1231 (WebCore::FormData::create): Added.
1232 (WebCore::FormData::copy): Call adoptRef since refcount starts at 1.
1233 * platform/network/FormData.h: Made constructor private. Added create functions.
1235 * platform/network/mac/ResourceRequestMac.mm:
1236 (WebCore::ResourceRequest::doUpdateResourceRequest): Call FormData::create.
1237 * xml/XMLHttpRequest.cpp:
1238 (WebCore::XMLHttpRequest::send): Ditto.
1240 2008-02-23 Darin Adler <darin@apple.com>
1244 - http://bugs.webkit.org/show_bug.cgi?id=17067
1245 eliminate attributes parameter from JSObject::put for speed/clarity
1247 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1248 (WebCore::JSCSSStyleDeclaration::customPut): Remove attributes argument.
1250 * bindings/js/JSCanvasPixelArrayCustom.cpp:
1251 (WebCore::JSCanvasPixelArray::indexGetter): Use early exit idiom.
1252 (WebCore::JSCanvasPixelArray::indexSetter): Moved length check into the
1253 CanvasPixelArray object, for consistency with the getter. Removed attributes
1256 * bindings/js/JSDOMWindowCustom.cpp:
1257 (WebCore::JSDOMWindow::customPut): Removed special case for variable
1258 initialization, which is not needed since that does use put any more.
1259 Removed attributes argument.
1261 * bindings/js/JSEventTargetBase.h:
1262 (WebCore::JSEventTargetBase::putValueProperty): Removed attributes argument.
1263 (WebCore::JSEventTargetBase::put): Ditto.
1264 (WebCore::JSEventTargetPrototype::self): Removed Internal flag.
1265 * bindings/js/JSEventTargetNode.cpp:
1266 (WebCore::JSEventTargetNode::put): Removed attributes argument.
1267 (WebCore::JSEventTargetNode::putValueProperty): Ditto.
1268 * bindings/js/JSEventTargetNode.h: Ditto.
1269 * bindings/js/JSHTMLAppletElementCustom.cpp:
1270 (WebCore::JSHTMLAppletElement::customPut): Ditto.
1271 * bindings/js/JSHTMLEmbedElementCustom.cpp:
1272 (WebCore::JSHTMLEmbedElement::customPut): Ditto.
1273 * bindings/js/JSHTMLInputElementBase.cpp:
1274 (WebCore::JSHTMLInputElementBase::put): Ditto.
1275 (WebCore::JSHTMLInputElementBase::putValueProperty): Ditto.
1276 * bindings/js/JSHTMLInputElementBase.h: Ditto.
1277 * bindings/js/JSHTMLObjectElementCustom.cpp:
1278 (WebCore::JSHTMLObjectElement::customPut): Ditto.
1279 * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1280 (WebCore::JSHTMLOptionsCollection::indexSetter): Ditto.
1281 * bindings/js/JSHTMLSelectElementCustom.cpp:
1282 (WebCore::JSHTMLSelectElement::indexSetter): Ditto.
1283 * bindings/js/JSHistoryCustom.cpp:
1284 (WebCore::JSHistory::customPut): Ditto.
1285 * bindings/js/JSLocation.cpp:
1286 (WebCore::JSLocation::put): Ditto.
1287 * bindings/js/JSLocation.h: Ditto.
1288 * bindings/js/JSXMLHttpRequest.cpp:
1289 (WebCore::JSXMLHttpRequest::put): Ditto.
1290 (WebCore::JSXMLHttpRequest::putValueProperty): Ditto.
1291 * bindings/js/JSXMLHttpRequest.h: Ditto.
1293 * bindings/js/kjs_dom.cpp:
1294 (WebCore::getRuntimeObject): Changed return type to JSObject*.
1295 * bindings/js/kjs_dom.h: Ditto.
1297 * bindings/js/kjs_events.cpp:
1298 (WebCore::JSClipboard::put): Removed attributes argument.
1299 (WebCore::JSClipboard::putValueProperty): Ditto.
1300 * bindings/js/kjs_events.h: Ditto.
1302 * bindings/js/kjs_html.cpp:
1303 (WebCore::runtimeObjectGetter): Updated for change to getRuntimeObject to
1304 return a JSObject. Used early exit idiom.
1305 (WebCore::runtimeObjectPropertyGetter): Ditto.
1306 (WebCore::runtimeObjectCustomGetOwnPropertySlot): Ditto.
1307 (WebCore::runtimeObjectCustomPut): Use hasProperty to check for properties
1308 that we should put with the property syntax instead of canPut.
1309 (WebCore::runtimeObjectImplementsCall): Ditto.
1310 (WebCore::runtimeObjectCallAsFunction): Ditto.
1311 * bindings/js/kjs_html.h: Removed attributes argument to runtimeObjectCustomPut.
1313 * bindings/js/kjs_window.cpp:
1314 (KJS::Window::put): Removed attributes argument.
1315 * bindings/js/kjs_window.h: Ditto.
1317 * bindings/scripts/CodeGeneratorJS.pm: Removed attributes argument from put,
1318 putValueProperty, customPut, and indexSetter.
1320 * html/CanvasPixelArray.h:
1321 (WebCore::CanvasPixelArray::set): Added index checking here, as in the get
1322 function. Before, the checking was done in the JavaScript bindings for set.
1324 2008-02-23 Brent Fulgham <bfulgham@gmail.com>
1326 Reviewed by Adam and Darin.
1328 http://bugs.webkit.org/show_bug.cgi?id=17442
1329 Correct the Windows Cairo implementation of GraphicsContext so
1330 that Windows 'WorldTransform' is kept in sync with the Cairo
1333 Also corrects an uninitialized variable in the Cairo Windows
1336 WARNING: NO TEST CASES ADDED OR CHANGED
1338 * platform/graphics/cairo/GraphicsContextCairo.cpp: Modify
1339 methods to call GraphicsContextPlatformPrivate calls, just
1340 as is done for the CoreGraphics version. These calls are
1341 nop's for everything but Windows.
1342 (WebCore::GraphicsContext::savePlatformState):
1343 (WebCore::GraphicsContext::restorePlatformState):
1344 (WebCore::GraphicsContext::clip):
1345 (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
1346 (WebCore::GraphicsContext::translate):
1347 (WebCore::GraphicsContext::concatCTM): Re-enable for Windows
1348 (WebCore::GraphicsContext::beginTransparencyLayer):
1349 (WebCore::GraphicsContext::endTransparencyLayer):
1350 (WebCore::GraphicsContext::rotate):
1351 (WebCore::GraphicsContext::scale):
1352 * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1353 * platform/graphics/win/GraphicsContextCGWin.cpp: Move common
1354 code for handling WorldTransform calls to parent class.
1355 * platform/graphics/win/GraphicsContextCairoWin.cpp: Add common
1356 code for handling WorldTransform calls.
1357 (WebCore::GraphicsContextPlatformPrivate::concatCTM): Change
1358 implementation so that it only handles WorldTransform. The
1359 Cairo update is done in GraphicsContextCairo.cpp
1360 * platform/graphics/win/GraphicsContextWin.cpp: Call platform-private
1361 methods to keep WorldTransform in sync.
1362 (WebCore::GraphicsContextPlatformPrivate::save):
1363 (WebCore::GraphicsContextPlatformPrivate::restore):
1364 (WebCore::GraphicsContextPlatformPrivate::clip):
1365 (WebCore::GraphicsContextPlatformPrivate::scale):
1366 (WebCore::GraphicsContextPlatformPrivate::rotate):
1367 (WebCore::GraphicsContextPlatformPrivate::translate):
1368 * platform/win/DragImageCairoWin.cpp:
1369 (WebCore::createDragImageFromImage): Correct uninitialized value
1371 2008-02-23 Dan Bernstein <mitz@apple.com>
1373 Reviewed by Dave Hyatt.
1375 - make non-autowrapping text clear floats
1377 Test: fast/text/whitespace/nowrap-clear-float.html
1379 * rendering/RenderBlock.cpp:
1380 (WebCore::RenderBlock::nextFloatBottomBelow): Renamed nearestFloat() to
1381 this and changed to avoid comparing bottom to 0 in each iteration.
1382 (WebCore::RenderBlock::getClearDelta): Updated comment for the rename.
1383 * rendering/RenderBlock.h:
1384 * rendering/bidi.cpp:
1385 (WebCore::RenderBlock::fitBelowFloats): Added. Factored out of
1386 findNextLineBreak() and simplified.
1387 (WebCore::RenderBlock::findNextLineBreak): Changed to call
1388 fitBelowFloats(). Fixed the bug by trying to fit below floats in the
1389 case of non-wrapping text. Removed some redundancy.
1391 2008-02-23 Sam Weinig <sam@webkit.org>
1393 Reviewed by Oliver Hunt.
1395 Fix for http://bugs.webkit.org/show_bug.cgi?id=17504
1396 Speed up DOM lists array subscription syntax by using the fast
1397 getOwnPropertySlot and set paths
1399 - 6x speed improvement on Oliver's ImageData put test.
1401 * bindings/scripts/CodeGeneratorJS.pm: Add fast path for getOwnPropertySlot
1402 and put when an indexGetter or indexSetter is used. We can not use the fast
1403 path if an overridingNameGetter is used as there would be no way to override.
1405 2008-02-23 Kevin Ollivier <kevino@theolliviers.com>
1407 wx build fix after JSImageData.cpp was added.
1409 * WebCoreSources.bkl:
1411 2008-02-23 Alexey Proskuryakov <ap@webkit.org>
1413 Windows build fix - move ThreadCondition implementation from WebCore to WTF.
1415 * WebCore.vcproj/WebCore.vcproj:
1416 * platform/win/ThreadConditionWin.cpp: Removed.
1418 2008-02-23 Alexey Proskuryakov <ap@webkit.org>
1422 Move basic threading support from WebCore to WTF.
1424 One call that remains in WebCore is callOnMainThread(), and it has its own header now.
1426 * ForwardingHeaders/wtf/Locker.h: Added.
1427 * ForwardingHeaders/wtf/MessageQueue.h: Added.
1428 * ForwardingHeaders/wtf/Threading.h: Added.
1431 * WebCore.vcproj/WebCore.vcproj:
1432 * WebCore.xcodeproj/project.pbxproj:
1433 * WebCoreSources.bkl:
1434 * bindings/js/JSCustomSQLTransactionCallback.cpp:
1435 * dom/XMLTokenizer.cpp:
1436 * loader/icon/IconDatabase.cpp:
1437 (WebCore::iconDatabase):
1438 * loader/icon/IconDatabase.h:
1439 * platform/Locker.h: Removed.
1440 * platform/MainThread.h: Copied from WebCore/platform/Threading.h.
1441 (WebCore::initializeThreadingAndMainThread):
1442 * platform/MessageQueue.h: Removed.
1443 * platform/SecurityOrigin.h:
1444 * platform/Threading.h: Removed.
1445 * platform/ThreadingNone.cpp: Removed.
1446 * platform/gtk/MainThreadGtk.cpp: Copied from WebCore/platform/gtk/ThreadingGtk.cpp.
1447 * platform/gtk/ThreadingGtk.cpp: Removed.
1448 * platform/mac/MainThreadMac.mm: Copied from WebCore/platform/mac/Threading.mm.
1449 * platform/mac/Threading.mm: Removed.
1450 * platform/pthreads: Removed.
1451 * platform/pthreads/ThreadingPthreads.cpp: Removed.
1452 * platform/qt/MainThreadQt.cpp: Copied from WebCore/platform/qt/ThreadingQt.cpp.
1453 * platform/qt/ThreadingQt.cpp: Removed.
1454 * platform/sql/SQLValue.h:
1455 * platform/sql/SQLiteAuthorizer.h:
1456 * platform/sql/SQLiteDatabase.h:
1457 * platform/win/MainThreadWin.cpp: Copied from WebCore/platform/win/ThreadingWin.cpp.
1458 (WebCore::initializeThreadingAndMainThread):
1459 * platform/win/MutexWin.cpp: Removed.
1460 * platform/win/ThreadingWin.cpp: Removed.
1461 * platform/wx/MainThreadWx.cpp: Copied from WebCore/platform/wx/ThreadingWx.cpp.
1462 * platform/wx/ThreadingWx.cpp: Removed.
1463 * storage/Database.cpp:
1464 (WebCore::Database::Database):
1465 * storage/Database.h:
1466 * storage/DatabaseTask.h:
1467 * storage/DatabaseThread.h:
1468 * storage/DatabaseTracker.cpp:
1469 * storage/OriginQuotaManager.h:
1470 * storage/SQLError.h:
1471 * storage/SQLResultSet.h:
1472 * storage/SQLStatement.h:
1473 * storage/SQLStatementCallback.h:
1474 * storage/SQLStatementErrorCallback.h:
1475 * storage/SQLTransaction.h:
1476 * storage/SQLTransactionCallback.h:
1477 * storage/SQLTransactionErrorCallback.h:
1480 2008-02-23 David Kilzer <ddkilzer@apple.com>
1482 Please clarify licensing for some files
1483 <http://bugs.webkit.org/show_bug.cgi?id=14970>
1487 * bindings/objc/WebScriptObject.h: Added Apple BSD-style license.
1488 * bindings/objc/WebScriptObjectPrivate.h: Ditto.
1489 * platform/text/mac/ShapeArabic.c: Added ICU license from WebCore/icu/LICENSE.
1491 2008-02-22 Justin Garcia <justin.garcia@apple.com>
1493 Reviewed by Anders Carlsson.
1495 <rdar://problem/5714333> Add document.getSelection()
1497 Add a synonym for window.getSelection() that FF supports. There were requests in
1498 this bugs dupes to also support the IE only document.selection, but IE's Selection
1499 object is too different than ours currently for that to be safe (specifically, we
1500 don't support enough of IE's TextRange methods on our DOM Range object yet). I
1501 filed <rdar://problem/5761233> to cover that.
1504 (WebCore::Document::getSelection): Added.
1506 * dom/Document.idl: Ditto. JS only since this is about web compatibility.
1508 2008-02-22 Oliver Hunt <oliver@apple.com>
1512 * WebCoreSources.bkl:
1514 2008-02-22 Oliver Hunt <oliver@apple.com>
1516 Once more with the cairo/qt/wx build fixing
1518 * platform/graphics/cairo/ImageBufferCairo.cpp:
1519 * platform/graphics/qt/ImageBufferQt.cpp:
1520 * platform/graphics/wx/ImageBufferWx.cpp:
1522 2008-02-22 Mark Rowe <mrowe@apple.com>
1524 Windows build fix. Add missing include of DeprecatedCString.h and sort existing includes.
1526 * platform/win/PasteboardWin.cpp:
1528 2008-02-22 Mark Rowe <mrowe@apple.com>
1530 Speculative Windows build fix.
1532 * platform/win/ClipboardUtilitiesWin.cpp: Add missing include of DeprecatedCString.h and sort existing includes.
1533 * platform/win/ClipboardWin.cpp: Ditto.
1535 2008-02-22 Oliver Hunt <oliver@apple.com>
1537 Build fix for windows, wx and qt
1539 * html/CanvasPixelArray.h:
1540 (WebCore::CanvasPixelArray::set):
1542 2008-02-22 Oliver Hunt <oliver@apple.com>
1544 Unbreak windows vcproj
1546 * WebCore.vcproj/WebCore.vcproj:
1548 2008-02-22 Oliver Hunt <oliver@apple.com>
1552 Support Canvas.getImageData and Canvas.createImageData
1554 This patch adds support for all the pixel reading portions
1555 of the HTML5 Canvas spec. There are two new types ImageData
1556 and CanvasPixelArray which are used to provide the HTML5
1557 ImageData object, and the required semantics for assignment
1558 to the ImageData data array.
1560 We only implement the CG version of ImageBuffer::getImageData,
1561 but the logic is null safe, so this will not introduce any
1562 crashes into other platforms, unfortunately it will result in
1563 JS Object detection "lying" on non-CG platforms.
1565 Tests: fast/canvas/canvas-ImageData-behaviour.html
1566 fast/canvas/canvas-getImageData.html
1568 * DerivedSources.make:
1571 * WebCore.vcproj/WebCore.vcproj:
1572 * WebCore.xcodeproj/project.pbxproj:
1573 * bindings/js/JSCanvasPixelArrayCustom.cpp: Added.
1574 (WebCore::JSCanvasPixelArray::indexGetter):
1575 (WebCore::JSCanvasPixelArray::indexSetter):
1577 * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1578 * bindings/scripts/CodeGeneratorJS.pm:
1579 * html/CanvasPixelArray.cpp: Added.
1580 (WebCore::CanvasPixelArray::create):
1581 * html/CanvasPixelArray.h: Added.
1582 (WebCore::CanvasPixelArray::data):
1583 (WebCore::CanvasPixelArray::length):
1584 (WebCore::CanvasPixelArray::set):
1585 (WebCore::CanvasPixelArray::get):
1586 * html/CanvasPixelArray.idl: Added.
1587 * html/CanvasRenderingContext2D.cpp:
1588 (WebCore::createEmptyImageData):
1589 (WebCore::CanvasRenderingContext2D::createImageData):
1590 (WebCore::CanvasRenderingContext2D::getImageData):
1591 * html/CanvasRenderingContext2D.h:
1592 * html/CanvasRenderingContext2D.idl:
1593 * html/HTMLCanvasElement.cpp:
1594 (WebCore::HTMLCanvasElement::convertLogicalToDevice):
1595 (WebCore::HTMLCanvasElement::createImageBuffer):
1596 * html/HTMLCanvasElement.h:
1597 * html/ImageData.cpp: Added.
1598 (WebCore::ImageData::create):
1599 (WebCore::ImageData::ImageData):
1600 * html/ImageData.h: Added.
1601 (WebCore::ImageData::width):
1602 (WebCore::ImageData::height):
1603 (WebCore::ImageData::data):
1604 * html/ImageData.idl: Added.
1605 * platform/graphics/ImageBuffer.h:
1606 * platform/graphics/cairo/ImageBufferCairo.cpp:
1607 (WebCore::ImageBuffer::getImageData):
1608 * platform/graphics/cg/ImageBufferCG.cpp:
1609 (WebCore::ImageBuffer::getImageData):
1610 * platform/graphics/qt/ImageBufferQt.cpp:
1611 (WebCore::ImageBuffer::getImageData):
1612 * platform/graphics/wx/ImageBufferWx.cpp:
1613 (WebCore::ImageBuffer::getImageData):
1615 2008-02-22 Sam Weinig <sam@webkit.org>
1617 Rubber-stamped by Adam Roben.
1619 Rid the project of the Devil known as DeprecatedString!
1624 * WebCore.vcproj/WebCore.vcproj:
1625 * WebCore.xcodeproj/project.pbxproj:
1626 * WebCoreSources.bkl:
1628 * html/HTMLFormElement.cpp:
1629 * platform/DeprecatedString.cpp: Removed.
1630 * platform/DeprecatedString.h: Removed.
1631 * platform/graphics/qt/IconQt.cpp:
1632 * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
1633 * platform/gtk/CookieJarGtk.cpp:
1634 * platform/gtk/CursorGtk.cpp:
1635 * platform/gtk/KeyEventGtk.cpp:
1636 * platform/mac/DeprecatedStringMac.mm: Removed.
1637 * platform/network/qt/ResourceHandleQt.cpp:
1638 * platform/network/win/CookieJarWin.cpp:
1640 * platform/qt/ClipboardQt.cpp:
1641 * platform/qt/CookieJarQt.cpp:
1642 * platform/qt/CursorQt.cpp:
1643 * platform/symbian/DeprecatedStringSymbian.cpp: Removed.
1644 * platform/text/AtomicString.cpp:
1645 * platform/text/AtomicString.h:
1646 * platform/text/PlatformString.h:
1647 * platform/text/String.cpp:
1648 * platform/text/StringImpl.cpp:
1649 * platform/text/qt/StringQt.cpp:
1650 (WebCore::String::String):
1651 * platform/text/wx/StringWx.cpp:
1652 * platform/win/BString.cpp:
1653 * platform/win/BString.h:
1654 * platform/win/PasteboardWin.cpp:
1656 2008-02-22 Sam Weinig <sam@webkit.org>
1658 Reviewed by Geoff Garen.
1660 - Remove use of DeprecatedString in CSSStyleSelector.
1662 * css/CSSStyleSelector.cpp:
1663 (WebCore::findHash): Removed. Use find instead.
1664 (WebCore::findSlashDotDotSlash): Changed to take a UChar* and a length.
1665 (WebCore::findSlashSlash): Ditto.
1666 (WebCore::findSlashDotSlash): Ditto.
1667 (WebCore::containsColonSlashSlash): Ditto.
1668 (WebCore::cleanPath): Change to operate on a String.
1669 (WebCore::checkPseudoState): Changed to use a Vector as a buffer.
1671 2008-02-22 Geoffrey Garen <ggaren@apple.com>
1673 Reviewed by Sam Weinig.
1675 Fixed <rdar://problem/5057509> Repro leak of JSXMLHttpRequest and
1676 associated objects @ www.viamichelin.it, which was probably an underlying
1677 cause of <rdar://problem/5744037> Gmail out of memory (17455)
1679 If SubresourceLoader::create returned NULL, we would ref() / gcProtect()
1680 the XMLHttpRequest but think we hadn't, therefore never
1681 calling deref() / gcUnprotect().
1683 This could happen at gmail.com, since gmail.com attempts to send
1684 XMLHttpRequests from unload handlers in order to gather usage statistics.
1685 (According to comments in the code, SubresourceLoader::create returns
1686 NULL when called from an unload handler.)
1688 The solution is to ref() / gcProtect() only if SubresourceLoader::create
1689 doesn't return NULL. This make sense, since we only need to protect the
1690 request as long as it has an outstanding network transaction.
1692 * xml/XMLHttpRequest.cpp:
1693 (WebCore::XMLHttpRequest::XMLHttpRequest):
1694 (WebCore::XMLHttpRequest::send):
1696 2008-02-22 Darin Adler <darin@apple.com>
1698 Reviewed, tweaked and landed by Sam.
1700 - Make RegularExpression operate on Strings instead of DeprecatedStrings.
1702 * dom/DOMImplementation.cpp:
1703 (WebCore::DOMImplementation::isXMLMIMEType): Use string instead of DeprecatedString
1704 to build up the RegularExpression.
1706 (WebCore::createRegExpForLabels): Use String instead of DeprecatedString.
1707 (WebCore::Frame::searchForLabelsAboveCell): Ditto.
1708 (WebCore::Frame::searchForLabelsBeforeElement): Ditto.
1709 (WebCore::Frame::matchLabelsAgainstElement): Ditto.
1711 * page/mac/FrameMac.mm:
1712 (WebCore::regExpForLabels): Ditto.
1713 (WebCore::Frame::searchForNSLabelsAboveCell): Ditto.
1714 (WebCore::Frame::searchForLabelsBeforeElement): Ditto.
1715 (WebCore::Frame::matchLabelsAgainstElement): Ditto.
1717 * platform/text/RegularExpression.cpp:
1718 (WebCore::RegularExpression::Private::Private):
1719 (WebCore::RegularExpression::Private::compile):
1720 (WebCore::RegularExpression::RegularExpression):
1721 (WebCore::RegularExpression::operator=):
1722 (WebCore::RegularExpression::pattern):
1723 (WebCore::RegularExpression::match):
1724 (WebCore::RegularExpression::search):
1725 (WebCore::RegularExpression::searchRev):
1726 (WebCore::replace): Added.
1727 * platform/text/RegularExpression.h:
1728 Change functions to take Strings as input instead of DeprecatedStrings and
1729 reduce the complexity of the class by removing unneeded globbing support.
1731 2008-02-22 Jon Honeycutt <jhoneycutt@apple.com>
1735 <rdar://problem/5760360> REGRESSION(r30376): Crash loading plugin page
1736 during stress test (after only 5 min) - null dereference
1738 Full-frame plug-ins create PluginStream objects without loaders, as the
1739 PluginView receives the loading callbacks. We were trying to call
1740 setDefersLoading on these null pointers.
1742 * plugins/PluginStream.cpp:
1743 (WebCore::PluginStream::startStream): Add null check.
1744 (WebCore::PluginStream::destroyStream): Same.
1745 (WebCore::PluginStream::deliverData): Same.
1747 2008-02-22 Darin Adler <darin@apple.com>
1749 Reviewed and tweaked by Jon Honeycutt. Reviewed and landed by Sam.
1751 - Remove uses of DeprecatedString in Windows plugin code.
1753 * plugins/win/PluginPackageWin.cpp:
1754 (WebCore::getVersionInfo): Cleanup formatting.
1755 (WebCore::PluginPackage::freeLibraryTimerFired): Remove un-needed variable name.
1756 (WebCore::PluginPackage::storeFileVersion): Move casts.
1757 (WebCore::PluginPackage::fetchInfo): Use OwnArrayPtr and switch to more efficient
1759 (WebCore::PluginPackage::load): Fix whitespace.
1760 (WebCore::PluginPackage::hash): Make the hashCodes const
1761 * plugins/win/PluginViewWin.cpp:
1762 (WebCore::makeURL): Use String instead of DeprecatedString.
1763 (WebCore::parseRFC822HeaderFields): Ditto.
1764 (WebCore::PluginView::handlePost): Ditto.
1765 (WebCore::PluginView::status): Ditto.
1767 2008-02-22 Darin Adler <darin@apple.com>
1769 Reviewed, tweaked and landed by Sam.
1771 - Don't use DeprecatedString in HTMLTokenizer.
1773 * html/HTMLTokenizer.cpp:
1774 (WebCore::HTMLTokenizer::finish):
1775 * platform/text/PlatformString.h:
1778 2008-02-21 Sam Weinig <sam@webkit.org>
1780 Reviewed by Anders Carlsson.
1782 Fix for <rdar://problem/5757946>
1784 - Parse URLs before checking whether they are javascript: urls
1785 (which require security checks).
1787 * bindings/js/JSAttrCustom.cpp:
1788 (WebCore::JSAttr::setValue):
1789 * bindings/js/JSElementCustom.cpp:
1790 (WebCore::allowSettingSrcToJavascriptURL):
1791 * bindings/js/JSHTMLFrameElementCustom.cpp:
1792 (WebCore::allowSettingJavascriptURL):
1793 * bindings/js/JSHTMLIFrameElementCustom.cpp:
1794 (WebCore::JSHTMLIFrameElement::setSrc):
1796 2008-02-21 Ada Chan <adachan@apple.com>
1798 <rdar://problem/5757873> Buffer overrun in DeprecatedCString::find() in WebCore
1799 We could get a buffer overrun in DeprecatedCString::find() if the end of the
1800 string matches a beginning portion of the substring, for example, if string is
1801 "a" but the substring is "ab".
1802 The code as is also will not match things correctly under certain situations
1803 since the inner while loop increments the index. For example, we wouldn't find
1804 a match if the string is "aab..." and the substring is "ab". Changed the
1805 inner while loop to increment a temporary index into str.
1807 Test: fast/loader/charset-parse.html
1809 Reviewed by Dan Berstein.
1811 * platform/DeprecatedCString.cpp:
1812 (WebCore::DeprecatedCString::find):
1814 2008-02-21 David Hyatt <hyatt@apple.com>
1816 Fix for bug 17301. CSS media queries need to use the correct viewport
1817 when contained in documents inside iframes (rather than always using the
1818 top-level document's viewport). CSS media queries based on the viewport
1819 also needed to be dynamic and update as you resize the window (this is
1822 This patch gets Acid3 up to 86/100 with 3 colored boxes filled in.
1826 Added fast/media/viewport-media-query.html
1828 * css/CSSStyleSelector.cpp:
1829 (WebCore::CSSStyleSelector::CSSStyleSelector):
1830 (WebCore::CSSStyleSelector::addViewportDependentMediaQueryResult):
1831 (WebCore::CSSStyleSelector::affectedByViewportChange):
1832 * css/CSSStyleSelector.h:
1833 (WebCore::MediaQueryResult::MediaQueryResult):
1834 * css/MediaQueryEvaluator.cpp:
1835 (WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
1836 (WebCore::MediaQueryEvaluator):
1837 (WebCore::MediaQueryEvaluator::eval):
1838 (WebCore::colorMediaFeatureEval):
1839 (WebCore::monochromeMediaFeatureEval):
1840 (WebCore::device_aspect_ratioMediaFeatureEval):
1841 (WebCore::device_pixel_ratioMediaFeatureEval):
1842 (WebCore::gridMediaFeatureEval):
1843 (WebCore::device_heightMediaFeatureEval):
1844 (WebCore::device_widthMediaFeatureEval):
1845 (WebCore::heightMediaFeatureEval):
1846 (WebCore::widthMediaFeatureEval):
1847 (WebCore::min_colorMediaFeatureEval):
1848 (WebCore::max_colorMediaFeatureEval):
1849 (WebCore::min_monochromeMediaFeatureEval):
1850 (WebCore::max_monochromeMediaFeatureEval):
1851 (WebCore::min_device_aspect_ratioMediaFeatureEval):
1852 (WebCore::max_device_aspect_ratioMediaFeatureEval):
1853 (WebCore::min_device_pixel_ratioMediaFeatureEval):
1854 (WebCore::max_device_pixel_ratioMediaFeatureEval):
1855 (WebCore::min_heightMediaFeatureEval):
1856 (WebCore::max_heightMediaFeatureEval):
1857 (WebCore::min_widthMediaFeatureEval):
1858 (WebCore::max_widthMediaFeatureEval):
1859 (WebCore::min_device_heightMediaFeatureEval):
1860 (WebCore::max_device_heightMediaFeatureEval):
1861 (WebCore::min_device_widthMediaFeatureEval):
1862 (WebCore::max_device_widthMediaFeatureEval):
1863 * css/MediaQueryEvaluator.h:
1864 * css/MediaQueryExp.cpp:
1865 (WebCore::MediaQueryExp::~MediaQueryExp):
1866 * css/MediaQueryExp.h:
1867 (WebCore::MediaQueryExp::value):
1868 (WebCore::MediaQueryExp::isViewportDependent):
1869 * html/HTMLMediaElement.cpp:
1870 (WebCore::HTMLMediaElement::pickMedia):
1871 * page/FrameView.cpp:
1872 (WebCore::FrameView::layout):
1874 2008-02-21 Anders Carlsson <andersca@apple.com>
1878 Make more classes start out with a refcount of 1.
1880 * dom/QualifiedName.cpp:
1881 (WebCore::QNameComponentsTranslator::translate):
1882 (WebCore::QualifiedName::QualifiedName):
1883 * dom/QualifiedName.h:
1884 (WebCore::QualifiedName::QualifiedNameImpl::create):
1885 (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
1886 * history/BackForwardList.cpp:
1887 (WebCore::BackForwardList::BackForwardList):
1888 * history/BackForwardList.h:
1889 (WebCore::BackForwardList::create):
1891 (WebCore::Page::Page):
1892 * platform/text/CString.cpp:
1893 (WebCore::CString::init):
1894 (WebCore::CString::newUninitialized):
1895 (WebCore::CString::copyBufferIfNeeded):
1896 * platform/text/CString.h:
1897 (WebCore::CStringBuffer::create):
1898 (WebCore::CStringBuffer::CStringBuffer):
1900 2008-02-21 Kevin Ollivier <kevino@theolliviers.com>
1902 wx build fix for the domString() -> string() rename in r30443.
1904 * platform/graphics/wx/FontPlatformDataWx.cpp:
1905 (WebCore::FontPlatformData::FontPlatformData):
1907 2008-02-21 Antti Koivisto <antti@apple.com>
1909 Reviewed by Sam Weinig.
1911 <rdar://problem/5753789>
1912 REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang)
1914 Ensure all versions of allowsAccessFrom are inlined to single functions.
1915 This is a 2% win in browser hosted Sunspider.
1917 * bindings/js/kjs_window.cpp:
1918 (KJS::Window::allowsAccessFrom):
1919 (KJS::Window::allowsAccessFromPrivate):
1920 * bindings/js/kjs_window.h:
1922 2008-02-21 Dan Bernstein <mitz@apple.com>
1924 Reviewed by Sam Weinig.
1928 * rendering/bidi.cpp:
1929 (WebCore::bidiNext): Removed redundant isBR() check -- isText() returns
1930 true for RenderLineBreak.
1931 (WebCore::bidiFirst): Ditto.
1932 (WebCore::shouldSkipWhitespaceAfterStartObject):
1933 (WebCore::RenderBlock::findNextLineBreak):
1935 2008-02-21 Geoffrey Garen <ggaren@apple.com>
1937 Reviewed by David Harrison.
1939 Fixed <rdar://problem/5756125> REGRESSION: A crash occurs at
1940 WebCore::Frame::scriptProxy() when completing a search with Package Tracker widget
1942 Test: fast/dom/script-element-without-frame-crash.html
1944 * html/HTMLTokenizer.cpp:
1945 (WebCore::HTMLTokenizer::parseTag): Added back a NULL check that was
1946 accidentally removed in r30325.
1948 2008-02-21 Rodney Dawes <dobey@wayofthemonkey.com>
1950 GTK+ build fix. s/domString()/string()/
1952 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1953 (FontPlatformData::FontPlatformData):
1955 2008-02-20 Dan Bernstein <mitz@apple.com>
1957 Reviewed by Dave Hyatt.
1959 - fix http://bugs.webkit.org/show_bug.cgi?id=17465
1960 REGRESSION: <DIV> tokenized into Div if still searching for DOCTYPE
1962 Test: fast/tokenizer/doctype-search-reset.html
1964 * html/HTMLTokenizer.cpp:
1965 (WebCore::HTMLTokenizer::parseTag):
1967 2008-02-20 Dan Bernstein <mitz@apple.com>
1969 Reviewed by Dave Hyatt.
1971 - fix http://bugs.webkit.org/show_bug.cgi?id=17464
1972 REGRESSION: Crash in RenderBlock::findNextLineBreak reading r30444 commit email in GMail
1974 Test: fast/text/wbr-in-pre-crash.html
1976 * rendering/bidi.cpp:
1977 (WebCore::RenderBlock::findNextLineBreak):
1979 2008-02-20 Oliver Hunt <oliver@apple.com>
1983 Bug 17303: Canvas crash in ImageBuffer
1985 We handle a null GraphicsContext everywhere, but we weren't checking for
1986 a null ImageBuffer, which is what will result in a null GraphicsContext in
1989 Test: fast/canvas/access-zero-sized-canvas.html
1991 * html/HTMLCanvasElement.cpp:
1993 2008-02-20 David Hyatt <hyatt@apple.com>
1995 Fix the layout test failure that never should have passed in the first
1996 place by making changes to media lists actually result in the recomputation
1997 of the style selector. Now it passes for the right reasons and not because
2000 Reviewed by Sam Weinig
2002 * css/MediaList.cpp:
2003 (WebCore::MediaList::deleteMedium):
2004 (WebCore::MediaList::setMediaText):
2005 (WebCore::MediaList::appendMedium):
2006 (WebCore::MediaList::notifyChanged):
2009 (WebCore::Document::attach):
2011 2008-02-20 Darin Adler <darin@apple.com>
2013 Reviewed, tweaked and landed by Sam.
2015 - make markup functions not use DeprecatedString.
2017 * editing/markup.cpp:
2018 (WebCore::append): Added.
2019 (WebCore::escapeContentText): Build up string using a Vector.
2020 (WebCore::appendStartMarkup): Use String instead of DeprecatedString.
2022 2008-02-20 Darin Adler <darin@apple.com>
2024 Reviewed, tweaked and landed by Sam.
2026 - make TextIterator use a Vector instead of a DeprecatedString.
2028 * editing/TextIterator.cpp:
2029 (WebCore::CharacterIterator::string): Build up the String using a
2031 (WebCore::WordAwareIterator::advance): Switch to using Vector functions.
2032 (WebCore::WordAwareIterator::length): Ditto.
2033 (WebCore::WordAwareIterator::characters): Ditto.
2034 * editing/TextIterator.h: Use a Vector<UChar> for the buffer instead
2035 of DeprecatedString.
2037 2008-02-20 Darin Adler <darin@apple.com>
2039 Reviewed, tweaked and landed by Sam.
2041 - make HTMLInterchange return a String instead of a DeprecatedString
2043 * editing/HTMLInterchange.cpp:
2044 (WebCore::): Return a String from convertedSpaceString.
2045 (WebCore::convertHTMLTextToInterchangeFormat): Use a Vector instead of
2046 a DeprecatedString to build up the return String.
2047 * editing/HTMLInterchange.h:
2049 2008-02-20 Eric Seidel <eric@webkit.org>
2053 Remove m_drawingContext and change m_data to m_imageBuffer
2055 * html/HTMLCanvasElement.cpp:
2056 (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2057 (WebCore::HTMLCanvasElement::reset):
2058 (WebCore::HTMLCanvasElement::paint):
2059 (WebCore::HTMLCanvasElement::createImageBuffer):
2060 (WebCore::HTMLCanvasElement::buffer):
2061 (WebCore::HTMLCanvasElement::createPlatformImage):
2062 * html/HTMLCanvasElement.h:
2064 2008-02-20 Anders Carlsson <andersca@apple.com>
2068 Rename AtomicString::domString() to AtomicString::string().
2070 * css/CSSComputedStyleDeclaration.cpp:
2071 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2072 * css/CSSFontSelector.cpp:
2073 (WebCore::CSSFontSelector::getFontData):
2075 (WebCore::Attr::createTextChild):
2077 (WebCore::Comment::nodeName):
2079 (WebCore::Document::recalcStyleSelector):
2080 (WebCore::Document::setHTMLWindowEventListener):
2081 (WebCore::Document::formElementsState):
2082 * dom/StyledElement.cpp:
2083 (WebCore::StyledElement::parseMappedAttribute):
2085 (WebCore::Text::nodeName):
2086 * editing/SelectionController.cpp:
2087 (WebCore::SelectionController::debugRenderer):
2088 * html/HTMLCollection.cpp:
2089 (WebCore::HTMLCollection::checkForNameMatch):
2090 * html/HTMLElement.cpp:
2091 (WebCore::HTMLElement::nodeName):
2092 (WebCore::HTMLElement::setHTMLEventListener):
2093 * html/HTMLFormCollection.cpp:
2094 (WebCore::HTMLFormCollection::getNamedFormItem):
2095 * html/HTMLImageElement.cpp:
2096 (WebCore::HTMLImageElement::parseMappedAttribute):
2097 (WebCore::HTMLImageElement::isURLAttribute):
2098 * html/HTMLLinkElement.cpp:
2099 (WebCore::HTMLLinkElement::parseMappedAttribute):
2100 (WebCore::HTMLLinkElement::tokenizeRelAttribute):
2101 * html/HTMLObjectElement.cpp:
2102 (WebCore::HTMLObjectElement::isURLAttribute):
2103 (WebCore::HTMLObjectElement::containsJavaApplet):
2104 * html/HTMLParamElement.cpp:
2105 (WebCore::HTMLParamElement::isURLAttribute):
2106 * html/HTMLParser.cpp:
2107 (WebCore::HTMLParser::handleIsindex):
2108 * html/HTMLScriptElement.cpp:
2109 (WebCore::HTMLScriptElement::insertedIntoDocument):
2110 (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript):
2111 * html/HTMLStyleElement.cpp:
2112 (WebCore::HTMLStyleElement::parseMappedAttribute):
2113 * html/HTMLTokenizer.cpp:
2114 (WebCore::HTMLTokenizer::parseTag):
2115 * html/HTMLViewSourceDocument.cpp:
2116 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
2117 * loader/FrameLoader.cpp:
2118 (WebCore::FrameLoader::saveDocumentState):
2119 * page/FrameTree.cpp:
2120 (WebCore::FrameTree::uniqueChildName):
2121 * platform/text/AtomicString.h:
2122 (WebCore::AtomicString::string):
2123 (WebCore::AtomicString::contains):
2124 (WebCore::AtomicString::find):
2125 (WebCore::AtomicString::startsWith):
2126 (WebCore::AtomicString::endsWith):
2127 * rendering/RenderPartObject.cpp:
2128 (WebCore::RenderPartObject::updateWidget):
2129 * svg/SVGElement.cpp:
2130 (WebCore::SVGElement::addSVGEventListener):
2131 * svg/SVGSVGElement.cpp:
2132 (WebCore::SVGSVGElement::addSVGWindowEventListener):
2133 * xml/XPathFunctions.cpp:
2134 (WebCore::XPath::FunLocalName::evaluate):
2135 (WebCore::XPath::FunNamespaceURI::evaluate):
2136 (WebCore::XPath::FunName::evaluate):
2138 2008-02-20 Brent Fulgham <bfulgham@gmail.com>
2142 http://bugs.webkit.org/show_bug.cgi?id=17336
2143 Provide implementations for Windows (Cairo) build of WebKit that
2144 handles font formatting.
2145 - Split font implementation files to allow maximal code sharing
2146 between CG and Cairo back-ends.
2148 * WebCore.vcproj/WebCore.vcproj:
2149 * platform/graphics/SimpleFontData.h: Add signatures for private win
2150 initialization functions.
2151 * platform/graphics/win/FontCacheWin.cpp:
2152 (WebCore::FontCache::platformInit):
2153 (WebCore::FontCache::createFontPlatformData):
2154 * platform/graphics/win/FontCairoWin.cpp: Removed. Universal version
2155 is now part of platform/graphics/cairo.
2156 * platform/graphics/win/FontCustomPlatformDataCairo.cpp: Added.
2157 (WebCore::FontCustomPlatformDataCairo::~FontCustomPlatformDataCairo):
2158 (WebCore::FontCustomPlatformDataCairo::fontPlatformData):
2159 (WebCore::releaseData):
2160 (WebCore::createFontCustomPlatformData):
2161 * platform/graphics/win/FontCustomPlatformDataCairo.h: Added.
2162 (WebCore::FontCustomPlatformDataCairo::FontCustomPlatformDataCairo):
2163 * platform/graphics/win/FontPlatformData.h:
2164 (WebCore::FontPlatformData::FontPlatformData):
2165 (WebCore::FontPlatformData::fontFace):
2166 (WebCore::FontPlatformData::scaledFont):
2167 (WebCore::FontPlatformData::operator==):
2168 * platform/graphics/win/FontPlatformDataCGWin.cpp: Copied from WebCore/platform/graphics/win/FontPlatformDataWin.cpp.
2169 (WebCore::FontPlatformData::platformDataInit):
2170 * platform/graphics/win/FontPlatformDataCairoWin.cpp: Added.
2171 (WebCore::FontPlatformData::platformDataInit):
2172 (WebCore::FontPlatformData::FontPlatformData):
2173 (WebCore::FontPlatformData::setFont):
2174 * platform/graphics/win/FontPlatformDataWin.cpp: Moved CG-specific
2175 code to FontPlatformDataCG.cpp.
2176 (WebCore::FontPlatformData::FontPlatformData):
2177 * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp: Copied from WebCore/platform/graphics/win/GlyphPageTreeNodeWin.cpp.
2178 * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp: Copied from WebCore/platform/graphics/win/GlyphPageTreeNodeWin.cpp.
2179 (WebCore::GlyphPage::fill):
2180 * platform/graphics/win/GlyphPageTreeNodeWin.cpp: Removed. Replaced
2181 with CG- and Cairo-specific versions.
2182 * platform/graphics/win/SimpleFontDataCGWin.cpp:
2183 (WebCore::SimpleFontData::platformInit):
2184 (WebCore::SimpleFontData::platformDestroy):
2185 (WebCore::SimpleFontData::platformWidthForGlyph):
2186 * platform/graphics/win/SimpleFontDataCairoWin.cpp:
2187 (WebCore::SimpleFontData::platformInit):
2188 (WebCore::SimpleFontData::platformDestroy):
2189 (WebCore::SimpleFontData::platformWidthForGlyph):
2190 (WebCore::SimpleFontData::setFont):
2191 * platform/graphics/win/SimpleFontDataWin.cpp:
2192 (WebCore::SimpleFontData::initGDIFont):
2193 (WebCore::SimpleFontData::platformCommonDestroy):
2194 (WebCore::SimpleFontData::widthForGDIGlyph):
2196 2008-02-20 Darin Adler <darin@apple.com>
2200 * dom/Node.h: Took out unneeded forward declaration of TextStream.
2202 2008-02-20 Darin Adler <darin@apple.com>
2206 * rendering/RenderObject.h: Took out unneeded forward declaration of TextStream.
2208 2008-02-20 David Hyatt <hyatt@apple.com>
2210 Fix for bug 16760, incorrect <object> MIME type handling and fallback
2215 * html/HTMLImageLoader.cpp:
2216 (WebCore::HTMLImageLoader::notifyFinished):
2217 If the image had an error, make sure to do <object> fallback.
2219 * html/HTMLObjectElement.cpp:
2220 (WebCore::HTMLObjectElement::renderFallbackContent):
2221 Before doing fallback check if there is a MIME type mismatch between
2222 an image type and a non-image type. If so, detach and re-attach after
2223 storing the correct MIME type.
2225 * loader/loader.cpp:
2226 (WebCore::Loader::didReceiveData):
2227 Consider it an error when a 404 is encountered on a CachedResource load.
2229 2008-02-20 Anders Carlsson <andersca@apple.com>
2233 StringImpl constructors used by AtomicString should start with a refcount of 1.
2235 * platform/text/AtomicString.cpp:
2236 (WebCore::AtomicString::add):
2237 * platform/text/AtomicString.h:
2238 * platform/text/StringImpl.cpp:
2239 (WebCore::StringImpl::StringImpl):
2241 2008-02-20 Darin Adler <darin@apple.com>
2243 * bindings/js/kjs_navigator.cpp:
2244 (WebCore::needsYouTubeQuirk): Tweak comments.
2246 2008-02-20 Anders Carlsson <andersca@apple.com>
2250 Change all refcounted classes in page/ to start with a refcount of 1.
2253 (WebCore::BarInfo::BarInfo):
2255 (WebCore::BarInfo::create):
2257 (WebCore::Console::Console):
2259 (WebCore::Console::create):
2260 * page/DOMSelection.cpp:
2261 (WebCore::DOMSelection::DOMSelection):
2262 * page/DOMSelection.h:
2263 (WebCore::DOMSelection::create):
2264 * page/DOMWindow.cpp:
2265 (WebCore::DOMWindow::DOMWindow):
2266 (WebCore::DOMWindow::screen):
2267 (WebCore::DOMWindow::history):
2268 (WebCore::DOMWindow::locationbar):
2269 (WebCore::DOMWindow::menubar):
2270 (WebCore::DOMWindow::personalbar):
2271 (WebCore::DOMWindow::scrollbars):
2272 (WebCore::DOMWindow::statusbar):
2273 (WebCore::DOMWindow::toolbar):
2274 (WebCore::DOMWindow::console):
2275 (WebCore::DOMWindow::getSelection):
2277 (WebCore::DOMWindow::create):
2279 (WebCore::Frame::domWindow):
2281 (WebCore::History::History):
2283 (WebCore::History::create):
2284 * page/InspectorController.cpp:
2285 (WebCore::InspectorResource::create):
2286 (WebCore::InspectorResource::InspectorResource):
2287 (WebCore::InspectorDatabaseResource::create):
2288 (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
2289 (WebCore::InspectorController::didLoadResourceFromMemoryCache):
2290 (WebCore::InspectorController::identifierForInitialRequest):
2291 (WebCore::InspectorController::didOpenDatabase):
2293 (WebCore::Plugin::create):
2294 (WebCore::Plugin::Plugin):
2296 (WebCore::Screen::Screen):
2298 (WebCore::Screen::create):
2300 2008-02-20 Sam Weinig <sam@webkit.org>
2302 Reviewed by Darin and Geoff.
2304 - <rdar://problem/5754378> work around missing video on YouTube front page with a site-specific hack
2306 * WebCore.base.exp: Updated.
2308 * bindings/js/kjs_navigator.cpp:
2309 (WebCore::needsYouTubeQuirk): Added. Return true on Windows only when the quirk is needed.
2310 (WebCore::Navigator::getValueProperty): For the appVersion property, if needsYouTubeQuirk
2311 return true, then return the empty string.
2313 * page/Settings.cpp:
2314 (WebCore::Settings::Settings): Set m_needsSiteSpecificQuirks to false.
2315 (WebCore::Settings::setNeedsSiteSpecificQuirks): Added.
2316 * page/Settings.h: Added m_needsSiteSpecificQuirks.
2317 (WebCore::Settings::needsSiteSpecificQuirks): Added.
2319 2008-02-20 David Hyatt <hyatt@apple.com>
2321 Fix for bug 12751, doctype nodes aren't part of the Document (Acid3).
2323 Reviewed by Sam Weinig
2325 Many tests added in fast/doctypes.
2327 * dom/DOMImplementation.cpp:
2328 (WebCore::DOMImplementation::createDocument):
2329 (WebCore::DOMImplementation::createHTMLDocument):
2331 (WebCore::Document::Document):
2332 (WebCore::Document::setDocType):
2333 (WebCore::Document::attach):
2334 (WebCore::Document::getImageMap):
2336 (WebCore::Document::doctype):
2337 (WebCore::Document::):
2338 (WebCore::Document::determineParseMode):
2339 (WebCore::Document::setParseMode):
2340 (WebCore::Document::parseMode):
2341 (WebCore::Document::inCompatMode):
2342 (WebCore::Document::inAlmostStrictMode):
2343 (WebCore::Document::inStrictMode):
2344 * dom/DocumentType.cpp:
2345 (WebCore::DocumentType::cloneNode):
2346 (WebCore::DocumentType::insertedIntoDocument):
2347 (WebCore::DocumentType::removedFromDocument):
2348 * dom/DocumentType.h:
2350 (WebCore::Node::childAllowed):
2351 * dom/StyledElement.cpp:
2352 (WebCore::StyledElement::attributeChanged):
2353 * dom/XMLTokenizer.cpp:
2354 (WebCore::XMLTokenizer::internalSubset):
2356 * editing/markup.cpp:
2357 (WebCore::appendStartMarkup):
2358 * html/HTMLAppletElement.cpp:
2359 (WebCore::HTMLAppletElement::createRenderer):
2360 * html/HTMLDocument.cpp:
2361 (WebCore::HTMLDocument::HTMLDocument):
2362 (WebCore::HTMLDocument::childAllowed):
2363 (WebCore::HTMLDocument::determineParseMode):
2364 * html/HTMLDocument.h:
2365 * html/HTMLMapElement.cpp:
2366 (WebCore::HTMLMapElement::parseMappedAttribute):
2367 * html/HTMLParamElement.cpp:
2368 (WebCore::HTMLParamElement::parseMappedAttribute):
2369 * html/HTMLParser.cpp:
2370 (WebCore::HTMLParser::parseDoctypeToken):
2371 * html/HTMLParser.h:
2372 * html/HTMLTokenizer.cpp:
2373 (WebCore::HTMLTokenizer::reset):
2374 (WebCore::HTMLTokenizer::parseDoctype):
2375 (WebCore::HTMLTokenizer::parseTag):
2376 (WebCore::HTMLTokenizer::write):
2377 (WebCore::HTMLTokenizer::finish):
2378 (WebCore::HTMLTokenizer::processDoctypeToken):
2379 * html/HTMLTokenizer.h:
2381 (WebCore::DoctypeToken::DoctypeToken):
2382 (WebCore::DoctypeToken::reset):
2383 (WebCore::DoctypeToken::state):
2384 (WebCore::DoctypeToken::setState):
2385 (WebCore::HTMLTokenizer::State::inDoctype):
2386 (WebCore::HTMLTokenizer::State::setInDoctype):
2387 (WebCore::HTMLTokenizer::State::needsSpecialWriteHandling):
2388 (WebCore::HTMLTokenizer::State::):
2389 * html/HTMLViewSourceDocument.cpp:
2390 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
2391 (WebCore::HTMLViewSourceDocument::addViewSourceDoctypeToken):
2392 * html/HTMLViewSourceDocument.h:
2393 * loader/FrameLoader.cpp:
2394 (WebCore::FrameLoader::write):
2395 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2397 (WebCore::Frame::documentTypeString):
2398 * page/inspector/utilities.js:
2399 * xml/XSLTProcessor.cpp:
2400 (WebCore::XSLTProcessor::createDocumentFromSource):
2402 2008-02-20 Anders Carlsson <andersca@apple.com>
2406 Change most SVG related classes to start out with a ref count of 1.
2408 * bindings/js/JSSVGPointListCustom.cpp:
2409 (WebCore::JSSVGPointList::initialize):
2410 (WebCore::JSSVGPointList::insertItemBefore):
2411 (WebCore::JSSVGPointList::replaceItem):
2412 (WebCore::JSSVGPointList::appendItem):
2413 * bindings/js/JSSVGTransformListCustom.cpp:
2414 (WebCore::JSSVGTransformList::initialize):
2415 (WebCore::JSSVGTransformList::insertItemBefore):
2416 (WebCore::JSSVGTransformList::replaceItem):
2417 (WebCore::JSSVGTransformList::appendItem):
2418 * rendering/SVGCharacterLayoutInfo.h:
2419 (WebCore::SVGCharOnPath::create):
2420 (WebCore::SVGCharOnPath::SVGCharOnPath):
2421 * rendering/SVGRootInlineBox.cpp:
2422 (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
2423 * svg/SVGAnimationElement.cpp:
2424 (WebCore::SVGAnimationElement::parseBeginOrEndValue):
2425 * svg/SVGClipPathElement.cpp:
2426 (WebCore::SVGClipPathElement::canvasResource):
2427 * svg/SVGElementInstance.cpp:
2428 (WebCore::SVGElementInstance::childNodes):
2429 * svg/SVGElementInstanceList.cpp:
2430 (WebCore::SVGElementInstanceList::SVGElementInstanceList):
2431 * svg/SVGElementInstanceList.h:
2432 (WebCore::SVGElementInstanceList::create):
2433 * svg/SVGFitToViewBox.cpp:
2434 (WebCore::SVGFitToViewBox::SVGFitToViewBox):
2435 * svg/SVGGradientElement.cpp:
2436 (WebCore::SVGGradientElement::SVGGradientElement):
2437 (WebCore::SVGGradientElement::canvasResource):
2438 * svg/SVGImageElement.cpp:
2439 (WebCore::SVGImageElement::SVGImageElement):
2440 * svg/SVGLengthList.h:
2441 (WebCore::SVGLengthList::create):
2443 (WebCore::SVGList::SVGList):
2444 (WebCore::SVGPODListItem::create):
2445 (WebCore::SVGPODListItem::copy):
2446 (WebCore::SVGPODListItem::SVGPODListItem):
2447 (WebCore::SVGPODList::initialize):
2448 (WebCore::SVGPODList::insertItemBefore):
2449 (WebCore::SVGPODList::replaceItem):
2450 (WebCore::SVGPODList::appendItem):
2451 (WebCore::SVGPODList::SVGPODList):
2452 * svg/SVGMarkerElement.cpp:
2453 (WebCore::SVGMarkerElement::canvasResource):
2454 * svg/SVGMaskElement.cpp:
2455 (WebCore::SVGMaskElement::canvasResource):
2456 * svg/SVGNumberList.h:
2457 (WebCore::SVGNumberList::create):
2458 * svg/SVGPathElement.cpp:
2459 (WebCore::SVGPathElement::createSVGPathSegClosePath):
2460 (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
2461 (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
2462 (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
2463 (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
2464 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
2465 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
2466 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
2467 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
2468 (WebCore::SVGPathElement::createSVGPathSegArcAbs):
2469 (WebCore::SVGPathElement::createSVGPathSegArcRel):
2470 (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
2471 (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
2472 (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
2473 (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
2474 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
2475 (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
2476 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
2477 (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
2478 (WebCore::SVGPathElement::pathSegList):
2479 * svg/SVGPathElement.h:
2481 (WebCore::SVGPathSeg::SVGPathSeg):
2482 * svg/SVGPathSegArc.h:
2483 (WebCore::SVGPathSegArcAbs::create):
2484 (WebCore::SVGPathSegArcRel::create):
2485 * svg/SVGPathSegClosePath.h:
2486 (WebCore::SVGPathSegClosePath::create):
2487 * svg/SVGPathSegCurvetoCubic.h:
2488 (WebCore::SVGPathSegCurvetoCubicAbs::create):
2489 (WebCore::SVGPathSegCurvetoCubicRel::create):
2490 * svg/SVGPathSegCurvetoCubicSmooth.h:
2491 (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
2492 (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
2493 * svg/SVGPathSegCurvetoQuadratic.h:
2494 (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
2495 (WebCore::SVGPathSegCurvetoQuadraticRel::create):
2496 * svg/SVGPathSegCurvetoQuadraticSmooth.h:
2497 (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
2498 (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
2499 * svg/SVGPathSegLineto.h:
2500 (WebCore::SVGPathSegLinetoAbs::create):
2501 (WebCore::SVGPathSegLinetoRel::create):
2502 * svg/SVGPathSegLinetoHorizontal.h:
2503 (WebCore::SVGPathSegLinetoHorizontalAbs::create):
2504 (WebCore::SVGPathSegLinetoHorizontalRel::create):
2505 * svg/SVGPathSegLinetoVertical.h:
2506 (WebCore::SVGPathSegLinetoVerticalAbs::create):
2507 (WebCore::SVGPathSegLinetoVerticalRel::create):
2508 * svg/SVGPathSegList.h:
2509 (WebCore::SVGPathSegList::create):
2510 * svg/SVGPathSegMoveto.h:
2511 (WebCore::SVGPathSegMovetoAbs::create):
2512 (WebCore::SVGPathSegMovetoRel::create):
2513 * svg/SVGPatternElement.cpp:
2514 (WebCore::SVGPatternElement::SVGPatternElement):
2515 (WebCore::SVGPatternElement::canvasResource):
2516 * svg/SVGPointList.h:
2517 (WebCore::SVGPointList::create):
2518 * svg/SVGPolyElement.cpp:
2519 (WebCore::SVGPolyElement::points):
2520 * svg/SVGPreserveAspectRatio.cpp:
2521 (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
2522 * svg/SVGPreserveAspectRatio.h:
2523 (WebCore::SVGPreserveAspectRatio::create):
2524 * svg/SVGRenderingIntent.h:
2525 (WebCore::SVGRenderingIntent::SVGRenderingIntent):
2526 * svg/SVGStringList.h:
2527 (WebCore::SVGStringList::create):
2528 * svg/SVGStyledTransformableElement.cpp:
2529 (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
2531 (WebCore::SVGTests::requiredFeatures):
2532 (WebCore::SVGTests::requiredExtensions):
2533 (WebCore::SVGTests::systemLanguage):
2534 * svg/SVGTextElement.cpp:
2535 (WebCore::SVGTextElement::SVGTextElement):
2536 * svg/SVGTextPositioningElement.cpp:
2537 (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
2538 * svg/SVGTransformList.h:
2539 (WebCore::SVGTransformList::create):
2540 * svg/SVGUnitTypes.h:
2541 (WebCore::SVGUnitTypes::SVGUnitTypes):
2542 * svg/SVGViewElement.cpp:
2543 (WebCore::SVGViewElement::viewTarget):
2544 * svg/SVGViewSpec.cpp:
2545 (WebCore::SVGViewSpec::SVGViewSpec):
2546 * svg/graphics/SVGPaintServer.cpp:
2547 (WebCore::SVGPaintServer::sharedSolidPaintServer):
2548 * svg/graphics/SVGPaintServer.h:
2549 * svg/graphics/SVGPaintServerGradient.h:
2550 (WebCore::SVGPaintServerGradient::SharedStopCache::create):
2551 (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache):
2552 * svg/graphics/SVGPaintServerLinearGradient.h:
2553 (WebCore::SVGPaintServerLinearGradient::create):
2554 * svg/graphics/SVGPaintServerPattern.h:
2555 (WebCore::SVGPaintServerPattern::create):
2556 * svg/graphics/SVGPaintServerRadialGradient.h:
2557 (WebCore::SVGPaintServerRadialGradient::create):
2558 * svg/graphics/SVGPaintServerSolid.h:
2559 (WebCore::SVGPaintServerSolid::create):
2560 * svg/graphics/SVGResource.cpp:
2561 (WebCore::SVGResource::SVGResource):
2562 * svg/graphics/SVGResource.h:
2563 * svg/graphics/SVGResourceClipper.h:
2564 (WebCore::SVGResourceClipper::create):
2565 * svg/graphics/SVGResourceMarker.h:
2566 (WebCore::SVGResourceMarker::create):
2567 * svg/graphics/SVGResourceMasker.h:
2568 (WebCore::SVGResourceMasker::create):
2569 * svg/graphics/cg/SVGPaintServerGradientCg.cpp:
2570 (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache):
2572 2008-02-20 Darin Adler <darin@apple.com>
2576 - make conversion from CSS ParseString to String and AtomicString
2577 automatic and remove all the explicit calls to do the conversion
2579 - fix CSS parsing to do fewer allocations, mostly by using the
2580 equalIgnoringCase function in CSSParser
2582 * css/CSSGrammar.y: Take out all the explicit atomicString and
2583 domString calls now that ParseString knows how to convert itself.
2585 * css/CSSParser.cpp:
2586 (WebCore::equal): Added.
2587 (WebCore::equalIgnoringCase): Allow non-lettters.
2588 (WebCore::ParseString::lower): Used charactersAreAllASCII.
2589 (WebCore::unitFromString): Use equal.
2590 (WebCore::CSSParser::parseValue): Removed unneeded call to domString.
2591 (WebCore::CSSParser::parseContent): Use equalIgnoringCase.
2592 (WebCore::CSSParser::parseBackgroundImage): Removed unneeded call to domString.
2593 (WebCore::CSSParser::parseTransitionTimingFunction): Use equalIgnoringCase.
2594 (WebCore::CSSParser::parseDashboardRegions): More of the same.
2595 (WebCore::CSSParser::parseCounterContent): Ditto.
2596 (WebCore::CSSParser::parseShape): Use equalIgnoringCase.
2597 (WebCore::CSSParser::parseFontFamily): Removed unneeded calls to domString.
2598 (WebCore::CSSParser::parseFontFaceSrc): More.
2599 (WebCore::CSSParser::parseFontFaceUnicodeRange): More.
2600 (WebCore::CSSParser::parseColor): Don't lowercase here -- setNamedColor now
2601 handles the case folding.
2602 (WebCore::CSSParser::parseColorFromValue): More.
2603 (WebCore::CSSParser::parseBorderImage): More.
2604 (WebCore::CSSParser::parseCounter): More.
2605 (WebCore::TransformOperationInfo::TransformOperationInfo): More.
2606 (WebCore::CSSParser::parseTransform): More.
2607 (WebCore::CSSParser::createCharsetRule): More.
2608 (WebCore::CSSParser::createImportRule): More.
2610 * css/CSSParser.h: Removed domString and atomicString functions.
2611 (WebCore::ParseString::operator String): Added. Allows conversion to String
2612 without an explicit function call.
2613 (WebCore::ParseString::operator AtomicString): Ditto.
2615 * css/MediaQueryExp.cpp:
2616 (WebCore::MediaQueryExp::MediaQueryExp): Removed a call to domString.
2617 * css/SVGCSSParser.cpp:
2618 (WebCore::CSSParser::parseSVGValue): Removed calls to domString.
2620 * platform/graphics/Color.cpp:
2621 (WebCore::findNamedColor): Call toASCIILower on each character as we copy
2622 it into the 8-bit character buffer to make the operation fold case.
2624 2008-02-20 Justin Garcia <justin.garcia@apple.com>
2626 Reviewed by Darin Adler.
2628 <rdar://problem/5694920> Typing (esp. deleting) is slower due to TOT WebCore changes
2630 * editing/DeleteSelectionCommand.cpp:
2631 (WebCore::DeleteSelectionCommand::initializeStartEnd): The common case here
2632 is where there are no special elements. Avoid creating VisiblePositions in
2633 that case. Additionally, this change postpones the more expensive creation
2634 of an upstream VisiblePosition until the last possible moment.
2635 (WebCore::DeleteSelectionCommand::saveTypingStyleState):
2636 (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Add an
2637 early return for a common case: deleting characters that are all inside the
2638 same text node. In that case the style at the start of the selection will
2639 not change during the delete, so there is no need to save/recompute it.
2640 (WebCore::DeleteSelectionCommand::saveFullySelectedAnchor): Early return
2641 before VisiblePosition creation if the ends of the selection aren't enclosed
2643 * editing/TypingCommand.cpp:
2644 (WebCore::TypingCommand::markMisspellingsAfterTyping): Early return if spell
2645 checking isn't enabled.
2647 2008-02-20 Alexey Proskuryakov <ap@webkit.org>
2649 Incorporates some improvements made by Dan Bernstein.
2653 http://bugs.webkit.org/show_bug.cgi?id=17106
2654 <rdar://problem/5750722> Debug build ASSERTs on page load
2656 Test: fast/encoding/GBK/close-gbk-converter.html
2658 * platform/text/TextCodecICU.cpp:
2659 (WebCore::getGbkEscape): Changed to use a switch instead of a HashMap, as there
2660 are only four values.
2661 (WebCore::gbkCallbackEscape): Check the reason why the function is called, and do not attempt
2662 getting an escape character if it's not UCNV_UNASSIGNED.
2663 (WebCore::gbkCallbackSubstitute): Ditto.
2665 2008-02-20 Alexey Proskuryakov <ap@webkit.org>
2669 * xml/XMLHttpRequest.cpp:
2670 (WebCore::isSafeRequestHeader):
2671 (WebCore::XMLHttpRequest::setRequestHeader):
2673 2008-02-20 Alexey Proskuryakov <ap@webkit.org>
2677 <rdar://problem/5749455> Unable to set the Referer header in Dashboard using XMLHttpRequest
2679 Cannot be tested in DRT.
2681 * xml/XMLHttpRequest.cpp: (WebCore::canSetRequestHeader): Assume that a request that can load
2682 local files can also set any headers.
2684 2008-02-19 Darin Adler <darin@apple.com>
2688 - removed use of DeprecatedString for font family names
2690 * css/CSSFontSelector.cpp:
2691 (WebCore::CSSFontSelector::addFontFaceRule): Update for name change.
2692 * css/CSSParser.cpp:
2693 (WebCore::CSSParser::parseFontFamily): Update to use new appendSpaceSeparated
2694 function and String rather than DeprecatedString.
2695 * css/CSSStyleSelector.cpp:
2696 (WebCore::CSSStyleSelector::applyProperty): Updated for name change.
2697 * css/FontFamilyValue.cpp:
2698 (WebCore::FontFamilyValue::FontFamilyValue): Replaced code using a regular
2699 expression with code that does the same thing more efficiently.
2700 (WebCore::FontFamilyValue::appendSpaceSeparated): Added.
2701 (WebCore::FontFamilyValue::cssText): Updated for name change.
2702 * css/FontFamilyValue.h: Changed DeprecatedString to String. Renamed fontName
2703 to familyName and parsedFontName to m_familyName. Removed unused genericFamilyType
2704 and m_genericFamilyType. Added appendSpaceSeparated so that m_familyName can
2705 be private instead of public.
2707 2008-02-19 Darin Adler <darin@apple.com>
2709 - fix build when SVG is not enabled
2711 * rendering/RenderTreeAsText.cpp: Added include of "TextStream.h".
2713 2008-02-19 Anders Carlsson <andersca@apple.com>
2717 Change all classes in xml/ to start out with a ref count of 1.
2719 * bindings/js/JSCustomXPathNSResolver.h:
2720 * bindings/js/JSXMLHttpRequest.cpp:
2721 (WebCore::JSXMLHttpRequest::JSXMLHttpRequest):
2722 * bindings/js/JSXSLTProcessor.cpp:
2723 (WebCore::JSXSLTProcessor::JSXSLTProcessor):
2724 * bindings/objc/DOMCustomXPathNSResolver.h:
2725 (WebCore::DOMCustomXPathNSResolver::create):
2726 * bindings/scripts/CodeGeneratorJS.pm:
2727 * bindings/scripts/CodeGeneratorObjC.pm:
2729 (WebCore::Document::applyXSLTransform):
2730 (WebCore::Document::createExpression):
2731 (WebCore::Document::createNSResolver):
2732 (WebCore::Document::evaluate):
2734 (WebCore::DOMParser::create):
2735 (WebCore::DOMParser::DOMParser):
2736 * xml/NativeXPathNSResolver.h:
2737 (WebCore::NativeXPathNSResolver::create):
2738 * xml/XMLHttpRequest.cpp:
2739 (WebCore::XMLHttpRequest::XMLHttpRequest):
2740 * xml/XMLHttpRequest.h:
2741 (WebCore::XMLHttpRequest::create):
2742 * xml/XMLSerializer.h:
2743 (WebCore::XMLSerializer::create):
2744 (WebCore::XMLSerializer::XMLSerializer):
2745 * xml/XPathEvaluator.cpp:
2746 (WebCore::XPathEvaluator::createNSResolver):
2747 * xml/XPathEvaluator.h:
2748 (WebCore::XPathEvaluator::create):
2749 (WebCore::XPathEvaluator::XPathEvaluator):
2750 * xml/XPathExpression.cpp:
2751 (WebCore::XPathExpression::createExpression):
2752 (WebCore::XPathExpression::evaluate):
2753 * xml/XPathExpression.h:
2754 (WebCore::XPathExpression::create):
2755 (WebCore::XPathExpression::XPathExpression):
2756 * xml/XPathNSResolver.h:
2757 * xml/XPathResult.cpp:
2758 (WebCore::XPathResult::XPathResult):
2759 * xml/XPathResult.h:
2760 (WebCore::XPathResult::create):
2761 * xml/XPathValue.cpp:
2762 (WebCore::XPath::Value::modifiableNodeSet):
2764 (WebCore::XPath::ValueData::create):
2765 (WebCore::XPath::ValueData::ValueData):
2766 (WebCore::XPath::Value::Value):
2767 * xml/XSLTProcessor.h:
2768 (WebCore::XSLTProcessor::create):
2769 (WebCore::XSLTProcessor::XSLTProcessor):
2771 2008-02-19 Darin Adler <darin@apple.com>
2775 - Trimmed down TextStream and weaned it from DeprecatedString.
2777 * page/mac/WebCoreFrameBridge.mm:
2778 (-[WebCoreFrameBridge renderTreeAsExternalRepresentation]):
2779 Removed now-unneeded call to getNSString.
2781 * platform/text/TextStream.cpp: Removed unused functions.
2782 Use snprintf instead of sprintf, for better security.
2783 (WebCore::TextStream::release): Added.
2784 * platform/text/TextStream.h: Removed lots of unneeded stuff.
2786 * rendering/RenderTreeAsText.cpp:
2787 (WebCore::externalRepresentation): Changed to use String instead
2788 of DeprecatedString.
2789 * rendering/RenderTreeAsText.h: Ditto.
2791 * rendering/SVGRenderTreeAsText.cpp:
2792 (WebCore::writeSVGInlineTextBox): Use "\n" instead of endl.
2793 (WebCore::write): Ditto.
2794 (WebCore::writeRenderResources): Ditto.
2796 2008-02-19 Justin Garcia <justin.garcia@apple.com>
2798 Reviewed by Darin Adler.
2800 <rdar://problem/5694920> Typing (esp. deleting) is slower due to TOT WebCore changes
2802 This brings performance on the phone back to old levels. Andre and I are doing
2803 some formal testing to see exactly where we stand.
2806 (WebCore::enclosingBlockIgnoringEditability): Added. This is enclosingBlock
2807 without the expensive editability checks. upstream and downstream can avoid
2808 those because they do their own editability checking.
2809 (WebCore::Position::upstream):
2810 (WebCore::Position::downstream):
2812 2008-02-19 Chris Fleizach <cfleizach@apple.com>
2816 <rdar://problem/3663560> AXLink for a "name" (anchor) on same page should include an AXLinkedUIElementAttribute
2818 * bridge/mac/WebCoreAXObject.mm:
2819 (-[WebCoreAXObject linkedUIElement]):
2820 Returns the linked-to AX object (if the specified one is ignored by accessibility, returns the next un-ignored one by traversing the DOM).
2822 (-[WebCoreAXObject accessibilityAttributeNames]):
2823 (-[WebCoreAXObject accessibilityAttributeValue:]):
2824 Support NSAccessibilityLinkedUIElementsAttribute.
2826 2008-02-19 Darin Adler <darin@apple.com>
2830 - Removed old debugging aids, Node::dump, RenderObject::dump, and
2831 RenderObject::information, that used DeprecatedString.
2833 * dom/CharacterData.cpp: Removed override of Node::dump.
2834 * dom/CharacterData.h: Ditto.
2835 * dom/Element.cpp: Ditto.
2836 * dom/Element.h: Ditto.
2837 * dom/EventTargetNode.cpp: Ditto.
2838 * dom/EventTargetNode.h: Ditto.
2839 * dom/Node.cpp: Removed Node::dump.
2840 * dom/Node.h: Ditto.
2842 * rendering/RenderBlock.cpp: Removed override of RenderObject::dump.
2843 * rendering/RenderBlock.h: Ditto.
2844 * rendering/RenderFrameSet.cpp: Ditto.
2845 * rendering/RenderFrameSet.h: Ditto.
2846 * rendering/RenderObject.cpp: Removed RenderObject::dump and
2847 RenderObject::information.
2848 * rendering/RenderObject.h: Ditto.
2849 * rendering/RenderTable.cpp: Removed override of RenderObject::dump.
2850 * rendering/RenderTable.h: Ditto.
2851 * rendering/RenderTableCell.cpp: Ditto.
2852 * rendering/RenderTableCell.h: Ditto.
2853 * rendering/RenderTableCol.cpp: Ditto.
2854 * rendering/RenderTableCol.h: Ditto.
2855 * rendering/RenderTableSection.cpp: Ditto.
2856 * rendering/RenderTableSection.h: Ditto.
2858 * rendering/RenderTreeAsText.h: Removed unneeded include of TextStream.h
2859 and added forward declarations as appropriate.
2861 * svg/SVGSVGElement.cpp: Removed unneeded include of TextStream.h.
2862 * svg/graphics/SVGResourceClipper.cpp: And here.
2863 * svg/graphics/SVGResourceFilter.cpp: Ditto.
2864 * svg/graphics/filters/SVGFEBlend.cpp: Ditto.
2865 * svg/graphics/filters/SVGFEComponentTransfer.cpp: Ditto.
2866 * svg/graphics/filters/SVGFEComposite.cpp: Ditto.
2867 * svg/graphics/filters/SVGFEDiffuseLighting.cpp: Ditto.
2868 * svg/graphics/filters/SVGFEGaussianBlur.cpp: Ditto.
2869 * svg/graphics/filters/SVGFEImage.cpp: Ditto.
2870 * svg/graphics/filters/SVGFEMerge.cpp: Ditto.
2871 * svg/graphics/filters/SVGFEMorphology.cpp: Ditto.
2872 * svg/graphics/filters/SVGFEOffset.cpp: Ditto.
2873 * svg/graphics/filters/SVGFESpecularLighting.cpp: Ditto.
2874 * svg/graphics/filters/SVGFETurbulence.cpp: Ditto.
2875 * svg/graphics/filters/SVGFilterEffect.cpp: Ditto.
2877 2008-02-19 Beth Dakin <bdakin@apple.com>
2881 Fix for <rdar://problem/5729674> Seed: Crash in
2882 RenderButton::setStyle at http://www.dinorpg.com
2884 Inputs should not honor first-letter.
2886 * rendering/RenderBlock.cpp:
2887 (WebCore::RenderBlock::updateFirstLetter):
2889 2008-02-19 Dan Bernstein <mitz@apple.com>
2891 Reviewed by Darin Adler.
2893 - fix <rdar://problem/5637569> CrashTracer: [REGRESSION] 620 crashes in Safari at com.apple.WebCore: WebCore::RenderBox::setStaticY + 15
2895 Test: fast/text/wbr-styled.html
2897 Changed RenderWordBreak to inherit from RenderText instead of
2900 * rendering/RenderBlock.cpp:
2901 (WebCore::RenderBlock::calcInlinePrefWidths):
2902 * rendering/RenderFlow.h:
2903 * rendering/RenderText.cpp:
2904 (WebCore::RenderText::renderName):
2905 (WebCore::RenderText::isTextFragment):
2906 (WebCore::RenderText::isWordBreak):
2907 * rendering/RenderText.h:
2908 * rendering/RenderWordBreak.cpp:
2909 (WebCore::RenderWordBreak::RenderWordBreak):
2910 * rendering/RenderWordBreak.h:
2911 * rendering/bidi.cpp:
2912 (WebCore::RenderBlock::findNextLineBreak):
2914 2008-02-19 Anders Carlsson <andersca@apple.com>
2919 * loader/mac/LoaderNSURLExtras.h:
2920 * loader/mac/LoaderNSURLExtras.m:
2921 Move unused functions to WebKit (where they are used)
2923 (vectorContainsString):
2924 Use const references.
2926 * platform/mac/WebCoreSystemInterface.h:
2927 * platform/mac/WebCoreSystemInterface.mm:
2928 Remove wkNSURLProtocolClassForReqest.
2930 2008-02-19 Justin Garcia <justin.garcia@apple.com>
2932 Reviewed by Darin Adler.
2934 <rdar://problem/5694920> Typing (esp. deleting) is slower due to TOT WebCore
2936 These changes bring deleting performance back to old levels on the phone
2937 except for deleting the first space to the right of a word, which we are
2941 (WebCore::Position::upstream): Avoid the use of enclosingBlock when determining
2942 if we have left the original enclosing block or entered a new one, and avoid
2943 rootEditableElement for determining if we have changed editability. These
2944 operations are expensive.
2945 (WebCore::Position::downstream): Ditto.
2947 2008-02-19 Darin Adler <darin@apple.com>
2949 Rubber stamped by Anders.
2951 - removed explicit initialization to 1 for RefCounted; that's now the default
2953 * loader/ResourceLoader.cpp:
2954 (WebCore::ResourceLoader::ResourceLoader): Removed RefCounted initializer.
2955 * platform/network/ResourceHandle.cpp:
2956 (WebCore::ResourceHandle::ResourceHandle): Ditto.
2957 * platform/text/StringImpl.cpp:
2958 (WebCore::StringImpl::StringImpl): Ditto.
2960 2008-02-18 Anders Carlsson <andersca@apple.com>
2964 Make ResourceLoader and ResourceHandle start out with a refcount of 1.
2966 * loader/MainResourceLoader.cpp:
2967 (WebCore::MainResourceLoader::create):
2968 * loader/NetscapePlugInStreamLoader.cpp:
2969 (WebCore::NetscapePlugInStreamLoader::create):
2970 * loader/ResourceLoader.cpp:
2971 (WebCore::ResourceLoader::ResourceLoader):
2972 * loader/SubresourceLoader.cpp:
2973 (WebCore::SubresourceLoader::create):
2974 * platform/network/ResourceHandle.cpp:
2975 (WebCore::ResourceHandle::ResourceHandle):
2976 (WebCore::ResourceHandle::create):
2978 2008-02-19 Alp Toker <alp@atoker.com>
2980 Reviewed by Mark Rowe.
2982 http://bugs.webkit.org/show_bug.cgi?id=16863
2983 [GTK] tab focusing doesn't work
2985 GDK_MOD2_MASK doesn't always mean meta so we can't use it to identify
2988 Use GDK_META_MASK where available, otherwise do not support the meta
2989 key. This matches the behaviour of other applications.
2991 Also add a comment noting that the platform event constructors need to
2992 be kept in sync (it's not obvious that there are multiple places that
2993 check the key state).
2995 * platform/gtk/KeyEventGtk.cpp:
2996 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2997 * platform/gtk/MouseEventGtk.cpp:
2998 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2999 * platform/gtk/WheelEventGtk.cpp:
3000 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3002 2008-02-18 Brady Eidson <beidson@apple.com>
3004 Reviewed by Sam Weinig's white rhino tusk stamp
3006 SQLiteTransaction::stop() should also reset the transaction-in-progress flag in its parent SQLiteDatabase
3008 * platform/sql/SQLiteTransaction.cpp:
3009 (WebCore::SQLiteTransaction::stop):
3011 2008-02-18 Brady Eidson <beidson@apple.com>
3015 Fix for <rdar://5747529> - ObjC Exception can cause JSLock to never be released
3017 Test: platform/mac/plugins/webScriptObject-exception-deadlock.html
3019 * bindings/objc/WebScriptObject.mm:
3020 (-[WebScriptObject valueForKey:]): The line `resultObj = [super valueForKey:key]; // defaults to throwing an exception`
3021 says it all - it throws an exception. This method also happens to hold the JSLock. Problematically, when the exeception
3022 is thrown and the method exited, the JSLock is never released. Fix that without otherwise changing behavior by holding the
3023 JSLock in two individual scopes - Right before the exception and right after.
3025 2008-02-18 Darin Adler <darin@apple.com>
3029 - reduce use of DeprecatedString and memory allocations in processing of CSS
3030 - remove unnecessary double -> float -> double trip in the CSS parser
3031 - cleaned up names and structure in CSS grammar
3033 * css/CSSGrammar.y: Remove getPropertyID and getValueID. Both are now in CSSParser.cpp
3034 instead, and they now work on ParseString and String objects and don't require the caller
3035 to put the string into a char*. Gave members of the %union more sensible names, removed
3036 duplicates, and sorted into a logical order. Put the %expect back in, rather than leaving
3038 * css/CSSParser.cpp:
3039 (WebCore::equalIgnoringCase): Added.
3040 (WebCore::hasPrefix): Added.
3041 (WebCore::CSSParser::parseTransitionProperty): Changed to call the new cssPropertyID,
3042 which obviates the need to call lower() and utf8() or to allocate memory at all. Also
3043 used equalIgnoringCase rather than putting the value into a String just to compare it.
3044 (WebCore::CSSParser::lex): Replaced convertASCIIToFloat with charactersToDouble. This change
3045 along with the CSSGrammar.y change, removes the double -> float -> double round trip, and
3046 affects the result of one layout test.
3047 (WebCore::cssPropertyID): Added. Gets the property ID from the gperf hash table, but
3048 without allocating any memory.
3049 (WebCore::cssValueKeywordID): Ditto.
3050 * css/CSSParser.h: Removed declaration for deprecatedString function (now used only in
3051 CSSParser.cpp; soon to be deleted). Added cssPropertyID and cssValueKeywordID functions.
3053 * css/CSSStyleDeclaration.cpp:
3054 (WebCore::CSSStyleDeclaration::getPropertyCSSValue): Call cssPropertyID instead of propertyID.
3055 (WebCore::CSSStyleDeclaration::getPropertyValue): Ditto.
3056 (WebCore::CSSStyleDeclaration::getPropertyPriority): Ditto.
3057 (WebCore::CSSStyleDeclaration::getPropertyShorthand): Ditto.
3058 (WebCore::CSSStyleDeclaration::isPropertyImplicit): Ditto.
3059 (WebCore::CSSStyleDeclaration::setProperty): Ditto.
3060 (WebCore::CSSStyleDeclaration::removeProperty): Ditto.
3061 (WebCore::CSSStyleDeclaration::isPropertyName): Ditto.
3062 * css/CSSStyleDeclaration.h: Removed unnecessary includes, unnecessary Noncopyable boilerplate,
3063 and the getPropertyID function declaration along with its associated apology comment.
3065 * css/makevalues.pl: Generate constants instead of macros for CSS value numbers (but not an
3066 enumeration, like properties, since you rarely have any reason to handle all values, but
3067 often have a reason to handle all properties). Renamed the constant for the number of CSS
3068 value keywords from CSS_VAL_TOTAL to numCSSValueKeywords, and added maxCSSValueKeywordLength.
3070 * platform/text/String.cpp:
3071 (WebCore::charactersToDouble): Made this function more efficient by using a stack buffer
3072 rather than a CString.
3074 2008-02-18 Dan Bernstein <mitz@apple.com>
3076 Reviewed by Dave Hyatt.
3078 - fix <rdar://problem/5736225> crash in svgFontAndFaceElementForFontData on digitalstrom.org/cms
3080 Test: fast/css/font-face-multiple-remote-sources.html
3082 * css/CSSFontFace.cpp:
3083 (WebCore::CSSFontFace::fontLoaded):
3084 * css/CSSSegmentedFontFace.cpp:
3085 (WebCore::CSSSegmentedFontFace::fontLoaded):
3087 2008-02-18 Darin Adler <darin@apple.com>
3091 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3092 (WebCore::hasCSSPropertyNamePrefix): Added.
3093 (WebCore::cssPropertyName): Reimplement to not use DeprecatedString. Also made faster
3094 by using a Vector<UChar> and eliminating all the string operations.
3096 2008-02-18 Stephanie Lewis <slewis@apple.com>
3100 Remove workaround for <rdar://problem/5695848>.
3102 * platform/network/cf/ResourceResponseCFNet.cpp:
3103 (WebCore::ResourceResponse::doUpdateResourceResponse):
3105 2008-02-18 Samuel Weinig <sam@webkit.org>
3107 Reviewed by Geoff Garen.
3109 Fix for http://bugs.webkit.org/show_bug.cgi?id=17419
3110 Remove CompatMode from JavaScriptCore as it is never set to anything other than NativeMode
3112 * bindings/js/kjs_proxy.cpp:
3113 (WebCore::KJSProxy::initScript):
3115 2008-02-18 Alp Toker <alp@atoker.com>
3117 Reviewed by Mark Rowe.
3119 http://bugs.webkit.org/show_bug.cgi?id=17381
3120 [CURL] Regression: data URL parsing broken after DeprecatedString removal (Acid2)
3122 This patch resolves the regression for the GTK+ port.
3124 * platform/network/curl/ResourceHandleManager.cpp:
3125 (WebCore::parseDataUrl):
3127 2008-02-18 Darin Adler <darin@apple.com>
3131 * platform/network/win/ResourceHandleWin.cpp:
3132 (WebCore::ResourceHandle::onHandleCreated): Use String instead of DeprecatedString.
3133 (WebCore::ResourceHandle::start): Ditto.
3135 2008-02-18 Darin Adler <darin@apple.com>
3139 * platform/network/win/CookieJarWin.cpp:
3140 (WebCore::setCookies): Use String instead of DeprecatedString.
3141 (WebCore::cookies): Ditto.
3143 2008-02-18 Darin Adler <darin@apple.com>
3147 - removed use of DeprecatedString in the Color class
3149 * platform/graphics/Color.cpp:
3150 (WebCore::Color::parseHexColor): Streamlined logic a bit with early returns.
3151 Used toASCIIHexValue a character at a time rather than using toIntStrict
3153 (WebCore::findNamedColor): Added. Uses a fixed-size char buffer to look up
3154 a color using the gperf-generated findColor function. Saves a memory allocation
3155 vs. the old version that called DeprecatedString::latin1().
3156 (WebCore::Color::setNamedColor): Changed to use findNamedColor.
3158 2008-02-18 Darin Adler <darin@apple.com>
3162 * editing/htmlediting.cpp:
3163 (WebCore::stringWithRebalancedWhitespace): Changed to use String instead of
3166 2008-02-18 Darin Adler <darin@apple.com>
3170 * editing/SelectionController.cpp:
3171 (WebCore::SelectionController::debugRenderer): Changed to use String instead of
3174 2008-02-18 Darin Adler <darin@apple.com>
3176 Reviewed and landed by Sam.
3178 Remove DeprecatedStringList.
3182 * WebCore.vcproj/WebCore.vcproj:
3183 * WebCore.xcodeproj/project.pbxproj:
3184 * WebCoreSources.bkl:
3185 * editing/markup.cpp:
3186 * platform/DeprecatedStringList.cpp: Removed.
3187 * platform/DeprecatedStringList.h: Removed.
3188 * platform/mac/DeprecatedStringListMac.mm: Removed.
3190 2008-02-18 Darin Adler <darin@apple.com>
3194 * css/CSSPrimitiveValueMappings.h: Add default cases to all the switch statements.
3195 This will ease the way some day if we decide to use an enum instead of int; otherwise
3196 we'll have a ton of "unhandled enum value" warnings here.
3198 2008-02-18 Alp Toker <alp@atoker.com>
3200 Build fix for GTK+ < 2.10. Fall back to simple text clipboard copy
3201 with older GTK+ versions for now.
3203 * platform/gtk/PasteboardGtk.cpp:
3204 (WebCore::Pasteboard::writeSelection):
3206 2008-02-18 Darin Adler <darin@apple.com>
3210 * WebCore.base.exp: Export a couple of WebCore::String functions we plan to use
3211 in the future in WebKit.
3213 2008-02-18 Darin Adler <darin@apple.com>
3217 * DerivedSources.make: Added the scripts to the ENABLE_SVG versions of the rules
3218 for CSSPropertyNames.h and CSSValueKeywords.h. Somehow that got left out, so the
3219 files would not be regenerated if the scripts were changed (but would if SVG was
3222 2008-02-18 Alexey Proskuryakov <ap@webkit.org>
3226 * platform/KURL.h: (WebCore::KURL::operator const String&): Added, to avoid unexpected
3227 conversion via UString (as in bug 17418).
3229 2008-02-18 Jon Honeycutt <jhoneycutt@apple.com>
3233 <rdar://problem/5744899> Crash in Flash when clicking "Yes" to abort
3234 slow script Flash 9 dialog at http://www.kidzui.com
3236 When navigating to a new page, we stop all outstanding PluginStreams.
3237 Flash hangs in the call to NPP_URLNotify. It eventually displays the
3238 "slow script" dialog, which relinquishes control to the system. While
3239 this dialog is running, the request we are in the process of cancelling
3240 completes, and we re-enter Flash to deliver the data. When the dialog
3241 is dismissed, the internal state of Flash has changed, and Flash
3242 crashes with a null dereference.
3244 To work around this, we can defer loading before entering plug-in code,
3245 so that even if a plug-in yields to the system, we won't get callbacks
3246 while we're handling a callback.
3248 * plugins/PluginStream.cpp:
3249 (WebCore::PluginStream::startStream): Defers loads while calling into
3251 (WebCore::PluginStream::destroyStream): Same.
3252 (WebCore::PluginStream::deliverData): Same.
3253 (WebCore::PluginStream::didFail): Protect 'this' from deletion by
3254 destroyStream. Null out m_loader only after destroyStream returns.
3255 (WebCore::PluginStream::didFinishLoading): Same.
3257 2008-02-18 Alexey Proskuryakov <ap@webkit.org>
3261 http://bugs.webkit.org/show_bug.cgi?id=17418
3262 REGRESSION: Assertion failure dragging image (JSLock::lockCount() > 0)
3264 * platform/win/ClipboardWin.cpp:
3265 (WebCore::ClipboardWin::declareAndWriteDragImage): Explicitly convert from KURL to String,
3266 as an implicit conversion uses UString and thus needs a JSLock.
3268 2008-02-17 Sam Weinig <sam@webkit.org>
3272 * loader/FrameLoader.cpp:
3273 (WebCore::FrameLoader::changeLocation):
3275 2008-02-17 Sam Weinig <sam@webkit.org>
3279 * WebCore.xcodeproj/project.pbxproj:
3281 2008-02-17 Alp Toker <alp@atoker.com>
3283 Attempt to fix the Wx build (has been broken all weekend).
3285 Stub out some graphics functions.
3287 * platform/graphics/wx/GraphicsContextWx.cpp:
3288 (WebCore::GraphicsContext::beginPath):
3289 (WebCore::GraphicsContext::addPath):
3290 * platform/graphics/wx/PathWx.cpp:
3291 (WebCore::Path::isEmpty):
3293 2008-02-17 Julien Chaffraix <julien.chaffraix@gmail.com>
3295 Reviewed by Alexey Proskuryakov.
3297 http://bugs.webkit.org/show_bug.cgi?id=16989
3298 bug 16989 : Add send() flag checks in XmlHttpRequest
3300 Splitted XmlHttpRequest::abort into abort (called from JavaScript) and internalAbort that
3301 perform the cancellation and is called mainly from internal methods.
3303 Tests: http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldDispatchEvent.html
3304 http/tests/xmlhttprequest/xmlhttprequest-abort-readyState-shouldNotDispatchEvent.html
3305 http/tests/xmlhttprequest/xmlhttprequest-test-send-flag.html
3307 * xml/XMLHttpRequest.cpp:
3308 (WebCore::XMLHttpRequest::open): Now call internalAbort() and moved readyState change into method
3309 (WebCore::XMLHttpRequest::send): Added m_loader check
3310 (WebCore::XMLHttpRequest::abort): Now update readyState and clear the request headers as specified
3313 (WebCore::XMLHttpRequest::internalAbort): Perform cancellation internal operations (no readyState update)
3314 (WebCore::XMLHttpRequest::setRequestHeader): Added m_loader check
3316 (WebCore::XMLHttpRequest::processSyncLoadResults): Now call internalAbort() instead of abort()
3317 (WebCore::XMLHttpRequest::willSendRequest): Ditto
3318 (WebCore::XMLHttpRequest::cancelRequests): Ditto
3319 (WebCore::XMLHttpRequest::detachRequests): Ditto
3320 * xml/XMLHttpRequest.h: Added the private internalAbort method
3322 2008-02-17 Sam Weinig <sam@webkit.org>
3324 Reviewed by Dan Bernstein.
3326 Fix for http://bugs.webkit.org/show_bug.cgi?id=17365
3327 document.createEvent("MessageEvent") throws NOT_SUPPORTED_ERR
3329 - Updated fast/events/event-instanceof.html to test document.createEvent("MessageEvent").
3331 * DerivedSources.make:
3332 Generate Objective-C binding for DOMProgressEvent which was missing.
3334 * WebCore.xcodeproj/project.pbxproj:
3335 Add missing DOMProgressEvent files to the project.
3337 * bindings/js/JSEventCustom.cpp:
3339 Clean up and add case for SVGZoomEvent that was missing.
3341 * bindings/objc/DOMEvents.mm:
3342 (+[DOMEvent _wrapEvent:WebCore::]):
3343 Clean up and add cases for ProgressEvent and MessageEvent that were missing.
3346 (WebCore::Document::createEvent):
3347 Add case for MessageEvent.
3349 2008-02-17 Adam Treat <treat@kde.org>
3351 Reviewed by Eric Seidel.
3353 http://bugs.webkit.org/show_bug.cgi?id=17008
3354 Meta refresh does not work with cache turned off
3356 Fix for issue noticed on http://adserver.vivox.com/2
3358 * loader/FrameLoader.cpp:
3359 (WebCore::FrameLoader::changeLocation):
3361 2008-02-17 Alp Toker <alp@atoker.com>
3363 Reviewed by Sam Weinig.
3365 Fix for change made in r30355. Issue noticed by İsmail Dönmez.
3367 Verify SSL certs by default, but allow checks to be disabled with an
3368 environment variable (WEBKIT_IGNORE_SSL_ERRORS) for now.
3370 * platform/network/curl/ResourceHandleManager.cpp:
3371 (WebCore::ResourceHandleManager::startJob):
3373 2008-02-17 Bin Chen <binary.chen@gmail.com>
3375 Reviewed by Alp Toker.
3377 http://bugs.webkit.org/show_bug.cgi?id=17404
3378 Bug 17404: curl certification problem
3380 Disable SSL cert verification until we have a way of distributing
3381 certs and/or reporting SSL errors to the user.
3383 * platform/network/curl/ResourceHandleManager.cpp:
3384 (WebCore::ResourceHandleManager::startJob):
3386 2008-02-17 Alp Toker <alp@atoker.com>
3388 Reviewed by Mark Rowe.
3390 DevHelp fails to load local files; URL truncated by one character.
3392 Fix a file:// URL regression introduced in KURL.cpp r30243.
3394 * platform/KURL.cpp:
3395 (WebCore::KURL::KURL):
3397 2008-02-17 Dan Bernstein <mitz@apple.com>
3399 Reviewed by Darin Adler.
3401 - fix http://bugs.webkit.org/show_bug.cgi?id=17033
3402 <rdar://problem/5709315> REGRESSION: Really long <option> causes unnecessary page scroll bars to accommodate content
3404 Test: fast/forms/control-clip-overflow.html
3406 * rendering/RenderFlow.cpp:
3407 (WebCore::RenderFlow::lowestPosition): Account for control clipping.
3408 (WebCore::RenderFlow::rightmostPosition): Ditto.
3409 (WebCore::RenderFlow::leftmostPosition): Ditto.
3411 2008-02-16 Oliver Hunt <oliver@apple.com>
3415 Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
3417 Use cross-platform code to determine the dirty rects for
3418 fill and stroke operations
3420 * html/CanvasRenderingContext2D.cpp:
3421 (WebCore::CanvasRenderingContext2D::fill):
3422 (WebCore::CanvasRenderingContext2D::stroke):
3423 Added a FIXME as code inspection shows a trivial under-painting
3424 bug, although we currently ignore dirty rect tracking on canvas
3425 and repaint the whole thing anyway.
3426 (WebCore::CanvasRenderingContext2D::fillRect):
3428 2008-02-16 Sam Weinig <sam@webkit.org>
3430 Reviewed by Darin Adler.
3432 Take another step in the direction of getting rid of DeprecatedString
3433 by moving all the to{NumericType} off of it.
3435 - Create free functions that take a UChar* buffer and length to do
3436 the string-to-number conversions. This allows us to avoid two allocations
3437 if we don't already have a String and is consistent with the design we would
3439 - Since the toInt (and family) functions on DeprecatedString were slightly
3440 different than the ones on String (they didn't allow trailing garbage),
3441 an extra set of 'Strict' toInt functions were added that have this behavior.
3443 * platform/graphics/Color.cpp:
3444 (WebCore::Color::parseHexColor):
3445 * platform/text/PlatformString.h:
3446 * platform/text/String.cpp:
3447 (WebCore::String::percentage):
3448 (WebCore::String::toIntStrict):
3449 (WebCore::String::toUIntStrict):
3450 (WebCore::String::toInt64Strict):
3451 (WebCore::String::toUInt64Strict):
3452 (WebCore::String::toUInt):
3453 (WebCore::String::toDouble):
3454 (WebCore::isCharacterAllowedInBase):
3455 (WebCore::toIntegralType):
3456 (WebCore::lengthOfCharactersAsInteger):
3457 (WebCore::charactersToIntStrict):
3458 (WebCore::charactersToUIntStrict):
3459 (WebCore::charactersToInt64Strict):
3460 (WebCore::charactersToUInt64Strict):
3461 (WebCore::charactersToInt):
3462 (WebCore::charactersToUInt):
3463 (WebCore::charactersToInt64):
3464 (WebCore::charactersToUInt64):
3465 (WebCore::charactersToDouble):
3466 (WebCore::charactersToFloat):
3467 * platform/text/StringImpl.cpp:
3468 (WebCore::parseLength):
3469 (WebCore::StringImpl::toIntStrict):
3470 (WebCore::StringImpl::toUIntStrict):
3471 (WebCore::StringImpl::toInt64Strict):
3472 (WebCore::StringImpl::toUInt64Strict):
3473 (WebCore::StringImpl::toInt):
3474 (WebCore::StringImpl::toUInt):
3475 (WebCore::StringImpl::toInt64):
3476 (WebCore::StringImpl::toUInt64):
3477 (WebCore::StringImpl::toDouble):
3478 (WebCore::StringImpl::toFloat):
3479 * platform/text/StringImpl.h:
3480 * svg/SVGAnimationElement.cpp:
3481 (WebCore::SVGAnimationElement::parseClockValue):
3482 * svg/SVGFETurbulenceElement.cpp:
3483 (WebCore::SVGFETurbulenceElement::parseMappedAttribute):
3485 2008-02-16 Dan Bernstein <mitz@apple.com>
3487 Reviewed by Sam Weinig.
3489 - fix fixed-pitch font measurement of control characters that render
3492 Test: fast/text/fixed-pitch-control-characters.html
3494 * rendering/RenderText.cpp:
3495 (WebCore::RenderText::widthFromCache):
3497 2008-02-16 Kevin Ollivier <kevino@theolliviers.com>
3501 * platform/graphics/wx/GraphicsContextWx.cpp:
3502 (WebCore::GraphicsContext::drawImage):
3504 2008-02-16 Jan Michael Alonzo <jmalonzo@unpluggable.com>
3506 Reviewed by Alp Toker.
3508 Cross document messaging GTK+/autotools build fix.
3512 2008-02-15 Oliver Hunt <oliver@apple.com>
3514 Build fix for Qt and Cairo builds
3516 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3517 (WebCore::GraphicsContext::drawImage):
3518 * platform/graphics/qt/GraphicsContextQt.cpp:
3520 2008-02-15 Oliver Hunt <oliver@apple.com>
3524 Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
3525 Refactor CanvasRenderingContext2D::drawImage(HTMLCanvasElement) to remove evil ifdefs
3527 Add logic draw(ImageBuffer*) method to GraphicsContext to handle
3528 painting the source canvas content.
3530 * html/CanvasRenderingContext2D.cpp:
3531 (WebCore::CanvasRenderingContext2D::drawImage):
3532 * html/HTMLCanvasElement.cpp:
3533 (WebCore::HTMLCanvasElement::buffer):
3534 * html/HTMLCanvasElement.h:
3535 * platform/graphics/GraphicsContext.h:
3536 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3537 (WebCore::GraphicsContext::drawImage):
3538 * platform/graphics/cg/GraphicsContextCG.cpp:
3539 (WebCore::GraphicsContext::paintBuffer):
3540 (WebCore::GraphicsContext::drawImage):
3541 * platform/graphics/qt/GraphicsContextQt.cpp:
3542 (WebCore::GraphicsContext::drawImage):
3544 2008-02-15 Kevin Ollivier <kevino@theolliviers.com>
3546 Reviewed by David Hyatt.
3548 Using GetNativeFontInfoDesc() to generate the hash value was
3549 leading to duplicate entries in the HashMap. Use the font object's
3552 http://bugs.webkit.org/show_bug.cgi?id=17371
3554 * platform/graphics/wx/FontPlatformData.h:
3555 (WebCore::FontPlatformData::computeHash):
3557 2008-02-15 Ada Chan <adachan@apple.com>
3559 When parsing url we get from a CFURLRef, we need to null terminate
3560 the string for the case when url ends with a '/'.
3564 * platform/cf/KURLCFNet.cpp:
3565 (WebCore::KURL::KURL):
3567 2008-02-15 Brady Eidson <beidson@apple.com>
3571 Fix for <rdar://problem/5727175> and <rdar://problem/5740495> - Database threads and callback scripts can run after
3572 a page has closed or loaded a new document
3574 Deciding to make the Database I/O semantic the same as loaders/XHR when a document is shut down, this patch implements
3575 a policy of shutting down the databases in a document at the same time. This includes removing all pending transactions
3576 in a database, cutting off an queued statements in the current transaction, and preventing further callbacks from being
3579 No new layout tests with this patch as the current layout tests were catching this issue in a plethora of ways already
3580 (crashing, unexpected exceptions and output, etc)
3583 (WebCore::Document::~Document): Don't ac