Timeline
Sep 14, 2014:
- 10:40 PM Changeset in webkit [173613] by
-
- 3 edits in trunk/Source/WebCore
Fix post-mortem nits for r173528 & r173549
https://bugs.webkit.org/show_bug.cgi?id=136808
Reviewed by Darin Adler.
Fix post-mortem nits for r173528 & r173549.
No new tests, no behavior change.
- accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
- Use auto* instead of more specific types.
- Use fastGetAttribute() instead of getAttribute() as this is supported for the "title" attribute.
- editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelectionFromNone):
Use auto* instead of more specific types.
- 9:29 PM Changeset in webkit [173612] by
-
- 6 edits in trunk/Source/WebCore
Introduce FONT_DATA_TYPE_CASTS, and use it
https://bugs.webkit.org/show_bug.cgi?id=136766
Reviewed by Darin Adler.
As a step to use toFoo, this patch introduces FONT_DATA_TYPE_CASTS macro for toFooFontData().
This will help to detect wrong type cast.
- platform/graphics/FontData.h:
- platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::releaseFontData):
(WebCore::FontGlyphs::determinePitch):
- platform/graphics/GlyphPageTreeNode.cpp:
(WebCore::GlyphPageTreeNode::initializePage):
- platform/graphics/SegmentedFontData.h:
- platform/graphics/SimpleFontData.h:
- platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::getCompositeFontReferenceFontData):
- 9:07 PM Changeset in webkit [173611] by
-
- 7 edits in trunk/Source/WebCore
Generate toCSSStyleSheet using STYLE_SHEET_TYPE_CASTS
https://bugs.webkit.org/show_bug.cgi?id=136774
Reviewed by Darin Adler.
As a step to use toFoo, this patch introduces STYLE_SHEET_TYPE_CASTS for toCSSStyleSheet().
This will help to detect wrong type cast. Additonally this patch helps to remove argument type of RefPtr.
No new tests, no behavior changes.
- bindings/gobject/WebKitDOMPrivate.cpp:
(WebKit::wrap):
- css/CSSStyleSheet.h:
- css/StyleSheet.h:
- dom/DocumentStyleSheetCollection.cpp:
(WebCore::filterEnabledNonemptyCSSStyleSheets):
- dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::parseStyleSheet):
- inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getAllStyleSheets):
(WebCore::InspectorCSSAgent::collectStyleSheets):
- 8:40 PM Changeset in webkit [173610] by
-
- 5 edits in trunk/Source/WebCore
Generate toFooElementData() using ELEMENT_DATA_TYPE_CASTS
https://bugs.webkit.org/show_bug.cgi?id=136775
Reviewed by Darin Adler.
As a step to use toFoo, this patch introduces ELEMENT_DATA_TYPE_CASTS for toFooElementData().
This will help to detect wrong type cast. Additonally this patch helps to remove argument type of RefPtr.
No new tests, no behavior changes.
- dom/Element.cpp:
(WebCore::Element::cloneAttributesFromElement):
(WebCore::Element::createUniqueElementData):
- dom/ElementData.cpp:
(WebCore::ElementData::destroy):
- dom/ElementData.h:
(WebCore::ElementData::length):
(WebCore::ElementData::attributeBase):
(WebCore::ElementData::presentationAttributeStyle):
(WebCore::ElementData::attributesIterator):
- svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::setupInitialView): Remove static_cast<SVGSVGElement*>
- 7:23 PM Changeset in webkit [173609] by
-
- 2 edits in trunk/Source/WebCore
Remove unnecessary overloads taking a ContainerNode in Element Traversal
https://bugs.webkit.org/show_bug.cgi?id=136767
Reviewed by Darin Adler.
Remove unnecessary overloads taking a ContainerNode in Element Traversal.
Several of those don't bring any performance improvements as the needed
methods are defined on Node (not ContainerNode).
No new tests, no behavior change.
- dom/ElementTraversal.h:
(WebCore::Traversal<Element>::previous):
NodeTraversal::previous() takes a const Node* in argument so the
ContainerNode overload is not needed.
(WebCore::Traversal<ElementType>::previous):
Unnecessary now that Traversal<Element>::previous() takes a const Node*
in argument.
(WebCore::Traversal<ElementType>::nextSibling):
nextSibling() is defined on Node, not ContainerNode, so the overload
is not needed.
(WebCore::Traversal<ElementType>::previousSibling):
previousSibling() is defined on Node, not ContainerNode, so the overload
is not needed.
(WebCore::Traversal<Element>::previousTemplate): Deleted.
(WebCore::Traversal<ElementType>::previousTemplate): Deleted.
(WebCore::Traversal<ElementType>::nextSiblingTemplate): Deleted.
(WebCore::Traversal<ElementType>::previousSiblingTemplate): Deleted.
No need to have those functions templated anymore.
- 6:51 PM Changeset in webkit [173608] by
-
- 5 edits in trunk/Source
[iOS] Attempt to fix the iOS build after <http://trac.webkit.org/changeset/173606>
(https://bugs.webkit.org/show_bug.cgi?id=136789)
Substitute Node::countChildNodes() for Node::childNodeCount() in more places.
Source/WebCore:
Although I updated a comment in WebCore::lastOffsetForEditing() (defined in file
editing/htmlediting.cpp) to refer to Node::countChildNodes(), I'm unclear what the
comment is trying to explain that isn't otherwise explained by the code or the
comments that precede this function. Specifically, I don't understand the use of
the word "preempt" in the comment. We should look to improve the readability of
this comment.
- editing/htmlediting.cpp:
(WebCore::lastOffsetForEditing):
- page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot):
Source/WebKit/mac:
- WebView/WebFrame.mm:
(-[WebFrame focusedNodeHasContent]):
- 3:19 PM Changeset in webkit [173607] by
-
- 3 edits in trunk/Source/WebCore
Drop NodeTraversal::nextSkippingChildren() overload taking a ContainerNode
https://bugs.webkit.org/show_bug.cgi?id=136764
Reviewed by Darin Adler.
Drop NodeTraversal::nextSkippingChildren() overload taking a
ContainerNode argument. This one does not bring any performance
improvement because nextSibling() is defined on Node and
nextAncestorSibling() takes a Node in argument.
Also remove the overload in ElementTraversal as it no longer makes
sense after this change.
No new tests, no behavior change.
- dom/ElementTraversal.h:
(WebCore::Traversal<ElementType>::nextSkippingChildren):
(WebCore::Traversal<ElementType>::nextSkippingChildrenTemplate): Deleted.
- dom/NodeTraversal.h:
(WebCore::NodeTraversal::nextSkippingChildren):
(WebCore::NodeTraversal::next):
(WebCore::NodeTraversal::traverseNextSkippingChildrenTemplate): Deleted.
- 2:18 PM Changeset in webkit [173606] by
-
- 31 edits in trunk/Source
Rename Node::childNodeCount() to countChildNodes() and avoid inefficient uses
https://bugs.webkit.org/show_bug.cgi?id=136789
Reviewed by Darin Adler.
Source/WebCore:
Rename Node::childNodeCount() to countChildNodes() to make it clearer
that the method actually computes the result rather than returning a
cached value.
This patch also introduces a new Node::hasOneChild() method that is
used to check if a Node has a single child. This is much more efficient
than calling countChildNodes() == 1.
The patch also leverages Node::hasChildNodes() in a lot of places
instead of calling countChildNodes().
Finally, in a couple of places, we now use childrenOfType() to iterate
over children more efficient than using countChildNodes() and
childNode(index).
No new tests, no behavior change.
- WebCore.exp.in:
- WebCore.order:
Update the name of the exposed symbol for countChildNodes().
- dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChildren):
(WebCore::ContainerNode::countChildNodes):
(WebCore::ContainerNode::childNodeCount): Deleted.
Rename childNodeCount() to countChildNodes() to make it obvious it is
computing the result rather than returning a cached value.
- dom/ContainerNode.h:
(WebCore::ContainerNode::hasOneChild):
Introduce an efficient way to check in a ContainerNode has a single
child as "countChildNodes() == 1" calls were frequent and inefficient.
(WebCore::Node::countChildNodes):
(WebCore::Node::childNodeCount): Deleted.
- dom/Node.h:
Rename childNodeCount() to countChildNodes().
- dom/Position.cpp:
(WebCore::Position::parentAnchoredEquivalent):
- dom/Position.h:
(WebCore::lastOffsetInNode):
- dom/Range.cpp:
Mechanical renaming.
(WebCore::lengthOfContentsInNode):
- editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
(WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun):
(WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
(WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
(WebCore::ApplyStyleCommand::applyInlineStyleChange):
Call hasChildNodes() rather than countChildNodes() as it is a lot more
efficient.
- editing/Editor.cpp:
(WebCore::Editor::setTextAsChildOfElement):
(WebCore::Editor::rangeOfString):
(WebCore::Editor::countMatchesForText):
- editing/FrameSelection.cpp:
(WebCore::FrameSelection::elementRangeContainingCaretSelection):
Mechanical renaming.
- editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::insertAsListItems):
Call hasOneChild() instead of countChildNodes() == 1. Also remove
redundant listElement->hasChildNodes() check as hasOneChild() takes
care of this already.
- editing/TextIterator.cpp:
(WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
- editing/VisibleUnits.cpp:
(WebCore::endOfDocument):
- editing/htmlediting.cpp:
(WebCore::lastOffsetForEditing):
Mechanical renaming.
(WebCore::visiblePositionBeforeNode):
(WebCore::visiblePositionAfterNode):
Call hasChildNodes() instead of converting countChildNodes() to a
boolean.
- editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):
Call !hasChildNodes() instead of !countChildNodes().
(WebCore::isPlainTextMarkup):
- Drop !node->isElementNode() check as !node->hasTagName(divTag) takes care of discarding non-Element Nodes already.
- Cast the Node to an HTMLDivElement as soon as possible to avoid calling calling the slower Node APIs in several cases.
- Call hasOneChild() instead of countChildNodes() == 1.
- html/HTMLDivElement.h:
- html/HTMLTagNames.in:
Generate casting helpers as I use them in WebCore::isPlainTextMarkup().
- html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::setText):
- html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::setText):
Call hasOneChild() / hasChildNodes() instead of countChildNodes().
- html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineContainerElement::setTimeDisplaysHidden):
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
Use childrenOfType<Element>() to iterate of child Elements instead of
slower childNodeCount() + childNode(index) + isElementNode(). Also,
childNodeCount() was not even cached before the loop.
- html/track/VTTRegion.cpp:
(WebCore::VTTRegion::displayLastTextTrackCueBox):
Use childrenOfType<Element>() to iterate of child Elements, thus
avoiding calling childNodeCount() + childNode(index).
- page/DOMSelection.cpp:
(WebCore::DOMSelection::extend):
(WebCore::DOMSelection::selectAllChildren):
- rendering/RenderObject.cpp:
(WebCore::RenderObject::caretMaxOffset):
- rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::isSelected):
- rendering/RenderView.cpp:
(WebCore::RenderView::splitSelectionBetweenSubtrees):
Mechanical renaming.
Source/WebKit/mac:
Rename childNodeCount() to countChildNodes().
- WebView/WebHTMLView.mm:
(-[WebHTMLView attributedString]):
Source/WebKit2:
Avoid calling slow Node::countChildNodes().
- WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
(WebKit::WebPage::findZoomableAreaForPoint):
Replace call to "node->parentNode()->childNodeCount() != 1" by
"!node->parentNode()->hasOneChild()" which is equivalent but more
efficient.
Sep 13, 2014:
- 4:21 PM Changeset in webkit [173605] by
-
- 3 edits in trunk/Source/WebCore
Un-inline Element constructor
https://bugs.webkit.org/show_bug.cgi?id=136786
Reviewed by Benjamin Poulain.
Un-inline Element constructor as it is non-trivial and it does not seem
to impact performance based on my testing:
http://dromaeo.com/?id=226865,226869
This reduces the stripped binary size by 8 Kb.
No new tests, no behavior change.
- dom/Element.cpp:
(WebCore::Element::Element):
- dom/Element.h:
(WebCore::Element::Element): Deleted.
- 11:59 AM Changeset in webkit [173604] by
-
- 1 copy in tags/Safari-600.1.24
New tag.
- 11:56 AM Changeset in webkit [173603] by
-
- 5 edits in branches/safari-600.1-branch/Source
Versioning.
- 9:46 AM Changeset in webkit [173602] by
-
- 5 edits in branches/safari-600.1-branch/Source
Merged r173595. <rdar://problem/18324338>
- 9:26 AM Changeset in webkit [173601] by
-
- 3 edits in trunk/Source/JavaScriptCore
Merge JSGlobalObject::reset() into ::init()
https://bugs.webkit.org/show_bug.cgi?id=136800
Reviewed by Oliver Hunt.
Moved the contents of reset() into init().
Note that the diff shows more changes.
- runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): Moved body of reset() into init.
(JSC::JSGlobalObject::put):
(JSC::JSGlobalObject::defineOwnProperty):
(JSC::JSGlobalObject::addGlobalVar):
(JSC::JSGlobalObject::addFunction):
(JSC::lastInPrototypeChain):
(JSC::JSGlobalObject::reset): Deleted.
- runtime/JSGlobalObject.h: