Timeline
Aug 30, 2008:
- 11:58 PM Changeset in webkit [36006] by
-
- 33 edits2 adds in trunk
2008-08-30 Darin Adler <Darin Adler>
Reviewed by Maciej.
- https://bugs.webkit.org/show_bug.cgi?id=20333 improve JavaScript speed when handling single-character strings
1.035x as fast on SunSpider overall.
1.127x as fast on SunSpider string tests.
1.910x as fast on SunSpider string-base64 test.
- API/JSObjectRef.cpp: (JSObjectMakeFunction): Removed unneeded explicit construction of UString.
- GNUmakefile.am: Added SmallStrings.h and SmallStrings.cpp.
- JavaScriptCore.pri: Ditto.
- JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
- JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
- JavaScriptCoreSources.bkl: Ditto.
- JavaScriptCore.exp: Updated.
- VM/Machine.cpp: (KJS::jsAddSlowCase): Changed to use a code path that doesn't involve a UString constructor. This avoids an extra jump caused by the "in charge" vs. "not in charge" constructors. (KJS::jsAdd): Ditto. (KJS::jsTypeStringForValue): Adopted jsNontrivialString.
- kjs/ArrayPrototype.cpp: (KJS::arrayProtoFuncToString): Adopted jsEmptyString. (KJS::arrayProtoFuncToLocaleString): Ditto. (KJS::arrayProtoFuncJoin): Ditto.
- kjs/BooleanPrototype.cpp: (KJS::booleanProtoFuncToString): Adopted jsNontrivialString.
- kjs/DateConstructor.cpp: (KJS::callDate): Ditto.
- kjs/DatePrototype.cpp: (KJS::formatLocaleDate): Adopted jsEmptyString and jsNontrivialString. (KJS::dateProtoFuncToString): Ditto. (KJS::dateProtoFuncToUTCString): Ditto. (KJS::dateProtoFuncToDateString): Ditto. (KJS::dateProtoFuncToTimeString): Ditto. (KJS::dateProtoFuncToLocaleString): Ditto. (KJS::dateProtoFuncToLocaleDateString): Ditto. (KJS::dateProtoFuncToLocaleTimeString): Ditto. (KJS::dateProtoFuncToGMTString): Ditto.
- kjs/ErrorPrototype.cpp: (KJS::ErrorPrototype::ErrorPrototype): Ditto. (KJS::errorProtoFuncToString): Ditto.
- kjs/JSGlobalData.h: Added SmallStrings.
- kjs/JSString.cpp: (KJS::jsString): Eliminated the overload that takes a const char*. Added code to use SmallStrings to get strings of small sizes rather than creating a new JSString every time. (KJS::jsSubstring): Added. Used when creating a string from a substring to avoid creating a JSString in cases where the substring will end up empty or as one character. (KJS::jsOwnedString): Added the same code as in jsString.
- kjs/JSString.h: Added new functions jsEmptyString, jsSingleCharacterString, jsSingleCharacterSubstring, jsSubstring, and jsNontrivialString for various cases where we want to create JSString, and want special handling for small strings. (KJS::JSString::JSString): Added an overload that takes a PassRefPtr of a UString::Rep so you don't have to construct a UString; PassRefPtr can be more efficient. (KJS::jsEmptyString): Added. (KJS::jsSingleCharacterString): Added. (KJS::jsSingleCharacterSubstring): Added. (KJS::jsNontrivialString): Added. (KJS::JSString::getIndex): Adopted jsSingleCharacterSubstring. (KJS::JSString::getStringPropertySlot): Ditto.
- kjs/NumberPrototype.cpp: (KJS::numberProtoFuncToFixed): Adopted jsNontrivialString. (KJS::numberProtoFuncToExponential): Ditto. (KJS::numberProtoFuncToPrecision): Ditto.
- kjs/ObjectPrototype.cpp: (KJS::objectProtoFuncToLocaleString): Adopted toThisJSString. (KJS::objectProtoFuncToString): Adopted jsNontrivialString.
- kjs/RegExpConstructor.cpp: Separated the lastInput value that's used with the lastOvector to return matches from the input value that can be changed via JavaScript. They will be equal in many cases, but not all. (KJS::RegExpConstructor::performMatch): Set input. (KJS::RegExpMatchesArray::RegExpMatchesArray): Ditto. (KJS::RegExpMatchesArray::fillArrayInstance): Adopted jsSubstring. Also, use input rather than lastInput in the appropriate place. (KJS::RegExpConstructor::getBackref): Adopted jsSubstring and jsEmptyString. Added code to handle the case where there is no backref -- before this depended on range checking in UString::substr which is not present in jsSubstring. (KJS::RegExpConstructor::getLastParen): Ditto. (KJS::RegExpConstructor::getLeftContext): Ditto. (KJS::RegExpConstructor::getRightContext): Ditto. (KJS::RegExpConstructor::getValueProperty): Use input rather than lastInput. Also adopt jsEmptyString. (KJS::RegExpConstructor::putValueProperty): Ditto. (KJS::RegExpConstructor::input): Ditto.
- kjs/RegExpPrototype.cpp: (KJS::regExpProtoFuncToString): Adopt jsNonTrivialString. Also changed to use UString::append to append single characters rather than using += and a C-style string.
- kjs/SmallStrings.cpp: Added. (KJS::SmallStringsStorage::SmallStringsStorage): Construct the buffer and UString::Rep for all 256 single-character strings for the U+0000 through U+00FF. This covers all the values used in the base64 test as well as most values seen elsewhere on the web as well. It's possible that later we might fix this to only work for U+0000 through U+007F but the others are used quite a bit in the current version of the base64 test. (KJS::SmallStringsStorage::~SmallStringsStorage): Free memory. (KJS::SmallStrings::SmallStrings): Create a set of small strings, initially not created; created later when they are used. (KJS::SmallStrings::~SmallStrings): Deallocate. Not left compiler generated because the SmallStringsStorage class's destructor needs to be visible. (KJS::SmallStrings::mark): Mark all the strings. (KJS::SmallStrings::createEmptyString): Create a cell for the empty string. Called only the first time. (KJS::SmallStrings::createSingleCharacterString): Create a cell for one of the single-character strings. Called only the first time.
- kjs/SmallStrings.h: Added.
- kjs/StringConstructor.cpp: (KJS::stringFromCharCodeSlowCase): Factored out of strinFromCharCode. Only used for cases where the caller does not pass exactly one argument. (KJS::stringFromCharCode): Adopted jsSingleCharacterString. (KJS::callStringConstructor): Adopted jsEmptyString.
- kjs/StringObject.cpp: (KJS::StringObject::StringObject): Adopted jsEmptyString.
- kjs/StringPrototype.cpp: (KJS::stringProtoFuncReplace): Adopted jsSubstring. (KJS::stringProtoFuncCharAt): Adopted jsEmptyString and jsSingleCharacterSubstring and also added a special case when the index is an immediate number to avoid conversion to and from floating point, since that's the common case. (KJS::stringProtoFuncCharCodeAt): Ditto. (KJS::stringProtoFuncMatch): Adopted jsSubstring and jsEmptyString. (KJS::stringProtoFuncSlice): Adopted jsSubstring and jsSingleCharacterSubstring. Also got rid of some unneeded locals and removed unneeded code to set the length property of the array, since it is automatically updated as values are added to the array. (KJS::stringProtoFuncSplit): Adopted jsEmptyString. (KJS::stringProtoFuncSubstr): Adopted jsSubstring. (KJS::stringProtoFuncSubstring): Ditto.
- kjs/collector.cpp: (KJS::Heap::collect): Added a call to mark SmallStrings.
- kjs/ustring.cpp: (KJS::UString::expandedSize): Made this a static member function since it doesn't need to look at any data members. (KJS::UString::expandCapacity): Use a non-inline function, makeNull, to set the rep to null in failure cases. This avoids adding a PIC branch for the normal case when there is no failure. (KJS::UString::expandPreCapacity): Ditto. (KJS::UString::UString): Ditto. (KJS::concatenate): Refactored the concatenation constructor into this separate function. Calling the concatenation constructor was leading to an extra branch because of the in-charge vs. not-in-charge versions not both being inlined, and this was showing up as nearly 1% on Shark. Also added a special case for when the second string is a single character, since it's a common idiom to build up a string that way and we can do things much more quickly, without involving memcpy for example. Also adopted the non-inline function, nullRep, for the same reason given for makeNull above. (KJS::UString::append): Adopted makeNull for failure cases. (KJS::UString::operator=): Ditto. (KJS::UString::toDouble): Added a special case for converting single character strings to numbers. We're doing this a ton of times while running the base64 test. (KJS::operator==): Added special cases so we can compare single-character strings without calling memcmp. Later we might want to special case other short lengths similarly. (KJS::UString::makeNull): Added. (KJS::UString::nullRep): Added.
- kjs/ustring.h: Added declarations for the nullRep and makeNull. Changed expandedSize to be a static member function. Added a declaration of the concatenate function. Removed the concatenation constructor. Rewrote operator+ to use the concatenate function.
WebCore:
2008-08-30 Darin Adler <Darin Adler>
Reviewed by Maciej.
- adopt some new JavaScriptCore functions where appropriate
- bindings/js/JSDOMWindowBase.cpp: (WebCore::windowProtoFuncAToB): Adopted jsEmptyString. (WebCore::windowProtoFuncBToA): Ditto.
- bindings/js/JSEventListener.cpp: (WebCore::JSLazyEventListener::eventParameterName): Adopted jsNontrivialString.
- bindings/js/JSSVGLazyEventListener.cpp: (WebCore::JSSVGLazyEventListener::eventParameterName): Ditto.
LayoutTests:
2008-08-30 Darin Adler <Darin Adler>
Reviewed by Maciej.
- updated incorrect results that reflected a bug in the RegExp object
- fast/js/regexp-caching-expected.txt: Updated results to correctly show that $1 through $9, lastMatch, lastParen, leftContext, and rightContext are left alone both when a program changes the value of RegExp.input and when it performs an unsuccessful match. The new results match Gecko behavior (I tested both Firefox 2 and 3).
- 1:39 PM Changeset in webkit [36005] by
-
- 4 edits in trunk/WebKit/win
2008-08-30 Sam Weinig <sam@webkit.org>
Reviewed by Dan Bernstein.
Add WebView SPI to defer loading callbacks.
- Interfaces/IWebViewPrivate.idl:
- WebView.cpp: (WebView::setDefersCallbacks): (WebView::defersCallbacks):
- WebView.h:
Aug 29, 2008:
- 5:42 PM Changeset in webkit [36004] by
-
- 2 edits in trunk/JavaScriptCore
2008-08-29 Anders Carlsson <andersca@apple.com>
Build fix.
- VM/Machine.cpp: (KJS::getCPUTime):
- 5:40 PM Changeset in webkit [36003] by
-
- 2 edits in trunk/JavaScriptCore
2008-08-29 Anders Carlsson <andersca@apple.com>
Reviewed by Darin.
<rdar://problem/6174667>
When a machine is under heavy load, the Slow Script dialog often comes up many times and just gets in the way
Instead of using clock time, use the CPU time spent executing the current thread when
determining if the script has been running for too long.
- VM/Machine.cpp: (KJS::getCPUTime): (KJS::Machine::checkTimeout):
- 5:30 PM Changeset in webkit [36002] by
-
- 2 edits in trunk/WebCore
2008-08-29 Brady Eidson <beidson@apple.com>
Reviewed by Anders' rubberstamp
Style cleanup to match MediaTokenizer::writeRawData()
- loader/PluginDocument.cpp: (WebCore::PluginTokenizer::writeRawData):
- 5:26 PM Changeset in webkit [36001] by
-
- 4 edits in trunk
WebCore:
2008-08-29 Brady Eidson <beidson@apple.com>
Reviewed by Anders
Fix regression I introducted in 35946
Already covered by media/video-click-dlbclick-standalone.html
- loader/MediaDocument.cpp: (WebCore::MediaTokenizer::createDocumentStructure): Don't cancel the load here - too early! (WebCore::MediaTokenizer::writeRawData): Call finish() here so onload() can be called. Also add an ASSERT signifying that this method should only be called once, to more closely follow the PluginDocument case.
WebKit/mac:
2008-08-29 Brady Eidson <beidson@apple.com>
Reviewed by Anders
Fix regression I introducted in 35946
Already covered by media/video-click-dlbclick-standalone.html
- WebView/WebHTMLRepresentation.mm: (-[WebHTMLRepresentation receivedData:withDataSource:]): Cancel the load here after calling [WebFrame _receivedData:] which more closely follows the path taken by PluginDocuments
- 5:00 PM Changeset in webkit [36000] by
-
- 4 edits in trunk/WebCore
2008-08-29 Beth Dakin <Beth Dakin>
Reviewed by Sam Weinig.
Fix for <rdar://problem/6181588>
This patch makes hit testing take into account the new concept of a
disconnected frame, in which some of the content may not be
visible. The current hit testing mechanism starts at a target frame
and drills down for a HitTestResult. In some cases, drilling down
will find a non-visible result. When this happens, we need to try
again, starting at a higher level -- namely, starting at the main
frame.
- editing/Editor.cpp: (WebCore::Editor::insideVisibleArea): New function that tests if a point is inside the visible area for a disconnected frame.
- editing/Editor.h:
- page/EventHandler.cpp: (WebCore::EventHandler::hitTestResultAtPoint):
- 3:30 PM Changeset in webkit [35999] by
-
- 8 edits2 moves in trunk/WebCore
2008-08-29 Adele Peterson <adele@apple.com>
Reviewed by Adam Roben.
Rename HTMLTextFieldInnerElement.h/.cpp to TextControlInnerElements.h/.cpp
- GNUmakefile.am:
- WebCore.pro:
- WebCore.vcproj/WebCore.vcproj:
- WebCore.xcodeproj/project.pbxproj:
- WebCoreSources.bkl:
- html/HTMLTextFieldInnerElement.cpp: Removed.
- html/HTMLTextFieldInnerElement.h: Removed.
- rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::createSubtreeIfNeeded):
- rendering/RenderTextControl.h:
- rendering/TextControlInnerElements.cpp: Copied from html/HTMLTextFieldInnerElement.cpp. (WebCore::TextControlInnerElement::TextControlInnerElement): (WebCore::TextControlInnerTextElement::TextControlInnerTextElement): (WebCore::TextControlInnerTextElement::defaultEventHandler): (WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement): (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement): (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
- rendering/TextControlInnerElements.h: Copied from html/HTMLTextFieldInnerElement.h.
- 2:40 PM Changeset in webkit [35998] by
-
- 2 edits in trunk/WebCore
Rubber-stamped by aroben.
Add GraphicsContext.h include to GraphcisContextPrivate.h
GraphicsContextPrivate uses StrokeStyle which is defined
in GraphicsContext.h but it doesn't include that header.
CoreGraphics build doesn't fail here due to the order
it happens to include files.
- platform/graphics/GraphicsContextPrivate.h:
- 2:39 PM Changeset in webkit [35997] by
-
- 1 edit in trunk/WebCore/ChangeLog
Reviewed by hyatt.
Fix GeneratedImage to respect Image's refcounting
Fixing potential crashers (future if not current)
https://bugs.webkit.org/show_bug.cgi?id=20567
I don't know if it's possible to make the current code
crash, thus I've not made a test.
- css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::image):
- css/CSSImageGeneratorValue.cpp: (WebCore::CSSImageGeneratorValue::removeClient): (WebCore::CSSImageGeneratorValue::getImage):
- css/CSSImageGeneratorValue.h:
- platform/graphics/GeneratedImage.h: (WebCore::GeneratedImage::GeneratedImage):
- rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::setContent):
- rendering/style/RenderStyle.h:
- 2:38 PM Changeset in webkit [35996] by
-
- 6 edits in trunk/WebCore
Fix GeneratedImage to respect Image's refcounting
- 1:24 PM Changeset in webkit [35995] by
-
- 2 edits in trunk/WebCore
2008-08-29 Eric Carlson <eric.carlson@apple.com>
Reviewed by Adele.
Fix for <rdar://problem/6093767>
https://bugs.webkit.org/show_bug.cgi?id=20526
Don't allow video to render until unsupported track types have been disabled.
- platform/graphics/win/QTMovieWin.cpp: (QTMovieWinPrivate::task): (QTMovieWinPrivate::drawingComplete): (QTMovieWinPrivate::clearGWorld):
- 1:07 PM Changeset in webkit [35994] by
-
- 3 edits2 adds in trunk
Reviewed by Adele.
Fix for https://bugs.webkit.org/show_bug.cgi?id=20525
<rdar://problem/6169301>
Return the size of the movie data instead of 1000. The value is used for the progress
event "total" attribute.
- media/progress-event-total-expected.txt: Added.
- media/progress-event-total.html: Added.
- 8:57 AM Changeset in webkit [35993] by
-
- 13 edits in trunk
2008-08-29 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Eric Seidel.
[janitor/qt] Start replacing port specific getters with the generic native getter
To get the native presentation of an image we currently have platform
specific #ifdef's and a generic getter using NativeImagePtr. This patch
extends this to the ImageBuffer and updates the Qt platform to get rid
of the special #ifdefs.
- 8:56 AM Changeset in webkit [35992] by
-
- 3 edits in trunk/WebCore
2008-08-29 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Simon.
[svg/qt] Stop crashing... when no RenderPath/RenderObject is given...
- 8:56 AM Changeset in webkit [35991] by
-
- 4 edits in trunk/WebKit/qt
2008-08-29 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Simon.
Catch up with the introduction of PageGroup in r30840. Enable tracking of
visited links, enable this in QWebPage next to the other WebCore init call.
Calling this more than once is no issue and a cheap operation, we also do not
reset the state. When clearing the history of a page, clear the link state.
- 8:56 AM Changeset in webkit [35990] by
-
- 2 edits in trunk/WebKit/qt
2008-08-29 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Simon.
Revert revision 34348 which removed the global historyContains() function.
This function was needed to implement the public API of QWebHistoryInterface
and will be used again in the near future.
- 8:56 AM Changeset in webkit [35989] by
-
- 4 edits in trunk/WebCore
2008-08-29 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Simon.
[network/qt] Implement defering of loading ResourceHandle's
This is needed otherwise we end in an ASSERT in the MainResourceLoader. The
implementation is simply not forwarding anything to the
ResourceHandleClient until we are allowed to. This might lead to a deadlock
in Qt as we do not empty the QNetworkReply input buffer and wait until we
are allowed to read. If that happens we are forced to buffer the data
within QNetworkReplyHandler, for now this is not done.
Manual test:
- Open http://acid3.acidtests.org
- Wait for the test to complete
- Click on the Reference Rendering link
- Be fast and see the results of acid3 => assert
- 5:35 AM Changeset in webkit [35988] by
-
- 4 edits in trunk/WebCore
2008-08-29 Simon Hausmann <Simon Hausmann>
Reviewed by Holger.
Don't crash when drawing patterns with the HTML canvas. Patterns
remain unimplemented but at least they don't crash anymore. This is
done by changing the PlatformPatternPtr to be a brush for the Qt
platform.
- 3:21 AM Changeset in webkit [35987] by
-
- 2 edits in trunk/WebCore
2008-08-29 Simon Hausmann <Simon Hausmann>
Fix the Qt build, fontSelector() is not used by the Qt port yet
and we just return 0 in Font::fontSelector().