Timeline
Feb 9, 2008:
- 11:00 PM Changeset in webkit [30119] by
-
- 2 edits in trunk/WebKit/mac
Reviewed by Tim Hatcher.
- fix <rdar://problem/5725996> crash every time you open the Xcode documentation window
- WebView/WebView.mm: (-[WebView _userAgentWithApplicationName:andWebKitVersion:]): Work around a bug in the garbage collector's Objective C++ support by not initializing a static to an object that needs to be marked when running under GC.
- 10:40 PM S60Webkit edited by
- (diff)
- 10:08 PM S60Webkit edited by
- (diff)
- 10:05 PM S60Webkit edited by
- (diff)
- 9:56 PM S60ConfigureComputer edited by
- (diff)
- 9:49 PM S60ConfigureComputer edited by
- (diff)
- 9:48 PM S60ConfigureComputer edited by
- (diff)
- 9:48 PM S60ConfigureComputer edited by
- (diff)
- 9:43 PM S60IDE edited by
- (diff)
- 8:52 PM Changeset in webkit [30118] by
-
- 2 edits in trunk/PlanetWebKit
2008-02-09 Alp Toker <alp@atoker.com>
Only syndicate Jan's WebKit posts, not his entire blog.
- config.ini:
- 4:16 PM Changeset in webkit [30117] by
-
- 2 edits in trunk/WebCore
Reviewed by Sam Weinig.
- fix http://bugs.webkit.org/show_bug.cgi?id=17259 Element::recalcStyle() needlessly null-checks the result of styleForElement()
- dom/Element.cpp: (WebCore::Element::recalcStyle): Removed unneeded null checks. styleForElement() can never return null.
- 3:47 PM Changeset in webkit [30116] by
-
- 3 edits4 adds in trunk
WebCore:
Fix for bug 17254, nth-* selectors do not work with negative coefficients.
Reviewed by Mitz.
fast/css/negative-nth-child.html
- css/CSSStyleSelector.cpp: (WebCore::parseNth):
LayoutTests:
Added test for bug 17254.
Reviewed by Mitz.
- fast/css/negative-nth-child.html: Added.
- 2:56 PM Changeset in webkit [30115] by
-
- 1 edit in trunk/WebCore/css/CSSStyleSelector.cpp
The comedy continues. Bungled the rename from Eric's review when doing the backout of CSSStyleSelector's accidental fix for 17254.
- 2:54 PM Changeset in webkit [30114] by
-
- 4 edits in trunk/WebCore/rendering
Followup to 17203. Missed a directory.
- 2:51 PM Changeset in webkit [30113] by
-
- 1 edit in trunk/WebCore/css/CSSStyleSelector.cpp
Back out accidental change to CSSStyleSelector.cpp.
- 2:49 PM Changeset in webkit [30112] by
-
- 70 edits in trunk/WebCore
Fix for bug 17203, high CPU usage loading HTML5 spec. This patch significantly improves the performance
of CSS3 selectors.
(1) Split the notion of being affected by positional rules into "forward" and "backward." The "forward"
selectors do not need to re-resolve during parsing, since children are appended on the end. Only the
"backward" selectors like last-child or nth-last-child have to re-resolve when a close tag is encountered.
(2) Extend childrenChanged to specify whether the children were changed by the parser or not. This allows
Element::childrenChanged to know when the parser is adding children so that it can ignore those adds when
possible.
(3) Make sure all Elements now know whether or not their children are currently parsing. Backwards selectors
like last-child will always return false when children are still being parsed. When an Element finishes
parsing its children, finishParsingChildren() gets called and will make sure the children re-resolve properly.
(4) Added a beginParsingChildren method and renamed finishParsing to finishedParsingChildren.
(5) Eliminated one-off hacks that did the same thing in HTMLObjectElement and HTMLAppletElement.
(6) Patched many incorrect implementations of finishedParsingChildren that did not properly call into their
base class (mostly new SVG elements that got added for SVG fonts around the time this became a requirement).
Reviewed by Eric
- css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::checkSelector): (WebCore::CSSStyleSelector::checkOneSelector):
- dom/Attr.cpp: (WebCore::Attr::childrenChanged):
- dom/Attr.h:
- dom/ContainerNode.cpp: (WebCore::ContainerNode::addChild):
- dom/Document.cpp: (WebCore::Document::childrenChanged):
- dom/Document.h:
- dom/Element.cpp: (WebCore::Element::Element): (WebCore::Element::recalcStyle): (WebCore::checkFirstChildRules): (WebCore::checkLastChildRules): (WebCore::checkEmptyRules): (WebCore::checkStyleRules): (WebCore::Element::childrenChanged): (WebCore::Element::finishParsingChildren):
- dom/Element.h: (WebCore::Element::finishedParsingChildren): (WebCore::Element::beginParsingChildren):
- dom/Node.cpp:
- dom/Node.h: (WebCore::Node::finishParsingChildren): (WebCore::Node::beginParsingChildren): (WebCore::Node::childrenChanged):
- dom/StyledElement.cpp: (WebCore::StyledElement::StyledElement):
- dom/StyledElement.h:
- dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::startElementNs): (WebCore::XMLTokenizer::endElementNs): (WebCore::):
- html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::HTMLAppletElement): (WebCore::HTMLAppletElement::finishParsingChildren):
- html/HTMLAppletElement.h:
- html/HTMLElementFactory.cpp: (WebCore::objectConstructor):
- html/HTMLGenericFormElement.cpp: (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
- html/HTMLGenericFormElement.h:
- html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::HTMLObjectElement): (WebCore::HTMLObjectElement::finishParsingChildren): (WebCore::HTMLObjectElement::childrenChanged):
- html/HTMLObjectElement.h:
- html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::childrenChanged):
- html/HTMLOptGroupElement.h:
- html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::childrenChanged):
- html/HTMLOptionElement.h:
- html/HTMLParser.cpp: (WebCore::HTMLParser::insertNode): (WebCore::HTMLParser::pushBlock): (WebCore::HTMLParser::popOneBlockCommon):
- html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::childrenChanged): (WebCore::HTMLScriptElement::finishParsingChildren):
- html/HTMLScriptElement.h:
- html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::childrenChanged):
- html/HTMLSelectElement.h:
- html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::finishParsingChildren): (WebCore::HTMLStyleElement::childrenChanged):
- html/HTMLStyleElement.h:
- html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::childrenChanged):
- html/HTMLTextAreaElement.h:
- html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::childrenChanged):
- html/HTMLTitleElement.h:
- rendering/RenderApplet.cpp:
(WebCore::RenderApplet::createWidgetIfNecessary):
- rendering/RenderPartObject.cpp: (WebCore::RenderPartObject::updateWidget):
- rendering/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle):
- rendering/RenderStyle.h: (WebCore::RenderStyle::childrenAffectedByForwardPositionalRules): (WebCore::RenderStyle::setChildrenAffectedByForwardPositionalRules): (WebCore::RenderStyle::childrenAffectedByBackwardPositionalRules): (WebCore::RenderStyle::setChildrenAffectedByBackwardPositionalRules):
- svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::finishParsingChildren):
- svg/SVGAnimationElement.h:
- svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::childrenChanged):
- svg/SVGClipPathElement.h:
- svg/SVGDefinitionSrcElement.cpp: (WebCore::SVGDefinitionSrcElement::childrenChanged):
- svg/SVGDefinitionSrcElement.h:
- svg/SVGElement.cpp: (WebCore::SVGElement::finishParsingChildren):
- svg/SVGElement.h:
- svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::childrenChanged):
- svg/SVGFontFaceElement.h:
- svg/SVGFontFaceFormatElement.cpp: (WebCore::SVGFontFaceFormatElement::childrenChanged):
- svg/SVGFontFaceFormatElement.h:
- svg/SVGFontFaceSrcElement.cpp: (WebCore::SVGFontFaceSrcElement::childrenChanged):
- svg/SVGFontFaceSrcElement.h:
- svg/SVGFontFaceUriElement.cpp: (WebCore::SVGFontFaceUriElement::childrenChanged):
- svg/SVGFontFaceUriElement.h:
- svg/SVGGElement.cpp: (WebCore::SVGGElement::childrenChanged):
- svg/SVGGElement.h:
- svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::childrenChanged):
- svg/SVGGradientElement.h:
- svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::childrenChanged):
- svg/SVGMarkerElement.h:
- svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::childrenChanged):
- svg/SVGMaskElement.h:
- svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::childrenChanged):
- svg/SVGPatternElement.h:
- svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::finishParsingChildren): (WebCore::SVGStyleElement::childrenChanged):
- svg/SVGStyleElement.h:
- svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::childrenChanged):
- svg/SVGStyledElement.h:
- svg/SVGTitleElement.cpp: (WebCore::SVGTitleElement::childrenChanged):
- svg/SVGTitleElement.h:
- svg/SVGUseElement.cpp: (WebCore::SVGUseElement::childrenChanged):
- svg/SVGUseElement.h:
- 2:38 PM Changeset in webkit [30111] by
-
- 2 edits in trunk/WebCore
2008-02-09 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
Unreviewed build fix
Somehow the removal of adjustSliderThumbSize(RenderObject*) sneaked
into the patch.
- platform/qt/RenderThemeQt.h:
- 2:16 PM Changeset in webkit [30110] by
-
- 5 edits in trunk/WebCore
2008-02-09 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
Reviewed by Adele.
paintResizeControl is dead, remove the code. This painting
is done by the RenderLayer.
- platform/qt/RenderThemeQt.cpp:
- platform/qt/RenderThemeQt.h:
- rendering/RenderThemeMac.h:
- rendering/RenderThemeMac.mm:
- 10:09 AM Changeset in webkit [30109] by
-
- 6 edits in trunk/JavaScriptCore
Reviewed by Mitz.
- http://bugs.webkit.org/show_bug.cgi?id=17256 Change RegExp to start its ref count at 1, not 0
We'll want to do this to every RefCounted class, one at a time.
- kjs/nodes.h: (KJS::RegExpNode::RegExpNode): Use RegExp::create instead of new RegExp.
- kjs/regexp.cpp: (KJS::RegExp::RegExp): Marked inline, set initial ref count to 1. (KJS::RegExp::create): Added. Calls new RegExp then adopts the initial ref.
- kjs/regexp.h: Reformatted. Made the constructors private. Added static create functions that return objects already wrapped in PassRefPtr.
- kjs/regexp_object.cpp: (KJS::regExpProtoFuncCompile): Use RegExp::create instead of new RegExp. (KJS::RegExpObjectImp::construct): Ditto.
- kjs/string_object.cpp: (KJS::stringProtoFuncMatch): Ditto. (KJS::stringProtoFuncSearch): Ditto.
- 2:45 AM ApplicationsGtk edited by
- Add the Vala language binding (diff)
- 12:13 AM Changeset in webkit [30108] by
-
- 3 edits in trunk/WebCore
MSVC7 fixes.
http://bugs.webkit.org/show_bug.cgi?id=17211
Feb 8, 2008:
- 10:47 PM Changeset in webkit [30107] by
-
- 3 edits in trunk/WebCore
2008-02-08 Brent Fulgham <bfulgham@gmail.com>
Reviewed by Adam Roben.
Bug 17226: Fix Windows (Cairo) build of image-decoders
http://bugs.webkit.org/show_bug.cgi?id=17226
- platform/image-decoders/gif/GIFImageDecoder.cpp:
- platform/image-decoders/png/PNGImageDecoder.cpp:
- 9:44 PM Changeset in webkit [30106] by
-
- 2 edits in trunk
2008-02-08 Alp Toker <alp@atoker.com>
Rubber-stamped by Maciej.
Bump autoconf CAIRO_REQUIRED_VERSION up to 1.4.
- configure.ac:
- 9:17 PM Changeset in webkit [30105] by
-
- 6 edits in trunk
<rdar://problem/5731773> REGRESSION (r28973): Extraneous parentheses in function.toString()
https://bugs.webkit.org/show_bug.cgi?id=17214
Reviewed by Maciej
Make a subclass of CommaNode to provide the correct precedence for each expression in
a variable declaration list.
- 8:15 PM Changeset in webkit [30104] by
-
- 8 edits in trunk/WebCore
Reviewed by Brady Eidson.
<rdar://problem/5640896> Removing database then trying
to recreate it causes trouble
Added open Database support to DatabaseTracker. So any Database that
is deleted will be marked as deleted and will fail to open any transaction
or execute any new SQL queries.
- storage/Database.cpp: (WebCore::Database::Database): Call DatabaseTracker::addOpenDatabase. (WebCore::Database::~Database): Call DatabaseTracker::removeOpenDatabase. (WebCore::Database::markAsDeleted): Set the m_deleted flag. (WebCore::Database::version): Return a null String if m_deleted is true.
- storage/Database.h: (WebCore::Database::deleted): Return m_deleted.
- storage/DatabaseTracker.cpp: (WebCore::DatabaseTracker::addOpenDatabase): Add the Database to a map of origins and names. (WebCore::DatabaseTracker::removeOpenDatabase): Remove the Database from the map. (WebCore::DatabaseTracker::deleteDatabaseFile): Call markAsDeleted on all the open Databases matching the origin/name.
- storage/DatabaseTracker.h:
- storage/SQLStatement.cpp: (WebCore::SQLStatement::setDatabaseDeletedError): Set the error about the user deleting the database.
- storage/SQLStatement.h:
- storage/SQLTransaction.cpp: (WebCore::SQLTransaction::executeSQL): If the Database is deleted, call setDatabaseDeletedError. (WebCore::SQLTransaction::openTransactionAndPreflight): Set the error about the user deleting the database if the Database was marked as deleted.
- 5:13 PM Changeset in webkit [30103] by
-
- 3 edits2 adds in trunk
Reviewed by Oliver.
- fix http://bugs.webkit.org/show_bug.cgi?id=17247 Labelled continue/break can fail in some cases
Test: fast/js/continue-break-multiple-labels.html
- kjs/nodes.h: (KJS::StatementNode::pushLabel): Made this virtual. (KJS::LabelNode::pushLabel): Forward pushLabel calls to the statement inside.
LayoutTests:
- test for http://bugs.webkit.org/show_bug.cgi?id=17247 Labelled continue/break can fail in some cases
- fast/js/continue-break-multiple-labels-expected.txt: Added.
- fast/js/continue-break-multiple-labels.html: Added.
- 5:06 PM Changeset in webkit [30102] by
-
- 7 edits3 adds in trunk
Reviewed by Eric.
- fix http://bugs.webkit.org/show_bug.cgi?id=15003 Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug)
Test: fast/js/constructor-attributes.html
- kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::reset): Remove unwanted attributes from "constructor".
- kjs/function_object.cpp: (KJS::FunctionObjectImp::construct): Ditto.
- kjs/nodes.cpp: (KJS::FuncDeclNode::makeFunction): Ditto. (KJS::FuncExprNode::evaluate): Ditto.
WebCore:
Reviewed by Eric.
- fix http://bugs.webkit.org/show_bug.cgi?id=15003 Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug)
Test: fast/js/constructor-attributes.html
- bindings/scripts/CodeGeneratorJS.pm: Remove unwanted attributes from "constructor".
LayoutTests:
Reviewed by Eric.
- test for http://bugs.webkit.org/show_bug.cgi?id=15003 Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug)
- fast/js/constructor-attributes-expected.txt: Added.
- fast/js/constructor-attributes.html: Added.
- fast/js/resources/constructor-attributes.js: Added.
- 4:07 PM Changeset in webkit [30101] by
-
- 3 edits2 adds in trunk
WebCore:
Reviewed by Mitz.
<rdar://problem/5650446>
http://bugs.webkit.org/show_bug.cgi?id=16102
Crash in FrameLoader::stopLoadingSubframes() on IMDB page
Store the child frame in a RefPtr to prevent it from being deleted when the
frame tree changes while calling stopAllLoaders().
- loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoadingSubframes):
LayoutTests:
Reviewed by Mitz.
<rdar://problem/5650446>
http://bugs.webkit.org/show_bug.cgi?id=16102
Crash in FrameLoader::stopLoadingSubframes() on IMDB page
- http/tests/navigation/changing-frame-hierarchy-in-onload-expected.txt: Added.
- http/tests/navigation/changing-frame-hierarchy-in-onload.html: Added.
- 3:35 PM Changeset in webkit [30100] by
-
- 2 edits in trunk/WebCore
wx port build fix.
- 3:06 PM Changeset in webkit [30099] by
-
- 1 edit in trunk/WebCore/ChangeLog
ChangeLog entry tweak: crasher affects debug, not release builds
- 3:04 PM Changeset in webkit [30098] by
-
- 2 edits in trunk/WebCore
2008-02-08 Alp Toker <alp@atoker.com>
Reviewed by Adam Roben.
Avoid null-dereference crasher noticed in the GTK+ port and also
affecting the Win release build.
Covered by existing tests.
- dom/Document.cpp: (WebCore::Document::userStyleSheet):
- 2:44 PM Changeset in webkit [30097] by
-
- 5 edits in trunk/WebCore
Reviewed by Adam.
<rdar://problem/5724188>
REGRESSION: PLT 0.7% slower due to 29926 (change Text::createWithLengthLimit to take a UChar pointer)
Revert r29926 which caused the regression.
- dom/Text.cpp: (WebCore::Text::createWithLengthLimit):
- dom/Text.h:
- html/HTMLParser.cpp: (WebCore::HTMLParser::parseToken):
- loader/TextDocument.cpp: (WebCore::TextTokenizer::write):
- 12:05 PM Changeset in webkit [30096] by
-
- 4 edits1 copy4 adds in trunk
WebCore:
Reviewed by Hyatt.
Fix for <rdar://problem/5732491>
http://bugs.webkit.org/show_bug.cgi?id=17213
The querySelectorAll method on an element node does not search only the element's descendants
Test: fast/dom/SelectorAPI/elementRoot.html
- dom/Node.cpp: (WebCore::Node::querySelector): Make sure to stay within the root node when traversing the tree.
- dom/SelectorNodeList.cpp: (WebCore::SelectorNodeList::SelectorNodeList): ditto.
LayoutTests:
Reviewed by Hyatt.
Test for <rdar://problem/5732491>
http://bugs.webkit.org/show_bug.cgi?id=17213
The querySelectorAll method on an element node does not search only the element's descendants
- fast/dom/SelectorAPI/elementRoot-expected.txt: Added.
- fast/dom/SelectorAPI/elementRoot.html: Added.
- fast/dom/SelectorAPI/resources: Added.
- fast/dom/SelectorAPI/resources/TEMPLATE.html: Copied from LayoutTests/fast/js/resources/TEMPLATE.html.
- fast/dom/SelectorAPI/resources/elementRoot.js: Added.
- 11:23 AM Changeset in webkit [30095] by
-
- 2 edits in trunk/WebCore
Fix for bug 16798, button should default to type=submit.
Reviewed by darin
- html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::type): (WebCore::HTMLButtonElement::parseMappedAttribute):
- 8:51 AM Changeset in webkit [30094] by
-
- 2 edits in trunk/WebKitSite
- perf/slickspeed/config.ini: Fixed version number.
- 8:47 AM Changeset in webkit [30093] by
-
- 2 edits1 move in trunk/WebKitSite
Update jQuery to v1.2.3
Rubberstamped by Mitz.
- perf/slickspeed/config.ini:
- perf/slickspeed/frameworks/jquery-1.2.3.js: Renamed from WebKitSite/perf/slickspeed/frameworks/jquery-1.2.1.js.
- 8:24 AM Changeset in webkit [30092] by
-
- 6 edits in trunk/WebCore
2008-02-08 Rodney Dawes <dobey@wayofthemonkey.com>
Reviewed by Jon Honeycutt.
Redefine some platform-specific types as cross-platform types
Add pathGetFileName method to get the filename from a path string
Add unloadModule method to unload a loadable module from the process
Implement new methods for GTK+ and Windows
Implement missing homeDirectoryPath method for GTK+
Add stub methods for new and missing methods for Wx and Qt
- platform/FileSystem.h:
- platform/gtk/FileSystemGtk.cpp:
- platform/qt/FileSystemQt.cpp:
- platform/win/FileSystemWin.cpp:
- platform/wx/FileSystemWx.cpp:
- 8:08 AM Changeset in webkit [30091] by
-
- 2 edits in trunk/WebCore
Windows build fix after r30088
- bindings/scripts/CodeGeneratorCOM.pm: Touch this to force the COM bindings to rebuild.
- 2:41 AM Changeset in webkit [30090] by
-
- 5 edits in trunk
2008-02-08 Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk>
Reviewed by Alp Toker.
http://bugs.webkit.org/show_bug.cgi?id=17009
[Gtk] Webkit strips accents from some dead-key combinations
KeyEvents have to go through the gtk input method.
- 2:35 AM Changeset in webkit [30089] by
-
- 31 edits2 copies27 adds in trunk
WebCore:
Reviewed by Eric.
- fix http://bugs.webkit.org/show_bug.cgi?id=3492 TreeWalker implementation needs to be fixed (affects Acid3)
- fix http://bugs.webkit.org/show_bug.cgi?id=4714 NodeIterator does not handle exceptions from the filter function (affects Acid3)
- fix http://bugs.webkit.org/show_bug.cgi?id=4716 NodeIterator will crash if the filter function removes the current node from the document
Test: traversal/exception-forwarding.html
This turned into a near-rewrite of NodeIterator and TreeWalker.
- bindings/js/JSNodeFilterCondition.h:
- bindings/js/JSNodeFilterCondition.cpp: (WebCore::takeException): Added. (WebCore::JSNodeFilterCondition::acceptNode): Added an out parameter to return a JavaScript exception.
- bindings/js/JSNodeFilterCustom.cpp: (WebCore::JSNodeFilter::acceptNode): Wrote a custom binding for this that raises a JavaScript exception if the out parameter is set.
- bindings/js/JSNodeIteratorCustom.cpp: (WebCore::JSNodeIterator::nextNode): Wrote a custom binding for this that raises a JavaScript exception if the out parameter is set. (WebCore::JSNodeIterator::previousNode): Ditto.
- bindings/js/JSTreeWalkerCustom.cpp: (WebCore::JSTreeWalker::parentNode): Wrote a custom binding for this that raises a JavaScript exception if the out parameter is set. (WebCore::JSTreeWalker::firstChild): Ditto. (WebCore::JSTreeWalker::lastChild): Ditto. (WebCore::JSTreeWalker::nextSibling): Ditto. (WebCore::JSTreeWalker::previousSibling): Ditto. (WebCore::JSTreeWalker::previousNode): Ditto. (WebCore::JSTreeWalker::nextNode): Ditto.
- bindings/objc/DOM.mm: (WebCore::ObjCNodeFilterCondition::acceptNode): Updated to include new exception out parameter. (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]): Use RefPtr to make object lifetimes clearer. (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]): Ditto.
- bindings/scripts/CodeGeneratorJS.pm: Added include of NodeFilter.h for JSDocument.cpp.
- dom/Document.h:
- dom/Document.cpp: (WebCore::Document::createNodeIterator): Changed to use PassRefPtr. (WebCore::Document::createTreeWalker): Ditto.
- dom/NodeFilter.h:
- dom/NodeFilter.cpp: (WebCore::NodeFilter::NodeFilter): Changed to use PassRefPtr. (WebCore::NodeFilter::acceptNode): Added an out parameter to return a JavaScript exception.
- dom/NodeFilter.idl: Custom binding for acceptNode.
- dom/NodeFilterCondition.h:
- dom/NodeFilterCondition.cpp: (WebCore::NodeFilterCondition::acceptNode): Added an out parameter to return a JavaScript exception.
- dom/NodeIterator.cpp: (WebCore::NodeIterator::NodeIterator): Changed to use PassRefPtr more. Eliminated m_doc, using the root node instead, and unnecessary check for null -- rootNode must be non-null and all nodes have a non-null document. (WebCore::NodeIterator::~NodeIterator): Changed to get document from root. (WebCore::NodeIterator::nextNode): Rewrote to use a RefPtr since the acceptNode function could do anything, including removing the last reference to the current node. Also folded findNextNode into this function since it's the only one that needs to call it. (WebCore::NodeIterator::previousNode): Same thing, but the other direction. (WebCore::NodeIterator::detach): Changed to use the root node as the indication that we're detached rather than a separate boolean. (WebCore::NodeIterator::notifyBeforeNodeRemoval): Removed some unnneeded checks. Removed incorrect use of findNextNode/findPreviousNode -- those functions call acceptNode and the DOM standard is quite clear that these functions do not take that into account, allowing the current node to become one that's not accepted.
- dom/NodeIterator.h: Changed constructor to use PassRefPtr more. Changed nextNode and previousNode to have an out parameter with a JavaScript exception. Removed helper functions setReferenceNode, setPointerBeforeReferenceNode, detached, setDetached, document, findNextNode, and findPreviousNode. All were unnecessary. Removed data member m_doc which was just rootNode()->document().
- dom/NodeIterator.idl: Custom binding for nextNode and previousNode.
- dom/Traversal.cpp: (WebCore::Traversal::Traversal): Use PassRefPtr more. (WebCore::Traversal::acceptNode): Added out parameter for JavaScript exception. Also rearranged the function a little bit for clarity.
- dom/Traversal.h: Changed acceptNode to have an out parameter with a JavaScript exception and made it protected, since it's only for use by the derived classes.
- dom/TreeWalker.cpp: (WebCore::TreeWalker::TreeWalker): Updated to use PassRefPtr. (WebCore::TreeWalker::setCurrentNode): Updated to use PassRefPtr and deleted the overloaded version since it's not needed. (WebCore::TreeWalker::parentNode): Rewrote to propagate the exception and also to implement rules about when to check things like whether we're in the tree. The previous fix where we called isDescendantOf was not entirely correct, because the specification allows you to walk outside the tree if you get there somehow. What it doesn't allow is walking outside the tree from inside. The new implementation handles this correctly. (WebCore::TreeWalker::firstChild): Ditto. (WebCore::TreeWalker::lastChild): Ditto. (WebCore::TreeWalker::previousSibling): Ditto. (WebCore::TreeWalker::nextSibling): Ditto. (WebCore::TreeWalker::previousNode): Ditto. Because of the need to check the acceptNode function on parents, this can't use traversePreviousNode (more's the pity, because it's a bit complicated). (WebCore::TreeWalker::nextNode): Ditto.
- dom/TreeWalker.h: Changed constructor and setCurrentNode to use PassRefPtr more. Changed the navigation functions to have an out parameter with a JavaScript exception. Removed helper functions setCurrentNode and ancestorRejected.
- dom/TreeWalker.idl: Custom binding for navigation functions.
LayoutTests:
Reviewed by Eric.
- test for http://bugs.webkit.org/show_bug.cgi?id=4714 NodeIterator does not handle exceptions from the filter function (affects Acid3)
- grabbed NodeIterator and TreeWalker tests from Hixie's site and KHTML
- traversal/exception-forwarding-expected.txt: Added.
- traversal/exception-forwarding.html: Added.
- traversal/resources: Added.
- traversal/resources/TEMPLATE.html: Copied from LayoutTests/fast/js/resources/TEMPLATE.html.
- traversal/resources/exception-forwarding.js: Added.
- traversal/node-iterator-001-expected.txt: Updated to reflect correct results. The old results reflected a bug in our NodeIterator.
- traversal/node-iterator-001.html: Ditto.
- traversal/node-iterator-006.html: Changed test so there's no whitespace node after the <span> elements inside the test root element (a <div>). The old test results were incorrect; the new NodeIterator implementation correctly returned the whitespace node for this test.
- traversal/node-iterator-006a.html: Copied from traversal/node-iterator-006.html. Preserve the original test, which now has a strange result. But the result is correct, so it's worth keeping around.
- traversal/node-iterator-006a-expected.txt: Added.
- fast/dom/TreeWalker/TreeWalker-currentNode-expected.txt: Regenerated.
- fast/dom/TreeWalker/resources/TreeWalker-currentNode.js: Updated test to expect results that match the DOM specification.
- traversal/hixie-node-iterator/001-expected.txt: Added.
- traversal/hixie-node-iterator/001.xml: Added.
- traversal/hixie-node-iterator/002-expected.txt: Added.
- traversal/hixie-node-iterator/002.xml: Added.
- traversal/hixie-node-iterator/003-expected.txt: Added.
- traversal/hixie-node-iterator/003.xml: Added.
- traversal/hixie-node-iterator/004-expected.txt: Added.
- traversal/hixie-node-iterator/004.xml: Added.
- traversal/hixie-node-iterator/005-expected.txt: Added.
- traversal/hixie-node-iterator/005.xml: Added.
- traversal/hixie-node-iterator/006-expected.txt: Added.
- traversal/hixie-node-iterator/006.xml: Added.
- traversal/hixie-node-iterator/007-expected.txt: Added.
- traversal/hixie-node-iterator/007.xml: Added.
- traversal/hixie-node-iterator/008-expected.txt: Added.
- traversal/hixie-node-iterator/008.xml: Added.
- traversal/hixie-node-iterator/009-expected.txt: Added.
- traversal/hixie-node-iterator/009.xml: Added.
- traversal/hixie-node-iterator/010-expected.txt: Added.
- traversal/hixie-node-iterator/010.xml: Added.
- traversal/hixie-node-iterator/origin.txt: Added.
- traversal/tree-walker-filter-1-expected.txt: Added.
- traversal/tree-walker-filter-1.html: Added.
- 1:04 AM Changeset in webkit [30088] by
-
- 18 edits12 adds in trunk
Reviewed by darin.
Add support for Text.wholeText and Text.replaceWholeText
http://bugs.webkit.org/show_bug.cgi?id=17125
Test EntityReferences to make sure they're always treated as read-only
In doing so I discovered a bug in document.adoptNode(readonlyNode) (and fixed it)
- dom/Document.cpp: (WebCore::Document::adoptNode): throw NO_MODIFICATION_ALLOWED_ERR when passed a readonly node
- dom/Node.cpp:
- dom/Node.cpp: (WebCore::Node::textContent):
- dom/Text.cpp: (WebCore::earliestLogicallyAdjacentTextNode): (WebCore::latestLogicallyAdjacentTextNode): (WebCore::Text::wholeText): (WebCore::Text::replaceWholeText):
- dom/Text.h:
- dom/Text.idl: