1. 30 Sep, 2013 1 commit
    • benjamin@webkit.org's avatar
      Remove the code guarded by STYLE_SCOPED · 32bbc4c1
      benjamin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=122123
      
      Reviewed by Anders Carlsson.
      
      .: 
      
      * Source/autotools/SetupWebKitFeatures.m4:
      * Source/cmake/OptionsBlackBerry.cmake:
      * Source/cmake/WebKitFeatures.cmake:
      * Source/cmakeconfig.h.cmake:
      
      Source/JavaScriptCore: 
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebCore: 
      
      Start cleaning the code related to <style scoped>. This patch
      only removes the code with #ifdef guards.
      
      * Configurations/FeatureDefines.xcconfig:
      * WebCore.exp.in:
      * bindings/generic/RuntimeEnabledFeatures.cpp:
      (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
      * bindings/generic/RuntimeEnabledFeatures.h:
      * css/DocumentRuleSets.cpp:
      (WebCore::DocumentRuleSets::appendAuthorStyleSheets):
      * css/ElementRuleCollector.cpp:
      (WebCore::ElementRuleCollector::matchScopedAuthorRules):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::locateCousinList):
      (WebCore::StyleResolver::canShareStyleWithElement):
      (WebCore::StyleResolver::locateSharedStyle):
      * css/StyleResolver.h:
      (WebCore::StyleResolver::ensureScopeResolver):
      * css/StyleScopeResolver.cpp:
      * css/StyleScopeResolver.h:
      * dom/Node.cpp:
      * dom/Node.h:
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::ShadowRoot):
      * dom/ShadowRoot.h:
      * html/HTMLStyleElement.cpp:
      (WebCore::HTMLStyleElement::HTMLStyleElement):
      (WebCore::HTMLStyleElement::parseAttribute):
      (WebCore::HTMLStyleElement::insertedInto):
      (WebCore::HTMLStyleElement::removedFrom):
      * html/HTMLStyleElement.h:
      * html/HTMLStyleElement.idl:
      * testing/InternalSettings.cpp:
      (WebCore::InternalSettings::Backup::Backup):
      (WebCore::InternalSettings::Backup::restoreTo):
      * testing/InternalSettings.h:
      * testing/InternalSettings.idl:
      * testing/Internals.cpp:
      * testing/Internals.h:
      * testing/Internals.idl:
      
      Source/WebKit: 
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
      
      Source/WebKit/gtk: 
      
      * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
      * WebCoreSupport/DumpRenderTreeSupportGtk.h:
      
      Source/WebKit/mac: 
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebKit2: 
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WTF: 
      
      * wtf/FeatureDefines.h:
      
      Tools: 
      
      * DumpRenderTree/gtk/DumpRenderTree.cpp:
      (resetDefaultsToConsistentValues):
      * Scripts/webkitperl/FeatureList.pm:
      * qmake/mkspecs/features/features.pri:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      32bbc4c1
  2. 29 Sep, 2013 1 commit
    • darin@apple.com's avatar
      Use RenderElement instead of RenderObject in many places · 8cdf7124
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=122078
      
      Reviewed by Andreas Kling.
      
      Source/ThirdParty/ANGLE:
      
      * ANGLE.xcodeproj/project.pbxproj: Let Xcode do its thing to this file.
      
      Source/WebCore:
      
      * WebCore.exp.in: Updated for name changes.
      
      * dom/ContainerNode.h: Moved renderer() here from Element.
      * dom/Element.h: Moved renderer() from here to ContainerNode.
      * render/RenderElement.h: Moved renderer() from Element to ContainerNode.
      
      * accessibility/AccessibilityImageMapLink.cpp:
      (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
      (WebCore::AccessibilityImageMapLink::detachFromParent):
      (WebCore::AccessibilityImageMapLink::elementPath):
      (WebCore::AccessibilityImageMapLink::elementRect):
      * accessibility/AccessibilityImageMapLink.h:
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
      * bindings/objc/DOM.mm:
      (-[DOMElement image]):
      (-[DOMElement _font]):
      (-[DOMElement _imageTIFFRepresentation]):
      * css/CSSCanvasValue.cpp:
      (WebCore::CSSCanvasValue::canvasChanged):
      (WebCore::CSSCanvasValue::canvasResized):
      (WebCore::CSSCanvasValue::canvasDestroyed):
      (WebCore::CSSCanvasValue::fixedSize):
      (WebCore::CSSCanvasValue::image):
      * css/CSSCanvasValue.h:
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::computeRenderStyleForProperty):
      * css/CSSCrossfadeValue.cpp:
      (WebCore::subimageKnownToBeOpaque):
      (WebCore::CSSCrossfadeValue::fixedSize):
      (WebCore::CSSCrossfadeValue::knownToBeOpaque):
      (WebCore::CSSCrossfadeValue::image):
      (WebCore::CSSCrossfadeValue::crossfadeChanged):
      * css/CSSCrossfadeValue.h:
      * css/CSSFilterImageValue.cpp:
      (WebCore::CSSFilterImageValue::fixedSize):
      (WebCore::CSSFilterImageValue::knownToBeOpaque):
      (WebCore::CSSFilterImageValue::image):
      (WebCore::CSSFilterImageValue::filterImageChanged):
      * css/CSSFilterImageValue.h:
      * css/CSSFontSelector.cpp:
      * css/CSSGradientValue.cpp:
      (WebCore::CSSGradientValue::image):
      (WebCore::CSSGradientValue::addStops):
      (WebCore::CSSGradientValue::knownToBeOpaque):
      (WebCore::CSSLinearGradientValue::createGradient):
      (WebCore::CSSRadialGradientValue::createGradient):
      * css/CSSGradientValue.h:
      (WebCore::CSSGradientValue::fixedSize):
      * css/CSSImageGeneratorValue.cpp:
      (WebCore::CSSImageGeneratorValue::addClient):
      (WebCore::CSSImageGeneratorValue::removeClient):
      (WebCore::CSSImageGeneratorValue::image):
      (WebCore::CSSImageGeneratorValue::fixedSize):
      (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
      * css/CSSImageGeneratorValue.h:
      (WebCore::CSSImageGeneratorValue::clients):
      * css/CSSImageValue.cpp:
      (WebCore::CSSImageValue::knownToBeOpaque):
      * css/CSSImageValue.h:
      * css/DeprecatedStyleBuilder.cpp:
      * dom/DocumentMarkerController.cpp:
      (WebCore::DocumentMarkerController::removeMarkersFromList):
      (WebCore::DocumentMarkerController::repaintMarkers):
      * dom/Element.cpp:
      (WebCore::localZoomForRenderer):
      (WebCore::adjustForLocalZoom):
      (WebCore::Element::offsetParent):
      (WebCore::Element::updateExistingPseudoElement):
      * dom/ElementRareData.h:
      (WebCore::ElementRareData::create):
      (WebCore::ElementRareData::ElementRareData):
      * dom/Node.cpp:
      (WebCore::Node::ensureRareData):
      * editing/DeleteButtonController.cpp:
      (WebCore::isDeletableElement):
      * editing/Editor.cpp:
      (WebCore::Editor::hasBidiSelection):
      (WebCore::Editor::baseWritingDirectionForSelectionStart):
      * editing/EditorCommand.cpp:
      (WebCore::verticalScrollDistance):
      * editing/htmlediting.cpp:
      (WebCore::directionOfEnclosingBlock):
      * editing/ios/EditorIOS.mm:
      (WebCore::Editor::fontForSelection):
      (WebCore::getImage):
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::fontForSelection):
      (WebCore::getImage):
      * editing/markup.cpp:
      * html/HTMLAreaElement.cpp:
      (WebCore::HTMLAreaElement::computePath):
      (WebCore::HTMLAreaElement::computeRect):
      (WebCore::HTMLAreaElement::setFocus):
      * html/HTMLAreaElement.h:
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::reset):
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::setInnerText):
      * html/HTMLFormControlElement.cpp:
      (WebCore::updateFromElementCallback):
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::rendererIsNeeded):
      * html/HTMLFrameOwnerElement.h:
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::x):
      (WebCore::HTMLImageElement::y):
      (WebCore::HTMLImageElement::willRespondToMouseClickEvents):
      * html/HTMLMapElement.cpp:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::defaultEventHandler):
      * html/HTMLMeterElement.cpp:
      (WebCore::HTMLMeterElement::renderMeter):
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::didRecalcStyle):
      * html/HTMLPlugInElement.cpp:
      (WebCore::HTMLPlugInElement::willRespondToMouseClickEvents):
      (WebCore::HTMLPlugInElement::defaultEventHandler):
      (WebCore::HTMLPlugInElement::isKeyboardFocusable):
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::HTMLPlugInImageElement::defaultEventHandler):
      * html/HTMLProgressElement.cpp:
      (WebCore::HTMLProgressElement::renderProgress):
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::scrollToSelection):
      (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
      (WebCore::HTMLSelectElement::selectOption):
      * html/HTMLTableCellElement.cpp:
      (WebCore::HTMLTableCellElement::cellAbove):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::hasVisibleTextArea):
      (WebCore::HTMLTextFormControlElement::setSelectionRange):
      * html/InputType.h:
      * html/parser/HTMLResourcePreloader.cpp:
      * html/shadow/MediaControlElementTypes.cpp:
      (WebCore::MediaControlElement::setDisplayType):
      * html/shadow/MediaControlElements.cpp:
      (WebCore::MediaControlPanelElement::startDrag):
      (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
      * html/shadow/MeterShadowElement.cpp:
      (WebCore::MeterShadowElement::rendererIsNeeded):
      (WebCore::MeterInnerElement::rendererIsNeeded):
      * inspector/InspectorOverlay.cpp:
      * inspector/InspectorTimelineAgent.cpp:
      * inspector/InspectorTimelineAgent.h:
      * loader/ImageLoader.cpp:
      (WebCore::ImageLoader::renderImageResource):
      * loader/cache/CachedImage.cpp:
      (WebCore::CachedImage::currentFrameKnownToBeOpaque):
      * loader/cache/CachedImage.h:
      * mathml/MathMLElement.cpp:
      * page/ContextMenuController.cpp:
      * page/DragController.cpp:
      (WebCore::DragController::draggableElement):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::EventHandler):
      (WebCore::EventHandler::clear):
      (WebCore::EventHandler::startPanScrolling):
      (WebCore::EventHandler::autoscrollRenderer):
      (WebCore::EventHandler::scrollOverflow):
      (WebCore::EventHandler::logicalScrollOverflow):
      (WebCore::EventHandler::subframeForTargetNode):
      (WebCore::EventHandler::selectCursor):
      (WebCore::layerForNode):
      (WebCore::EventHandler::handleWheelEvent):
      (WebCore::EventHandler::clearGestureScrollNodes):
      * page/EventHandler.h:
      * page/FocusController.cpp:
      * page/Frame.cpp:
      (WebCore::Frame::ownerRenderer):
      (WebCore::Frame::visiblePositionForPoint):
      (WebCore::Frame::nodeImage):
      * page/FrameView.cpp:
      (WebCore::FrameView::applyOverflowToViewport):
      (WebCore::FrameView::applyPaginationToViewport):
      (WebCore::FrameView::calculateScrollbarModesForLayout):
      (WebCore::FrameView::isEnclosedInCompositingLayer):
      (WebCore::FrameView::embeddedContentBox):
      (WebCore::FrameView::addSlowRepaintObject):
      (WebCore::FrameView::removeSlowRepaintObject):
      (WebCore::FrameView::addViewportConstrainedObject):
      (WebCore::FrameView::removeViewportConstrainedObject):
      (WebCore::FrameView::scrollContentsFastPath):
      (WebCore::FrameView::repaintSlowRepaintObjects):
      (WebCore::FrameView::setViewportConstrainedObjectsNeedLayout):
      (WebCore::FrameView::updateOverflowStatus):
      (WebCore::FrameView::updateScrollCorner):
      (WebCore::FrameView::paintContents):
      (WebCore::FrameView::convertFromRenderer):
      (WebCore::FrameView::convertToRenderer):
      * page/FrameView.h:
      * page/PageSerializer.cpp:
      (WebCore::PageSerializer::addImageToResources):
      * page/PageSerializer.h:
      * page/animation/AnimationBase.cpp:
      (WebCore::AnimationBase::AnimationBase):
      (WebCore::AnimationBase::updateStateMachine):
      * page/animation/AnimationBase.h:
      (WebCore::AnimationBase::renderer):
      * page/animation/AnimationController.cpp:
      (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
      (WebCore::AnimationControllerPrivate::clear):
      (WebCore::AnimationControllerPrivate::updateAnimations):
      (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
      (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
      (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
      (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
      (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
      (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
      (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
      (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
      (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
      (WebCore::AnimationController::cancelAnimations):
      (WebCore::AnimationController::updateAnimations):
      (WebCore::AnimationController::getAnimatedStyleForRenderer):
      (WebCore::AnimationController::notifyAnimationStarted):
      (WebCore::AnimationController::pauseAnimationAtTime):
      (WebCore::AnimationController::pauseTransitionAtTime):
      (WebCore::AnimationController::isRunningAnimationOnRenderer):
      (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
      * page/animation/AnimationController.h:
      * page/animation/AnimationControllerPrivate.h:
      * page/animation/CSSPropertyAnimation.cpp:
      (WebCore::crossfadeBlend):
      * page/animation/CompositeAnimation.cpp:
      (WebCore::CompositeAnimation::updateTransitions):
      (WebCore::CompositeAnimation::updateKeyframeAnimations):
      (WebCore::CompositeAnimation::animate):
      * page/animation/CompositeAnimation.h:
      * page/animation/ImplicitAnimation.cpp:
      (WebCore::ImplicitAnimation::ImplicitAnimation):
      (WebCore::ImplicitAnimation::animate):
      (WebCore::ImplicitAnimation::pauseAnimation):
      (WebCore::ImplicitAnimation::sendTransitionEvent):
      * page/animation/ImplicitAnimation.h:
      (WebCore::ImplicitAnimation::create):
      * page/animation/KeyframeAnimation.cpp:
      (WebCore::KeyframeAnimation::KeyframeAnimation):
      (WebCore::KeyframeAnimation::animate):
      (WebCore::KeyframeAnimation::pauseAnimation):
      (WebCore::KeyframeAnimation::endAnimation):
      (WebCore::KeyframeAnimation::sendAnimationEvent):
      * page/animation/KeyframeAnimation.h:
      * page/mac/EventHandlerMac.mm:
      (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
      (WebCore::EventHandler::passSubframeEventToSubframe):
      * page/mac/FrameSnapshottingMac.mm:
      (WebCore::snapshotDragImage):
      * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
      (WebCore::MediaPlayerPrivateQTKit::paint):
      * rendering/CounterNode.cpp:
      (WebCore::CounterNode::CounterNode):
      (WebCore::CounterNode::create):
      * rendering/CounterNode.h:
      (WebCore::CounterNode::owner):
      * rendering/FilterEffectRenderer.cpp:
      (WebCore::FilterEffectRenderer::buildReferenceFilter):
      (WebCore::FilterEffectRenderer::build):
      * rendering/FilterEffectRenderer.h:
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestResult::spellingToolTip):
      (WebCore::HitTestResult::title):
      (WebCore::HitTestResult::innerTextIfTruncated):
      (WebCore::HitTestResult::image):
      * rendering/LayoutRepainter.cpp:
      (WebCore::LayoutRepainter::LayoutRepainter):
      * rendering/LayoutRepainter.h:
      * rendering/LayoutState.h:
      (WebCore::LayoutState::LayoutState):
      * rendering/LineWidth.h:
      * rendering/LogicalSelectionOffsetCaches.h:
      (WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject):
      (WebCore::isNonRenderBlockInline):
      (WebCore::containingBlockForFixedPosition):
      (WebCore::containingBlockForAbsolutePosition):
      (WebCore::containingBlockForObjectInFlow):
      (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
      * rendering/PaintInfo.h:
      (WebCore::PaintInfo::PaintInfo):
      (WebCore::PaintInfo::updateSubtreePaintRootForChildren):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::paintFillLayers):
      (WebCore::RenderBox::paintFillLayer):
      * rendering/RenderBox.h:
      * rendering/RenderBoxModelObject.cpp:
      (WebCore::RenderBoxModelObject::paintFillLayerExtended):
      (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
      * rendering/RenderBoxModelObject.h:
      * rendering/RenderCounter.cpp:
      (WebCore::nextInPreOrder):
      (WebCore::planCounter):
      (WebCore::makeCounterNode):
      (WebCore::RenderCounter::originalText):
      * rendering/RenderElement.cpp:
      (WebCore::RenderElement::~RenderElement):
      (WebCore::RenderElement::insertChildInternal):
      (WebCore::RenderElement::removeChildInternal):
      (WebCore::RenderElement::willBeDestroyed):
      (WebCore::RenderElement::rendererForRootBackground):
      * rendering/RenderImageResource.cpp:
      (WebCore::RenderImageResource::initialize):
      * rendering/RenderImageResource.h:
      * rendering/RenderImageResourceStyleImage.cpp:
      (WebCore::RenderImageResourceStyleImage::initialize):
      * rendering/RenderImageResourceStyleImage.h:
      (WebCore::RenderImageResourceStyleImage::create):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
      (WebCore::RenderLayerCompositor::requiresCompositingLayer):
      (WebCore::RenderLayerCompositor::canBeComposited):
      (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
      (WebCore::RenderLayerCompositor::reasonsForCompositing):
      (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
      (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
      (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
      (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
      (WebCore::RenderLayerCompositor::requiresCompositingForFrame):
      (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
      (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
      (WebCore::RenderLayerCompositor::requiresCompositingForFilters):
      (WebCore::RenderLayerCompositor::requiresCompositingForBlending):
      (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
      (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
      * rendering/RenderLayerCompositor.h:
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::containingBlock):
      (WebCore::mustRepaintFillLayers):
      (WebCore::RenderObject::borderImageIsLoadedAndCanBeRendered):
      (WebCore::RenderObject::willBeDestroyed):
      * rendering/RenderScrollbarPart.cpp:
      (WebCore::RenderScrollbarPart::rendererOwningScrollbar):
      * rendering/RenderScrollbarPart.h:
      * rendering/RenderTableCell.cpp:
      (WebCore::RenderTableCell::paintBackgroundsBehindCell):
      * rendering/RenderTableCell.h:
      * rendering/RenderView.cpp:
      (WebCore::RenderView::RenderView):
      * rendering/style/FillLayer.cpp:
      (WebCore::FillLayer::hasOpaqueImage):
      * rendering/style/FillLayer.h:
      * rendering/style/KeyframeList.h:
      (WebCore::KeyframeList::KeyframeList):
      * rendering/style/StyleCachedImage.cpp:
      (WebCore::StyleCachedImage::imageSize):
      (WebCore::StyleCachedImage::computeIntrinsicDimensions):
      (WebCore::StyleCachedImage::setContainerSizeForRenderer):
      (WebCore::StyleCachedImage::addClient):
      (WebCore::StyleCachedImage::removeClient):
      (WebCore::StyleCachedImage::image):
      (WebCore::StyleCachedImage::knownToBeOpaque):
      * rendering/style/StyleCachedImage.h:
      * rendering/style/StyleCachedImageSet.cpp:
      (WebCore::StyleCachedImageSet::imageSize):
      (WebCore::StyleCachedImageSet::computeIntrinsicDimensions):
      (WebCore::StyleCachedImageSet::setContainerSizeForRenderer):
      (WebCore::StyleCachedImageSet::addClient):
      (WebCore::StyleCachedImageSet::removeClient):
      (WebCore::StyleCachedImageSet::image):
      (WebCore::StyleCachedImageSet::knownToBeOpaque):
      * rendering/style/StyleCachedImageSet.h:
      * rendering/style/StyleGeneratedImage.cpp:
      (WebCore::StyleGeneratedImage::imageSize):
      (WebCore::StyleGeneratedImage::computeIntrinsicDimensions):
      (WebCore::StyleGeneratedImage::addClient):
      (WebCore::StyleGeneratedImage::removeClient):
      (WebCore::StyleGeneratedImage::image):
      (WebCore::StyleGeneratedImage::knownToBeOpaque):
      * rendering/style/StyleGeneratedImage.h:
      * rendering/style/StyleImage.h:
      (WebCore::StyleImage::imagesEquivalent):
      * rendering/style/StylePendingImage.h:
      (WebCore::StylePendingImage::cssImageValue):
      (WebCore::StylePendingImage::cssImageGeneratorValue):
      (WebCore::StylePendingImage::cssCursorImageValue):
      (WebCore::StylePendingImage::cssImageSetValue):
      (WebCore::StylePendingImage::computeIntrinsicDimensions):
      * testing/Internals.cpp:
      (WebCore::Internals::boundingBox):
      (WebCore::Internals::isSelectPopupVisible):
      (WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
      Use RenderElement instead of RenderObject where it was easy to do so.
      For local variables holding the return value of renderer() functions,
      use auto instead, so the most-specific possible type will be used,
      without having to figure out what that is in each case. Also use some
      more OVERRIDE and FINAL and use nullptr instead of 0. And replace some
      cryptic short local variable names with words.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8cdf7124
  3. 27 Sep, 2013 1 commit
    • darin@apple.com's avatar
      rename KURL to URL · 5ffbb5c7
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=16214
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      * many files: Renamed, using script.
      
      Source/WebKit:
      
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
      Let the script to try to rename here.
      
      Source/WebKit/blackberry:
      
      * many files: Renamed, using script.
      
      Source/WebKit/efl:
      
      * many files: Renamed, using script.
      
      Source/WebKit/gtk:
      
      * many files: Renamed, using script.
      
      Source/WebKit/mac:
      
      * many files: Renamed, using script.
      
      Source/WebKit/qt:
      
      * many files: Renamed, using script.
      
      Source/WebKit/win:
      
      * many files: Renamed, using script.
      
      Source/WebKit/wince:
      
      * many files: Renamed, using script.
      
      Source/WebKit2:
      
      * many files: Renamed, using script.
      
      Tools:
      
      * many files: Renamed, using script.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ffbb5c7
  4. 25 Sep, 2013 2 commits
  5. 24 Sep, 2013 1 commit
    • akling@apple.com's avatar
      Move keyboard event dispatch from Node to Element. · 26d79700
      akling@apple.com authored
      <https://webkit.org/b/121873>
      
      Reviewed by Antti Koivisto.
      
      We only dispatch keyboard events on Elements so that logic shouldn't be in Node.
      
      * dom/Document.cpp:
      (WebCore::eventTargetElementForDocument):
      
          Reworked to return Element instead of Node.
      
      * dom/Document.h:
      * dom/Element.h:
      * dom/Element.cpp:
      (WebCore::Element::dispatchKeyEvent):
      
          Moved from Node to Element.
      
      * editing/AlternativeTextController.cpp:
      (WebCore::AlternativeTextController::insertDictatedText):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::keyEvent):
      (WebCore::EventHandler::handleTextInputEvent):
      
          Adjusted for above changes.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      26d79700
  6. 22 Sep, 2013 2 commits
    • weinig@apple.com's avatar
      CTTE: Use references more in ContainerNode, ContainerNodeAlgorithms and related classes · 2e067211
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121772
      
      Reviewed by Andreas Kling.
      
      ../WebCore: 
      
      Use references for never null Nodes in ContainerNode and related classes.
      
      ../WebKit/qt: 
      
      * Api/qwebelement.cpp:
      (QWebElementCollection::append):
      Update to work with the new StaticNodeList adopt function.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e067211
    • weinig@apple.com's avatar
      CTTE: RenderNamedFlowThread and FlowThreadController should operate on Elements, not Nodes · 054be905
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121768
      
      Reviewed by Andreas Kling.
      
      * dom/Element.cpp:
      (WebCore::Element::unregisterNamedFlowContentElement):
      (WebCore::Element::shouldMoveToFlowThread):
      (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
      * dom/Element.h:
      Update to new names and to pass this as a reference to the FlowThreadController.
      
      * dom/Node.cpp:
      * dom/Node.h:
      Move isRegisteredWithNamedFlow() to Element.
      
      * dom/WebKitNamedFlow.cpp:
      (WebCore::WebKitNamedFlow::getRegionsByContent):
      (WebCore::WebKitNamedFlow::getRegions):
      (WebCore::WebKitNamedFlow::getContent):
      Update for contentNodes() -> contentElements() name change. Modernize the code a bit
      as well.
      
      * rendering/FlowThreadController.cpp:
      (WebCore::FlowThreadController::registerNamedFlowContentElement):
      (WebCore::FlowThreadController::unregisterNamedFlowContentElement):
      (WebCore::FlowThreadController::isContentElementRegisteredWithAnyNamedFlow):
      * rendering/FlowThreadController.h:
      Change the Node* -> RenderNamedFlowThread* map to a Element* -> RenderNamedFlowThread*. Update
      functions taking Node*s to take Element&s.
      
      * rendering/RenderNamedFlowThread.cpp:
      (WebCore::RenderNamedFlowThread::~RenderNamedFlowThread):
      (WebCore::RenderNamedFlowThread::clearContentElements):
      (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
      (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
      (WebCore::RenderNamedFlowThread::hasContentElement):
      (WebCore::isContainedInElements):
      (WebCore::nextNodeInsideContentElement):
      (WebCore::RenderNamedFlowThread::getRanges):
      * rendering/RenderNamedFlowThread.h:
      Change the NamedFlowContent set to store Elements rather than Nodes. Like with FlowThreadController,
      update registration functions to take Element&s instead of Node*s, removing asserts.
              
      * rendering/RenderRegion.cpp:
      (WebCore::RenderRegion::setRegionObjectsRegionStyle):
      Update for new names.
      
      * style/StyleResolveTree.cpp:
      (WebCore::Style::moveToFlowThreadIfNeeded):
      Pass the Element and RenderNamedFlowThread as references.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      054be905
  7. 21 Sep, 2013 2 commits
  8. 17 Sep, 2013 1 commit
  9. 14 Sep, 2013 1 commit
    • darin@apple.com's avatar
      Use a better name than m_invertibleCTM · 269d3400
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121341
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      Rename isTransformInvertible to hasInvertibleTransform, and
      m_invertibleCTM to m_hasInvertibleTransform.
      
      * html/canvas/CanvasPathMethods.cpp:
      (WebCore::CanvasPathMethods::moveTo):
      (WebCore::CanvasPathMethods::lineTo):
      (WebCore::CanvasPathMethods::quadraticCurveTo):
      (WebCore::CanvasPathMethods::bezierCurveTo):
      (WebCore::CanvasPathMethods::arcTo):
      (WebCore::CanvasPathMethods::arc):
      (WebCore::CanvasPathMethods::rect):
      Updated for name change. Not really sure the name is good here,
      because DOMPath doesn't have a transform at all; should switch
      to a better name some day.
      
      * html/canvas/CanvasPathMethods.h: Renamed, added a new constructor,
      and made the virtual function private.
      
      * html/canvas/CanvasRenderingContext2D.cpp:
      (WebCore::CanvasRenderingContext2D::State::State):
      (WebCore::CanvasRenderingContext2D::State::operator=):
      (WebCore::CanvasRenderingContext2D::scale):
      (WebCore::CanvasRenderingContext2D::rotate):
      (WebCore::CanvasRenderingContext2D::translate):
      (WebCore::CanvasRenderingContext2D::transform):
      (WebCore::CanvasRenderingContext2D::setTransform):
      (WebCore::CanvasRenderingContext2D::fill):
      (WebCore::CanvasRenderingContext2D::stroke):
      (WebCore::CanvasRenderingContext2D::clip):
      (WebCore::CanvasRenderingContext2D::isPointInPath):
      (WebCore::CanvasRenderingContext2D::isPointInStroke):
      (WebCore::CanvasRenderingContext2D::clearRect):
      (WebCore::CanvasRenderingContext2D::fillRect):
      (WebCore::CanvasRenderingContext2D::strokeRect):
      (WebCore::CanvasRenderingContext2D::drawImage):
      (WebCore::CanvasRenderingContext2D::didDraw):
      (WebCore::CanvasRenderingContext2D::drawTextInternal):
      Updated for name change.
      
      * html/canvas/CanvasRenderingContext2D.h: Updated for name change.
      Also got rid of unneeded conditional around forward class declaration.
      
      * html/canvas/DOMPath.h: Moved SVG-specific include into a
      separate paragraph. Removed unneeded invocation  of WTF_MAKE_NONCOPYABLE,
      which is already true since we inherit from RefCounted. Changed create
      function argument to be a const*. Eliminated extra constructors that were
      unneeded. Made the path-parsing create function SVG-only, rather than
      compiling a useless empty one when compiling without SVG.
      
      Tools:
      
      * Scripts/do-webcore-rename: Updated to do this replace as we do.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      269d3400
  10. 09 Sep, 2013 1 commit
  11. 08 Sep, 2013 1 commit
    • antti@apple.com's avatar
      Rename needsShadowTreeWalker · 37f9ce2f
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=121005
      
      Reviewed by Andreas Kling.
      
      Rename to needsNodeRenderingTraversalSlowPath.
      
      * dom/ContainerNode.h:
      (WebCore::Node::needsNodeRenderingTraversalSlowPath):
      * dom/Element.cpp:
      (WebCore::shouldUseNodeRenderingTraversalSlowPath):
      (WebCore::Element::resetNeedsNodeRenderingTraversalSlowPath):
      
          Only Elements can have this flag. Move the code here from Node.
      
      (WebCore::Element::addShadowRoot):
      (WebCore::Element::setBeforePseudoElement):
      (WebCore::Element::setAfterPseudoElement):
      (WebCore::Element::clearBeforePseudoElement):
      (WebCore::Element::clearAfterPseudoElement):
      
          Reset after clear too.
      
      * dom/Element.h:
      * dom/Element.h:
      * dom/Node.cpp:
      * dom/Node.h:
      (WebCore::Node::isInsertionPoint):
      (WebCore::Node::setNeedsNodeRenderingTraversalSlowPath):
              
          Make protected.
      
      * dom/NodeRenderingTraversal.h:
      (WebCore::NodeRenderingTraversal::parent):
      (WebCore::NodeRenderingTraversal::nextSibling):
      (WebCore::NodeRenderingTraversal::previousSibling):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      37f9ce2f
  12. 05 Sep, 2013 1 commit
    • simon.fraser@apple.com's avatar
      Source/WebCore: Fix repaint issue on "paints into ancestor" filtered layers · 840fcfdc
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120780
      
      Reviewed by Tim Horton.
      
      When a repaint happened on a layer with a filter, and which paints into
      its compositing ancestor, we'd repaint the wrong layer (and assert).
      
      Fix by ensuring that RenderLayer::enclosingFilterLayer() takes paintsIntoCompositedAncestor()
      into account, by adding a function that we share between three callers who
      check isComposited() && !paintsIntoCompositedAncestor(). I didn't use a function
      on RenderLayer, because I wanted it to be inline but to not #include RenderLayerBacking
      in RenderLayer.h.
      
      Test: compositing/filters/opacity-change-on-filtered-paints-into-ancestor.html
      
      * dom/Node.cpp: Drive-by removal of #include "RenderLayer.h"
      * rendering/RenderLayer.cpp:
      (WebCore::compositedWithOwnBackingStore):
      (WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
      (WebCore::RenderLayer::enclosingFilterRepaintLayer):
      (WebCore::RenderLayer::clippingRootForPainting):
      
      LayoutTests: Fix repaint issue on "paints into ancestor" filtered layers
      https://bugs.webkit.org/show_bug.cgi?id=120780
      <rdar://problem/14884148>
      
      Reviewed by Tim Horton.
      
      Ref test for opacity change on a filtered layer which paints into its compositing ancestor.
      
      * compositing/filters/opacity-change-on-filtered-paints-into-ancestor-expected.html: Added.
      * compositing/filters/opacity-change-on-filtered-paints-into-ancestor.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      840fcfdc
  13. 03 Sep, 2013 2 commits
    • darin@apple.com's avatar
      Fix backwards branch in ~Node from r154967 · 11b4f83b
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120659
      
      Reviewed by Andreas Kling.
      
      * dom/Node.cpp:
      (WebCore::Node::~Node): Fix backwards branch. The old code ran the code only
      when we did not remove the item from the table. I removed a ! from this expression
      after review; bad idea.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      11b4f83b
    • darin@apple.com's avatar
      Cut down on double hashing and code needlessly using hash table iterators · 78bf2d4c
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120611
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      Some of these changes are primarily code cleanup, but others could provide
      a small code size and speed improvement by avoiding extra hashing.
      
      * Modules/geolocation/Geolocation.cpp:
      (WebCore::Geolocation::Watchers::find): Use get instead of find.
      (WebCore::Geolocation::Watchers::remove): Use take instead of find.
      (WebCore::Geolocation::makeCachedPositionCallbacks): Use the return
      value from remove to avoid hashing twice.
      
      * Modules/webaudio/AudioContext.cpp:
      (WebCore::AudioContext::addAutomaticPullNode): Use the return value from
      add to avoid hashing twice.
      (WebCore::AudioContext::removeAutomaticPullNode): Use the return value
      from remove to avoid hashing twice.
      
      * Modules/webaudio/AudioNodeInput.cpp:
      (WebCore::AudioNodeInput::connect): Use the return value from add to avoid
      hashing twice.
      (WebCore::AudioNodeInput::disconnect): Use the return value from remove
      to avoid hashing twice.
      
      * Modules/webaudio/AudioParam.cpp:
      (WebCore::AudioParam::connect): Use the return value from add to avoid
      hashing twice.
      (WebCore::AudioParam::disconnect): Use the return value from remove to
      avoid hashing twice.
      
      * bridge/NP_jsobject.cpp:
      (ObjectMap::remove): Use remove instead of find/remove.
      
      * dom/Node.cpp:
      (WebCore::Node::~Node): Use the return value from remove instead of
      find/remove.
      
      * inspector/InspectorProfilerAgent.cpp:
      (WebCore::InspectorProfilerAgent::removeProfile): Remove needless
      calls to contains.
      
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::removeSubresourceLoader): Use the return
      value from remove instead of find/remove.
      
      * loader/ResourceLoadScheduler.cpp:
      (WebCore::ResourceLoadScheduler::HostInformation::remove): Use the
      return value from remove to avoid hashing twice.
      
      * loader/appcache/ApplicationCacheGroup.cpp:
      (WebCore::ApplicationCacheGroup::disassociateDocumentLoader): Use
      remove instead of find/remove.
      (WebCore::ApplicationCacheGroup::cacheDestroyed): Removed a needless
      call to contains to avoid hashing twice. It's fine to do the check
      for an empty hash table unconditionally.
      
      * page/DOMWindow.cpp:
      (WebCore::addUnloadEventListener): Eliminated a local variable for clarity.
      (WebCore::removeUnloadEventListener): Ditto. Also use remove instead
      of find/remove.
      (WebCore::removeAllUnloadEventListeners): Ditto. Also use removeAll instead
      of find/removeAll.
      (WebCore::addBeforeUnloadEventListener): Ditto.
      (WebCore::removeBeforeUnloadEventListener): Ditto.
      (WebCore::removeAllBeforeUnloadEventListeners): Ditto.
      
      * page/FrameView.cpp:
      (WebCore::FrameView::removeViewportConstrainedObject): Use the return
      value from remove to avoid hashing twice.
      (WebCore::FrameView::removeScrollableArea): Use the return value from
      remove instead of find/remove.
      (WebCore::FrameView::containsScrollableArea): Use && instead of an if
      statement in a way that is idiomatic for this kind of function.
      
      * page/Page.cpp:
      (WebCore::Page::addRelevantRepaintedObject): Use the return value from
      remove instead of find/remove.
      
      * page/PageGroup.cpp:
      (WebCore::PageGroup::removeUserScriptsFromWorld): Use remove instead
      of find/remove.
      (WebCore::PageGroup::removeUserStyleSheetsFromWorld): Use the return
      value from remove instead of find/remove.
      
      * page/PerformanceUserTiming.cpp:
      (WebCore::clearPeformanceEntries): Removed a needless call to contains.
      
      * platform/graphics/DisplayRefreshMonitor.cpp:
      (WebCore::DisplayRefreshMonitor::removeClient): Use the return value
      from remove instead of find/remove.
      (WebCore::DisplayRefreshMonitorManager::displayDidRefresh): Use remove
      instead of find/remove.
      
      * platform/graphics/blackberry/LayerRenderer.cpp:
      (WebCore::LayerRenderer::removeLayer): Use the return value from remove
      instead of find/remove.
      
      * platform/win/WindowMessageBroadcaster.cpp:
      (WebCore::WindowMessageBroadcaster::removeListener): Use remove instead
      of find/remove. It's fine to do the check for an empty hash table unconditionally.
      
      * plugins/PluginDatabase.cpp:
      (WebCore::PluginDatabase::removeDisabledPluginFile): Use the return value
      from remove instead of find/remove.
      
      * rendering/style/StyleCustomFilterProgramCache.cpp:
      (WebCore::StyleCustomFilterProgramCache::lookup): Use get instead of find.
      (WebCore::StyleCustomFilterProgramCache::add): Use contains instead of find
      in an assertion.
      (WebCore::StyleCustomFilterProgramCache::remove): Use remove instead of
      find/remove.
      
      * svg/SVGCursorElement.cpp:
      (WebCore::SVGCursorElement::removeClient): Use the return value from remove
      instead of find/remove.
      
      * svg/SVGDocumentExtensions.cpp:
      (WebCore::SVGDocumentExtensions::removeResource): Removed an unneeded call
      to contains.
      (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement): Use
      remove instead of find/remove. It's fine to do the check for an empty hash
      table unconditionally.
      (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Use
      remove instead of find/remove. Also removed unhelpful assertions. One is
      already done by HashMap, and the other is just checking a basic invariant
      of every HashMap that doesn't need to be checked.
      
      * svg/graphics/SVGImageCache.cpp:
      (WebCore::SVGImageCache::removeClientFromCache): Removed an unneeded call
      to contains.
      
      * svg/properties/SVGAnimatedProperty.cpp:
      (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty): Use the version of
      remove that takes an iterator rather than the one that takes a key, so
      we don't need to redo the hashing.
      
      Source/WebKit2:
      
      * Platform/CoreIPC/Connection.cpp:
      (CoreIPC::Connection::waitForMessage): Use take instead of find/remove.
      
      * UIProcess/WebPreferences.cpp:
      (WebKit::WebPreferences::removePageGroup): Use the return value from remove
      instead of find/remove.
      
      * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
      (WebKit::GeolocationPermissionRequestManager::cancelRequestForGeolocation):
      (WebKit::GeolocationPermissionRequestManager::didReceiveGeolocationPermissionDecision):
      Use take instead of find/remove.
      
      * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
      (WebKit::NetscapePlugin::frameDidFinishLoading): Use take instead of find/remove.
      (WebKit::NetscapePlugin::frameDidFail): Use take instead of find/remove.
      
      * WebProcess/WebPage/WebBackForwardListProxy.cpp:
      (WebKit::WebBackForwardListProxy::removeItem): Use take instead of find/remove.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::didFinishCheckingText): Use take instead of get/remove so we
      hash only once.
      (WebKit::WebPage::didCancelCheckingText): Ditto.
      (WebKit::WebPage::stopExtendingIncrementalRenderingSuppression): Use the return
      value from remove instead of contains/remove so we hash only once.
      
      Source/WTF:
      
      Double hashing is common in code that needs to combine a remove with some
      action to only be done if the code is removed. The only way to avoid it is
      to write code using find and a hash table iterator. To help with this, add
      a boolean return value to remove functions to indicate if anything was removed.
      
      Double hashing also happens in code that does a get followed by a remove.
      The take function is helpful in this case. To help with this, add a takeFirst
      funciton to ListHashSet.
      
      * wtf/HashCountedSet.h:
      (WTF::HashCountedSet::removeAll): Added a boolean return value, analogous to the one
      that the HashCountedSet::remove function already has.
      
      * wtf/HashMap.h:
      (WTF::HashMap::remove): Added a boolean return value, true if something was removed.
      * wtf/HashSet.h:
      (WTF::HashSet::remove): Ditto.
      * wtf/RefPtrHashMap.h:
      (WTF::RefPtrHashMap::remove): Ditto.
      
      * wtf/ListHashSet.h:
      (WTF::ListHashSet::takeFirst): Added.
      (WTF::ListHashSet::takeLast): Added.
      (WTF::ListHashSet::remove): Added a boolean return value, true if something was removed.
      
      * wtf/WTFThreadData.h:
      (JSC::IdentifierTable::remove): Use the new remove return value to get rid of most of
      the code in this function.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      78bf2d4c
  14. 02 Sep, 2013 1 commit
  15. 31 Aug, 2013 1 commit
    • antti@apple.com's avatar
      Rename ChildIterator -> ElementChildIterator, DescendantIterator -> ElementDescendantIterator · 0494cf8a
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120561
      
      Reviewed by Andreas Kling.
      
      New names are more descriptive and consistent. They also put related iterator files close by in file lists.
      The types are always used with auto so longer names don't make them any clumsier to use.
      
      For simplicity included all Element iterator types from ElementIterator.h so it is the only file that has
      to be included by the clients.
      
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.xcodeproj/project.pbxproj:
      * accessibility/AccessibilityNodeObject.cpp:
      * accessibility/AccessibilityRenderObject.cpp:
      * accessibility/AccessibilityTable.cpp:
      * css/CSSFontFaceSource.cpp:
      * dom/ChildIterator.h: Removed.
      * dom/DescendantIterator.h: Removed.
      * dom/Document.cpp:
      * dom/ElementChildIterator.h: Copied from Source/WebCore/dom/ChildIterator.h.
      (WebCore::::ElementChildIterator):
      (WebCore::::operator):
      (WebCore::::ElementChildConstIterator):
      (WebCore::::ElementChildIteratorAdapter):
      (WebCore::::begin):
      (WebCore::::end):
      (WebCore::::ElementChildConstIteratorAdapter):
      (WebCore::elementChildren):
      (WebCore::childrenOfType):
      * dom/ElementDescendantIterator.h: Copied from Source/WebCore/dom/DescendantIterator.h.
      (WebCore::::ElementDescendantIterator):
      (WebCore::::operator):
      (WebCore::::ElementDescendantConstIterator):
      (WebCore::::ElementDescendantIteratorAdapter):
      (WebCore::::begin):
      (WebCore::::end):
      (WebCore::::ElementDescendantConstIteratorAdapter):
      (WebCore::elementDescendants):
      (WebCore::descendantsOfType):
      * dom/ElementIterator.h:
      * dom/Node.cpp:
      * dom/TreeScope.cpp:
      * editing/ApplyStyleCommand.cpp:
      * editing/markup.cpp:
      * html/HTMLAppletElement.cpp:
      * html/HTMLFieldSetElement.cpp:
      * html/HTMLLabelElement.cpp:
      * html/HTMLMapElement.cpp:
      * html/HTMLMediaElement.cpp:
      * html/HTMLObjectElement.cpp:
      * loader/PlaceholderDocument.cpp:
      * rendering/FilterEffectRenderer.cpp:
      * style/StyleResolveTree.cpp:
      * svg/SVGElement.cpp:
      * svg/SVGSVGElement.cpp:
      * svg/animation/SMILTimeContainer.cpp:
      * svg/graphics/SVGImage.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0494cf8a
  16. 30 Aug, 2013 1 commit
  17. 29 Aug, 2013 1 commit
    • antti@apple.com's avatar
      Remove NodeRenderingContext · 395cd888
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120466
      
      Reviewed by Andreas Kling.
      
      Switch the few remaining clients of this class to call the underlying code directly.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::State::initForStyleResolve):
      * dom/DOMAllInOne.cpp:
      * dom/Node.cpp:
      * dom/Node.h:
              
          Remove Node::parentNodeForRenderingAndStyle(). Make clients invoke NodeRenderingTraversal::parent() directly.
      
      * dom/NodeRenderingContext.cpp: Removed.
      * dom/NodeRenderingContext.h: Removed.
      * dom/ShadowRoot.h:
      * dom/Text.cpp:
      * dom/Text.h:
      * dom/TreeScope.cpp:
      * dom/TreeScope.h:
                  
          Remove virtual TreeScope::resetStyleInheritance. Make clients cast to ShadowRoot when needed.
      
      * html/HTMLSummaryElement.cpp:
      (WebCore::HTMLSummaryElement::detailsElement):
      * style/StyleResolveTree.cpp:
      (WebCore::Style::createTextRendererIfNeeded):
              
          For consistency switch resetStyleInheritance check to use parentNode() instead of renderingParentNode. This matches the NodeRenderingTraversal implementation.
          This difference is probably not testable in current trunk.
      
      (WebCore::Style::resolveTree):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      395cd888
  18. 28 Aug, 2013 1 commit
    • antti@apple.com's avatar
      Add child and descendant const iterators · 6005794d
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120430
      
      Reviewed by Andreas Kling
      
      This patch adds const-correct DOM tree traversal iterators. It also uses them in a few places.
              
      Some const_casts have been applied where constness breaks.
      
      * dom/ChildIterator.h:
      (WebCore::::ChildConstIterator):
      (WebCore::::operator):
      (WebCore::=):
      (WebCore::::ChildConstIteratorAdapter):
      (WebCore::::begin):
      (WebCore::::end):
      (WebCore::elementChildren):
      (WebCore::childrenOfType):
      * dom/DescendantIterator.h:
      (WebCore::::DescendantConstIterator):
      (WebCore::::operator):
      (WebCore::=):
      (WebCore::::DescendantConstIteratorAdapter):
      (WebCore::::begin):
      (WebCore::::end):
      (WebCore::elementDescendants):
      (WebCore::descendantsOfType):
      * dom/Node.cpp:
      (WebCore::Node::numberOfScopedHTMLStyleChildren):
      * html/HTMLFieldSetElement.cpp:
      (WebCore::HTMLFieldSetElement::legend):
      * html/HTMLFieldSetElement.h:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::finishParsingChildren):
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::containsJavaApplet):
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::title):
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
      (WebCore::SVGSVGElement::checkIntersection):
      (WebCore::SVGSVGElement::checkEnclosure):
      (WebCore::SVGSVGElement::getElementById):
      * svg/SVGSVGElement.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6005794d
  19. 27 Aug, 2013 2 commits
    • akling@apple.com's avatar
      RenderView::flowThreadController() should return a reference. · ad1a31b9
      akling@apple.com authored
      <https://webkit.org/b/120363>
      
      Reviewed by Antti Koivisto.
      
      This function does lazy construction and always returns an object.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad1a31b9
    • ch.dumez@sisa.samsung.com's avatar
      Implement DOM3 wheel event · 181483e1
      ch.dumez@sisa.samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=94081
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      Add support for DOM Level 3 WheelEvent:
      http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent
      
      Firefox, IE10 and since recently Blink already support it so
      it increases our cross-browser compatibility.
      
      The non-standard 'mousewheel' event is still supported for backward
      compatibility. Note that the deltas returned by the mousewheel and
      the wheel events are not identical:
      - They have opposite signs.
      - The wheel event reports the actual amount of pixels that should be
      scrolled while the legacy mousewheel event reports a factor of the
      number of mouse wheel ticks (using a constant multiplier).
      
      Tests: fast/events/wheelevent-basic.html
             fast/events/wheelevent-constructor.html
             fast/events/wheelevent-mousewheel-interaction.html
      
      * dom/Document.h:
      * dom/Document.idl:
      * dom/Element.h:
      * dom/Element.idl:
      * dom/EventNames.h:
      * dom/EventTarget.cpp:
      (WebCore::legacyType):
      (WebCore::EventTarget::shouldObserveLegacyType):
      (WebCore::EventTarget::setupLegacyTypeObserverIfNeeded):
      (WebCore::EventTarget::fireEventListeners):
      * dom/EventTarget.h:
      * dom/Node.cpp:
      (WebCore::Node::didMoveToNewDocument):
      (WebCore::tryAddEventListener):
      (WebCore::tryRemoveEventListener):
      (WebCore::Node::defaultEventHandler):
      * dom/WheelEvent.cpp:
      (WebCore::WheelEventInit::WheelEventInit):
      (WebCore::WheelEvent::WheelEvent):
      (WebCore::WheelEvent::initWheelEvent):
      * dom/WheelEvent.h:
      (WebCore::WheelEvent::deltaX):
      (WebCore::WheelEvent::deltaY):
      (WebCore::WheelEvent::deltaZ):
      (WebCore::WheelEvent::wheelDelta):
      (WebCore::WheelEvent::wheelDeltaX):
      (WebCore::WheelEvent::wheelDeltaY):
      * dom/WheelEvent.idl:
      * html/HTMLAttributeNames.in:
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::eventNameForAttributeName):
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::addEventListener):
      (WebCore::DOMWindow::removeEventListener):
      * page/DOMWindow.h:
      * page/DOMWindow.idl:
      * page/EventHandler.cpp:
      (WebCore::EventHandler::defaultWheelEventHandler):
      * plugins/blackberry/PluginViewBlackBerry.cpp:
      (WebCore::PluginView::handleWheelEvent):
      * svg/SVGElementInstance.cpp:
      * svg/SVGElementInstance.h:
      * svg/SVGElementInstance.idl:
      
      LayoutTests:
      
      Add several layout tests to check support for DOM3 wheel event.
      
      * fast/events/wheelevent-basic-expected.txt: Added.
      * fast/events/wheelevent-basic.html: Added.
      * fast/events/wheelevent-constructor-expected.txt: Added.
      * fast/events/wheelevent-constructor.html: Added.
      * fast/events/wheelevent-mousewheel-interaction-expected.txt: Added.
      * fast/events/wheelevent-mousewheel-interaction.html: Added.
      * platform/efl/fast/events/wheelevent-basic-expected.txt: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      181483e1
  20. 24 Aug, 2013 1 commit
    • antti@apple.com's avatar
      Tighten before/after pseudo element accessors · 9426a748
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120204
      
      Reviewed by Andreas Kling.
      
      We have generic looking Element::pseudoElement(PseudoID) which only returns before/after pseudo elements.
              
      Switch to Element::before/afterPseudoElement(), similarly for setters.
      
      * WebCore.exp.in:
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::ComputedStyleExtractor::styledNode):
      * dom/Element.cpp:
      (WebCore::Element::~Element):
      (WebCore::beforeOrAfterPseudeoElement):
      (WebCore::Element::computedStyle):
      (WebCore::Element::updatePseudoElement):
      (WebCore::Element::createPseudoElementIfNeeded):
      (WebCore::Element::updateBeforePseudoElement):
      (WebCore::Element::updateAfterPseudoElement):
      (WebCore::Element::beforePseudoElement):
      (WebCore::Element::afterPseudoElement):
      (WebCore::Element::setBeforePseudoElement):
      (WebCore::Element::setAfterPseudoElement):
      (WebCore::disconnectPseudoElement):
      (WebCore::Element::clearBeforePseudoElement):
      (WebCore::Element::clearAfterPseudoElement):
      (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
      * dom/Element.h:
      * dom/ElementRareData.h:
      (WebCore::ElementRareData::beforePseudoElement):
      (WebCore::ElementRareData::afterPseudoElement):
      (WebCore::ElementRareData::hasPseudoElements):
      (WebCore::ElementRareData::~ElementRareData):
      (WebCore::ElementRareData::clearBeforePseudoElement):
      (WebCore::ElementRareData::clearAfterPseudoElement):
      (WebCore::ElementRareData::setBeforePseudoElement):
      (WebCore::ElementRareData::setAfterPseudoElement):
              
          Move detach logic to Element. ElementRareData should not implement semantics.
      
      * dom/Node.cpp:
      (WebCore::Node::pseudoAwarePreviousSibling):
      (WebCore::Node::pseudoAwareNextSibling):
      (WebCore::Node::pseudoAwareFirstChild):
      (WebCore::Node::pseudoAwareLastChild):
      * dom/NodeRenderingTraversal.cpp:
      (WebCore::NodeRenderingTraversal::nextSiblingSlow):
      (WebCore::NodeRenderingTraversal::previousSiblingSlow):
      * rendering/RenderTreeAsText.cpp:
      (WebCore::writeCounterValuesFromChildren):
      (WebCore::counterValueForElement):
      * style/StyleResolveTree.cpp:
      (WebCore::Style::attachRenderTree):
      (WebCore::Style::resolveTree):
      * testing/Internals.cpp:
      (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement):
      (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9426a748
  21. 23 Aug, 2013 1 commit
    • antti@apple.com's avatar
      <https://webkit.org/b/120166> Add Traversal<ElementType> template · ecdc7b0a
      antti@apple.com authored
      Reviewed by Andreas Kling.
      
      It is common to traverse through a subtree looking for elements of specific type and then casting to the type. This pattern can be generalized.
              
      This patch adds a new Traversal<typename ElementType> template. It works like ElementTraversal except that the traversal is limited to the specified type.
      The patch also uses the template in a bunch of applicable places.
      
      * WebCore.exp.in:
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::addImageMapChildren):
      * dom/Document.cpp:
      (WebCore::Document::removeTitle):
      (WebCore::Document::updateBaseURL):
      (WebCore::Document::processBaseElement):
      * dom/Element.h:
      * dom/ElementTraversal.h:
      (WebCore::::firstChildTemplate):
      (WebCore::::firstWithinTemplate):
      (WebCore::::lastChildTemplate):
      (WebCore::::lastWithinTemplate):
      (WebCore::::nextTemplate):
      (WebCore::::previousTemplate):
      (WebCore::::nextSiblingTemplate):
      (WebCore::::previousSiblingTemplate):
      (WebCore::::nextSkippingChildrenTemplate):
      (WebCore::::firstChild):
      (WebCore::::lastChild):
      (WebCore::::firstWithin):
      (WebCore::::lastWithin):
      (WebCore::::next):
      (WebCore::::previous):
      (WebCore::::nextSibling):
      (WebCore::::previousSibling):
      (WebCore::::nextSkippingChildren):
      (WebCore::ElementTraversal::previousIncludingPseudo):
      (WebCore::ElementTraversal::nextIncludingPseudo):
      (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
      (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
      * dom/Node.cpp:
      (WebCore::Node::numberOfScopedHTMLStyleChildren):
      * dom/NodeIterator.cpp:
      (WebCore::NodeIterator::NodeIterator):
      * dom/NodeIterator.h:
      * dom/Traversal.cpp:
      (WebCore::NodeIteratorBase::NodeIteratorBase):
      (WebCore::NodeIteratorBase::acceptNode):
      * dom/Traversal.h:
              
          Renamed existing class called Traversal to less generic NodeIteratorBase.
      
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::labelElementForId):
      (WebCore::TreeScope::findAnchor):
      * dom/TreeWalker.cpp:
      (WebCore::TreeWalker::TreeWalker):
      * dom/TreeWalker.h:
      * editing/FrameSelection.cpp:
      (WebCore::scanForForm):
      * editing/markup.cpp:
      (WebCore::createContextualFragment):
      * html/HTMLAnchorElement.h:
      (WebCore::isHTMLAnchorElement):
      (WebCore::HTMLAnchorElement):
      * html/HTMLAreaElement.h:
      (WebCore::isHTMLAreaElement):
      (WebCore::HTMLAreaElement):
      * html/HTMLBaseElement.h:
      (WebCore::isHTMLBaseElement):
      (WebCore::HTMLBaseElement):
      * html/HTMLElement.h:
      (WebCore::HTMLElement):
      * html/HTMLFieldSetElement.cpp:
      (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
      (WebCore::HTMLFieldSetElement::childrenChanged):
      (WebCore::HTMLFieldSetElement::legend):
      * html/HTMLFormControlElement.h:
      (WebCore::toHTMLFormControlElement):
      (WebCore::HTMLFormControlElement):
      * html/HTMLLabelElement.cpp:
      (WebCore::nodeAsSupportedLabelableElement):
      (WebCore::HTMLLabelElement::control):
      * html/HTMLLabelElement.h:
      (WebCore::isHTMLLabelElement):
      (WebCore::HTMLLabelElement):
      * html/HTMLLegendElement.h:
      (WebCore::isHTMLLegendElement):
      (WebCore::HTMLLegendElement):
      * html/HTMLMapElement.cpp:
      (WebCore::HTMLMapElement::mapMouseEvent):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::finishParsingChildren):
      * html/HTMLStyleElement.h:
      (WebCore::isHTMLStyleElement):
      (WebCore::HTMLStyleElement):
      * html/HTMLTitleElement.h:
      (WebCore::HTMLTitleElement):
      * html/HTMLTrackElement.h:
      (WebCore::isHTMLTrackElement):
      (WebCore::HTMLTrackElement):
      * html/LabelableElement.h:
      (WebCore::isLabelableElement):
      (WebCore::LabelableElement):
      * rendering/FilterEffectRenderer.cpp:
      (WebCore::FilterEffectRenderer::buildReferenceFilter):
      * svg/SVGElement.h:
      (WebCore::SVGElement):
      * svg/SVGForeignObjectElement.h:
      (WebCore::isSVGForeignObjectElement):
      (WebCore::SVGForeignObjectElement):
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
      (WebCore::SVGSVGElement::getElementById):
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::title):
      * svg/SVGTitleElement.h:
      (WebCore::SVGTitleElement):
      * svg/animation/SMILTimeContainer.cpp:
      (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::SVGSMILElement::isSMILElement):
      * svg/animation/SVGSMILElement.h:
      (WebCore::SVGSMILElement):
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::hasSingleSecurityOrigin):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ecdc7b0a
  22. 20 Aug, 2013 1 commit
    • antti@apple.com's avatar
      <https://webkit.org/b/120017> Remove NodeRenderingTraversal::ParentDetails · b4267a36
      antti@apple.com authored
      Reviewed by Andreas Kling.
      
      Remove this oddly factored type that is used to optionally collect some data during ComposedShadowTreeWalker parent traversal.
              
      Also removed support for reset-style-inheritance attribute in InsertionPoint. We don't use or expose it.
      
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::State::initForStyleResolve):
      (WebCore::StyleResolver::styleForElement):
      * css/StyleResolver.h:
      (WebCore::StyleResolver::State::State):
      (WebCore::StyleResolver::State::elementLinkState):
              
          Remove m_distributedToInsertionPoint State field. We never hit the cases where it was used.
      
      * dom/ComposedShadowTreeWalker.cpp:
      (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
      (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
      (WebCore::ComposedShadowTreeWalker::traverseParent):
              
          Return null instead of setting childWasOutOfComposition to details object. That's what would happen anyway in the caller.
      
      (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
      (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
      * dom/ComposedShadowTreeWalker.h:
      * dom/Node.cpp:
      (WebCore::Node::insertionParentForBinding):
      * dom/NodeRenderingContext.cpp:
      (WebCore::NodeRenderingContext::NodeRenderingContext):
      (WebCore::NodeRenderingContext::isOnEncapsulationBoundary):
              
          Make this look up InsertionPoint directly intead of relying it being populated in m_parentDetails. The function is used only in
          a few non-performance critical places.
      
      (WebCore::NodeRenderingContext::resetStyleInheritance):
              
          Return parent ShadowRoots resetStyleInheritance() flag instead of using m_parentDetails.
      
      * dom/NodeRenderingContext.h:
      * dom/NodeRenderingTraversal.cpp:
      (WebCore::NodeRenderingTraversal::parentSlow):
      * dom/NodeRenderingTraversal.h:
      (WebCore::NodeRenderingTraversal::parent):
              
          Remove ParentDetails.
      
      * html/HTMLAttributeNames.in:
      * html/shadow/InsertionPoint.cpp:
              
          Remove unused resetStyleInheritance attribute.
      
      (WebCore::InsertionPoint::removedFrom):
      (WebCore::findInsertionPointOf):
              
          Renamed for clarity.
      
      * html/shadow/InsertionPoint.h:
      * testing/Internals.cpp:
      (WebCore::Internals::includerFor):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b4267a36
  23. 17 Aug, 2013 2 commits
    • akling@apple.com's avatar
      <https://webkit.org/b/119957> Page::contextMenuController() should return a reference. · c6d7b3a8
      akling@apple.com authored
      Reviewed by Antti Koivisto.
      
      Page::m_contextMenuController is never null.
      
      * page/Page.h:
      (WebCore::Page::contextMenuController):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c6d7b3a8
    • antti@apple.com's avatar
      <https://webkit.org/b/119886> PseudoElement is abusing parent node pointer · fe1eb0a7
      antti@apple.com authored
      Reviewed by Darin Adler.
      
      PseudoElement sets its host node as its parent. This is confusing and wrong as it breaks
      the basic tree consistency (a node is a child node of its parent node).
              
      This patch adds an explicit host pointer PseudoElement and switches the call sites over. Memory
      impact is negligible as there are not that many ::befores and ::afters.
      
      * dom/ComposedShadowTreeWalker.cpp:
      (WebCore::ComposedShadowTreeWalker::traverseParent):
      * dom/EventPathWalker.cpp:
      (WebCore::EventPathWalker::moveToParent):
      * dom/EventRetargeter.h:
      (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
      * dom/Node.cpp:
      (WebCore::Node::~Node):
              
          Add consistency assertions. Remove unnecessary clearing of sibling pointers. They should be cleared already.
      
      (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
      * dom/PseudoElement.cpp:
      (WebCore::PseudoElement::PseudoElement):
      (WebCore::PseudoElement::customStyleForRenderer):
      * dom/PseudoElement.h:
      (WebCore::toPseudoElement):
              
          Add casting functions.
      
      * inspector/InspectorLayerTreeAgent.cpp:
      (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestResult::setInnerNode):
      (WebCore::HitTestResult::setInnerNonSharedNode):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fe1eb0a7
  24. 16 Aug, 2013 3 commits
    • rniwa@webkit.org's avatar
      <https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a... · 38a4b49a
      rniwa@webkit.org authored
      <https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a redundant call to rendererIsEditable
      
      Reviewed by Benjamin Poulain.
      
      Refactor highestEditableRoot to avoid an extra tree walk. We now walk up the ancestor chain up to
      the first root editable element exactly once.
      
      * dom/Node.cpp:
      (WebCore::Node::rendererIsEditable): Change the order of conditions to make the evaluation faster
      when we don't have to check RenderStyle's value.
      * editing/htmlediting.cpp:
      (WebCore::highestEditableRoot):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38a4b49a
    • akling@apple.com's avatar
      <https://webkit.org/b/119866> Frame::eventHandler() should return a reference. · d18f79bb
      akling@apple.com authored
      Reviewed by Anders Carlsson.
      
      Frame::m_eventHandler is never null.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d18f79bb
    • antti@apple.com's avatar
      <https://webkit.org/b/119865> Parent pointer and shadow root host pointer should not be shared · f269b27a
      antti@apple.com authored
      Reviewed by Andreas Kling.
      
      Node::m_parentOrShadowHostNode is currently used both as the parent pointer for regular nodes and as the host
      pointer for ShadowRoots. This is confusing. It is also slow as it introduces a branch to all code paths that 
      want to traverse ancestors normally, without leaving the shadow trees. This is much more popular than
      traversing through.
              
      This patch makes the Node have a pure parent pointer only and adds the host element pointer as a separate
      member in ShadowRoot. This eliminates the ShadowRoot test branch from Node::parentNode() as the pointer is
      now always null in the root node.
              
      ShadowRoot grows by a pointer. This is not significant as there are few ShadowRoots compared to Nodes.
      
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::pushParentShadowRoot):
      (WebCore::StyleResolver::popParentShadowRoot):
      * dom/Attr.cpp:
      (WebCore::Attr::createTextChild):
      * dom/ComposedShadowTreeWalker.cpp:
      (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::insertBeforeCommon):
      (WebCore::ContainerNode::removeBetween):
      * dom/ContainerNodeAlgorithms.cpp:
      (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
      (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::appendChildToContainer):
      (WebCore::Private::addChildNodesToDeletionQueue):
      * dom/Document.h:
      (WebCore::Node::Node):
      * dom/Element.cpp:
      (WebCore::Element::addShadowRoot):
      (WebCore::Element::removeShadowRoot):
      * dom/ElementRareData.h:
      (WebCore::ElementRareData::releasePseudoElement):
      * dom/EventPathWalker.cpp:
      (WebCore::EventPathWalker::moveToParent):
      * dom/EventRetargeter.cpp:
      (WebCore::determineDispatchBehavior):
      * dom/EventRetargeter.h:
      (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
      * dom/Node.cpp:
      (WebCore::Node::shadowHost):
      (WebCore::Node::deprecatedShadowAncestorNode):
      (WebCore::Node::parentOrShadowHostElement):
      * dom/Node.h:
      (WebCore::Node::hasTreeSharedParent):
              
          Shadow host elements refs the ShadowRoot. There is no reason to use TreeShared to keep it alive.
      
      (WebCore::Node::setParentNode):
      (WebCore::Node::parentNode):
      (WebCore::Node::parentNodeGuaranteedHostFree):
      * dom/PseudoElement.cpp:
      (WebCore::PseudoElement::PseudoElement):
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::ShadowRoot):
      (WebCore::ShadowRoot::setInnerHTML):
      (WebCore::ShadowRoot::setApplyAuthorStyles):
      (WebCore::ShadowRoot::setResetStyleInheritance):
      * dom/ShadowRoot.h:
              
          Rename host() -> hostElement() for clarity.
      
      (WebCore::Node::parentOrShadowHostNode):
      * dom/Text.cpp:
      (WebCore::isSVGShadowText):
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::focusedElement):
      * html/shadow/ContentDistributor.cpp:
      (WebCore::ContentDistributor::ensureDistribution):
      * html/shadow/InsertionPoint.cpp:
      (WebCore::InsertionPoint::insertedInto):
      (WebCore::InsertionPoint::removedFrom):
      (WebCore::InsertionPoint::parseAttribute):
      * page/DragController.cpp:
      (WebCore::asFileInput):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleMousePressEvent):
      (WebCore::instanceAssociatedWithShadowTreeElement):
      * page/FocusController.cpp:
      (WebCore::FocusNavigationScope::owner):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::hasLineIfEmpty):
      * rendering/RenderLayer.cpp:
      (WebCore::rendererForScrollbar):
      * svg/SVGElementInstance.h:
      (WebCore::SVGElementInstance::setParentNode):
                  
          Renamed so it works with appendChildToContainer template.
      
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::title):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f269b27a
  25. 15 Aug, 2013 1 commit
    • antti@apple.com's avatar
      <https://webkit.org/b/119834> Remove ElementShadow · 64d69393
      antti@apple.com authored
      Reviewed by Anders Carlsson.
      
      It is 1:1 with ShadowRoot and has virtually no functionality. What little there is can be moved to ShadowRoot or Element.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::locateCousinList):
      * css/StyleScopeResolver.cpp:
      (WebCore::StyleScopeResolver::styleSharingCandidateMatchesHostRules):
      (WebCore::StyleScopeResolver::matchHostRules):
      * dom/ComposedShadowTreeWalker.cpp:
      (WebCore::nodeCanBeDistributed):
      (WebCore::ComposedShadowTreeWalker::traverseChild):
      * dom/ContainerNode.cpp:
      (WebCore::childAttachedAllowedWhenAttachingChildren):
      * dom/ContainerNodeAlgorithms.cpp:
      (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
      (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
      (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
      (WebCore::assertConnectedSubrameCountIsConsistent):
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::ChildFrameDisconnector::collectFrameOwners):
      * dom/DOMAllInOne.cpp:
      * dom/Document.cpp:
      * dom/Element.cpp:
      (WebCore::Element::~Element):
      (WebCore::Element::attach):
      (WebCore::Element::detach):
      (WebCore::Element::shadowRoot):
      (WebCore::Element::didAffectSelector):
      (WebCore::Element::addShadowRoot):
      (WebCore::Element::removeShadowRoot):
              
          Move addShadowRoot and removeShadowRoot here from ElementShadow.
      
      (WebCore::Element::createShadowRoot):
      (WebCore::Element::authorShadowRoot):
      (WebCore::Element::userAgentShadowRoot):
      (WebCore::Element::ensureUserAgentShadowRoot):
      (WebCore::Element::childrenChanged):
      (WebCore::Element::removeAllEventListeners):
      * dom/Element.h:
      (WebCore::isShadowHost):
      * dom/ElementRareData.h:
      (WebCore::ElementRareData::clearShadowRoot):
      (WebCore::ElementRareData::shadowRoot):
      (WebCore::ElementRareData::setShadowRoot):
      (WebCore::ElementRareData::~ElementRareData):
      * dom/ElementShadow.cpp: Removed.
      * dom/ElementShadow.h: Removed.
      * dom/EventDispatcher.cpp:
      * dom/EventPathWalker.cpp:
      (WebCore::EventPathWalker::moveToParent):
      * dom/Node.cpp:
      (WebCore::Node::needsShadowTreeWalkerSlow):
      * dom/NodeRenderingContext.cpp:
      * dom/NodeRenderingContext.h:
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::attach):
      (WebCore::ShadowRoot::detach):
              
          Move attached() tests from ElementShadow.
      
      (WebCore::ShadowRoot::childrenChanged):
      (WebCore::ShadowRoot::removeAllEventListeners):
              
          Move here from ElementShadow.
      
      * dom/ShadowRoot.h:
      (WebCore::Node::shadowRoot):
      * dom/TreeScopeAdopter.cpp:
      * html/ColorInputType.cpp:
      (WebCore::ColorInputType::createShadowSubtree):
      * html/FileInputType.cpp:
      (WebCore::FileInputType::createShadowSubtree):
      (WebCore::FileInputType::disabledAttributeChanged):
      (WebCore::FileInputType::multipleAttributeChanged):
      * html/HTMLFormControlElement.cpp:
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::canStartSelection):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::updateType):
      * html/HTMLKeygenElement.cpp:
      * html/HTMLMediaElement.cpp:
      * html/HTMLTextAreaElement.cpp:
      * html/InputType.cpp:
      * html/RangeInputType.cpp:
      (WebCore::RangeInputType::handleMouseDownEvent):
      (WebCore::RangeInputType::createShadowSubtree):
      * html/TextFieldInputType.cpp:
      (WebCore::TextFieldInputType::createShadowSubtree):
      * html/ValidationMessage.cpp:
      * html/shadow/ContentDistributor.cpp:
      (WebCore::ContentDistributor::distribute):
      (WebCore::ContentDistributor::ensureDistribution):
      * html/shadow/ContentDistributor.h:
      (WebCore::ContentDistributor::isValid):
      * html/shadow/InsertionPoint.cpp:
      (WebCore::InsertionPoint::childrenChanged):
      (WebCore::InsertionPoint::insertedInto):
      (WebCore::InsertionPoint::removedFrom):
      (WebCore::resolveReprojection):
      * html/shadow/InsertionPoint.h:
      (WebCore::shadowRootOfParentForDistribution):
      * html/shadow/SliderThumbElement.cpp:
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::unbind):
      (WebCore::InspectorDOMAgent::buildObjectForNode):
      * page/FocusController.cpp:
      (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
      * rendering/RenderFileUploadControl.cpp:
      (WebCore::RenderFileUploadControl::uploadButton):
      * rendering/RenderTheme.cpp:
      * style/StyleResolveTree.cpp:
      (WebCore::Style::resolveTree):
      * svg/SVGTRefElement.cpp:
      (WebCore::SVGTRefElement::updateReferencedText):
      (WebCore::SVGTRefElement::detachTarget):
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::clearResourceReferences):
      (WebCore::SVGUseElement::buildShadowAndInstanceTree):
      (WebCore::SVGUseElement::buildShadowTree):
      * testing/Internals.cpp:
      (WebCore::Internals::ensureShadowRoot):
      (WebCore::Internals::shadowRoot):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64d69393
  26. 14 Aug, 2013 1 commit
    • antti@apple.com's avatar
      Remove Node::attach() and ContainerNode::attach() · 6bd61d97
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119698
      
      Reviewed by Andreas Kling.
      
      Currently attach() is a virtual function on Node. However only Elements have style and so a corresponding 
      independent render object. Attaching should be made Element level concept.
              
      This patch merges Node::attach() and ContainerNode::attach() to Element::attach(). Other related functions
      (detach(), reattach(), etc) move similarly.
              
      Next step here is to make attach non-virtual in common case and move it out from the DOM tree.
      
      * dom/ContainerNode.cpp:
      (WebCore::attachChild):
      (WebCore::detachChild):
              
          Temporary helpers. Further refactoring should get rid of these.
      
      (WebCore::ContainerNode::takeAllChildrenFrom):
      (WebCore::ContainerNode::removeBetween):
      (WebCore::updateTreeAfterInsertion):
      * dom/ContainerNode.h:
      * dom/Document.cpp:
      (WebCore::Document::attach):
      (WebCore::Document::detach):
              
          Copy the relevant parts of the code from base class attach/detach here. It is not much.
      
      * dom/Document.h:
      * dom/Element.cpp:
      (WebCore::Element::~Element):
              
          Node destructor no longer detaches.
      
      (WebCore::Element::attachChildren):
      (WebCore::Element::attach):
              
          Combine Node::attach(), ContainerNode::attach() and Element::attach().
      
      (WebCore::Element::detachChildren):
      (WebCore::Element::detach):
              
          Combine Node::detach(), ContainerNode::detach() and Element::detach().
      
      (WebCore::Element::reattach):
      (WebCore::Element::reattachIfAttached):
      (WebCore::Element::lazyReattach):
      (WebCore::Element::lazyAttach):
              
          This stuff moves from ContainerNode/Node.
      
      * dom/Element.h:
      (WebCore::Element::AttachContext::AttachContext):
      * dom/ElementShadow.cpp:
      (WebCore::ElementShadow::removeShadowRoot):
      (WebCore::ElementShadow::attach):
      (WebCore::ElementShadow::detach):
      * dom/ElementShadow.h:
      * dom/Node.cpp:
      (WebCore::Node::~Node):
              
          Assert that we are not attached at this point.
      
      (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
      * dom/Node.h:
      (WebCore::Node::setAttached):
      (WebCore::Node::setStyleChange):
              
          Make available.
      
      * dom/NodeRenderingContext.cpp:
      (WebCore::NodeRenderingContext::NodeRenderingContext):
      * dom/NodeRenderingContext.h:
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::attach):
      (WebCore::ShadowRoot::detach):
      * dom/ShadowRoot.h:
      * dom/Text.cpp:
      (WebCore::Text::~Text):
              
          Node destructor no longer detaches. Add destructor.
      
      (WebCore::Text::createTextRenderersForSiblingsAfterAttachIfNeeded):
              
          Factor the code that updates sibling text renderers after attach into a function.
      
      (WebCore::Text::attachText):
      (WebCore::Text::detachText):
              
          Text::attachText/detachText replace virtual Node::attach/detach. They do the part of the work text nodes actually ended up doing.
      
      (WebCore::Text::updateTextRenderer):
      * dom/Text.h:
      * html/HTMLViewSourceDocument.cpp:
      (WebCore::HTMLViewSourceDocument::addText):
      * html/PluginDocument.cpp:
      (WebCore::PluginDocument::detach):
      * html/PluginDocument.h:
      * html/parser/HTMLConstructionSite.cpp:
      (WebCore::executeTask):
      * html/shadow/ContentDistributor.cpp:
      (WebCore::ContentDistributor::invalidateDistribution):
      * html/shadow/InsertionPoint.cpp:
      (WebCore::InsertionPoint::attach):
      (WebCore::InsertionPoint::detach):
      * loader/PlaceholderDocument.cpp:
      (WebCore::PlaceholderDocument::attach):
      * loader/PlaceholderDocument.h:
      * style/StyleResolveTree.cpp:
      (WebCore::Style::resolveLocal):
      (WebCore::Style::updateTextStyle):
      * xml/parser/XMLDocumentParser.cpp:
      (WebCore::XMLDocumentParser::exitText):
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      (WebCore::XMLDocumentParser::processingInstruction):
      (WebCore::XMLDocumentParser::cdataBlock):
      (WebCore::XMLDocumentParser::comment):
              
          No need to attach non-rendered nodes.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6bd61d97
  27. 12 Aug, 2013 1 commit
    • antti@apple.com's avatar
      Move ElementTraversal to ElementTraversal.h · 9b3887b9
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119678
      
      Rubber-stamped by Andreas Kling.
      
      Move ElementTraversal namespace from NodeTraversal.h to a correctly named file.
      
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.xcodeproj/project.pbxproj:
      * accessibility/AccessibilityRenderObject.cpp:
      * css/StyleInvalidationAnalysis.cpp:
      * dom/Document.cpp:
      * dom/DocumentOrderedMap.cpp:
      * dom/Element.cpp:
      * dom/ElementTraversal.h: Added.
      (WebCore::ElementTraversal::firstElementWithinTemplate):
      (WebCore::ElementTraversal::firstWithin):
      (WebCore::ElementTraversal::traverseNextElementTemplate):
      (WebCore::ElementTraversal::next):
      (WebCore::ElementTraversal::traverseNextElementSkippingChildrenTemplate):
      (WebCore::ElementTraversal::nextSkippingChildren):
      (WebCore::ElementTraversal::previousIncludingPseudo):
      (WebCore::ElementTraversal::nextIncludingPseudo):
      (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
      (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
      * dom/Node.cpp:
      * dom/NodeTraversal.h:
      * dom/SelectorQuery.cpp:
      * dom/TreeScope.cpp:
      * dom/VisitedLinkState.cpp:
      * editing/FrameSelection.cpp:
      * editing/markup.cpp:
      * html/HTMLCollection.cpp:
      * html/HTMLFieldSetElement.cpp:
      * html/HTMLFormElement.cpp:
      * html/HTMLLabelElement.cpp:
      * html/HTMLLegendElement.cpp:
      * html/HTMLMapElement.cpp:
      * html/HTMLObjectElement.cpp:
      * html/HTMLSelectElement.cpp:
      * html/shadow/ContentDistributor.cpp:
      * page/FocusController.cpp:
      * rendering/RenderCounter.cpp:
      * rendering/RenderListItem.cpp:
      * svg/SVGSVGElement.cpp:
      * svg/SVGStyledElement.cpp:
      * svg/SVGUseElement.cpp:
      * svg/animation/SMILTimeContainer.cpp:
      * svg/graphics/SVGImage.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153939 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9b3887b9
  28. 11 Aug, 2013 1 commit
    • akling@apple.com's avatar
      Make some things that return never-null pointers return references instead. · ad1137cb
      akling@apple.com authored
      <http://webkit.org/b/119660>
      
      Reviewed by Antti Koivisto.
      
      Source/WebCore:
      
      These functions never return null anyway, so remove any ambiguity by letting
      them return references instead of pointers.
      
      - Node::ensureRareData()
      - Element::ensureUniqueElementData()
      - Element::ensureShadow()
      - Element::ensureUserAgentShadowRoot()
      - StyledElement::ensureMutableInlineStyle()
      - NodeRareData::ensureNodeLists()
      - NodeRareData::ensureMutationObserverData()
      - EventTarget::ensureEventTargetData()
      - Document::ensureStyleResolver()
      - Document::selectorQueryCache()
      - Document::mediaQueryMatcher()
      - FlowThreadController::ensureRenderFlowThreadWithName()
      - HTMLTrackElement::ensureTrack()
      - SVGElement::ensureSVGRareData()
      - AnimationControllerPrivate::ensureCompositeAnimation()
      
      Source/WebKit/qt:
      
      * Api/qwebelement.cpp:
      (QWebElement::styleProperty):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad1137cb
  29. 08 Aug, 2013 1 commit
    • akling@apple.com's avatar
      Element: Modernize attribute storage accessor functions. · ae4fef14
      akling@apple.com authored
      <http://webkit.org/b/119578>
      
      Source/WebCore:
      
      Patch by Mark Lam <mark.lam@apple.com> on 2013-08-08
      Reviewed by Antti Koivisto.
      
      Rename these functions to more WebKit-style names.
      
      - const Attribute* attributeItem(index) => const Attribute& attributeAt(index)
      - const Attribute* getAttributeItem(name) => const Attribute* findAttributeByName(name)
      - unsigned getAttributeItemIndex(name) => unsigned findAttributeIndexByName(name)
      
      Note that attributeAt() now returns a reference instead of a pointer. That's right.
      
      * css/SelectorChecker.cpp:
      (WebCore::attributeValueMatches):
      (WebCore::anyAttributeMatches):
      * css/SelectorChecker.h:
      (WebCore::SelectorChecker::checkExactAttribute):
      * dom/Attr.cpp:
      (WebCore::Attr::elementAttribute):
      * dom/DatasetDOMStringMap.cpp:
      (WebCore::DatasetDOMStringMap::getNames):
      (WebCore::DatasetDOMStringMap::item):
      (WebCore::DatasetDOMStringMap::contains):
      * dom/Element.cpp:
      (WebCore::Element::detachAttribute):
      (WebCore::Element::removeAttribute):
      (WebCore::Element::getAttribute):
      (WebCore::Element::setAttribute):
      (WebCore::Element::setSynchronizedLazyAttribute):
      (WebCore::Element::setAttributeInternal):
      (WebCore::Element::setAttributeNode):
      (WebCore::Element::removeAttributeNode):
      (WebCore::Element::removeAttributeInternal):
      (WebCore::Element::getAttributeNode):
      (WebCore::Element::getAttributeNodeNS):
      (WebCore::Element::hasAttribute):
      (WebCore::Element::hasAttributeNS):
      (WebCore::Element::computeInheritedLanguage):
      (WebCore::Element::normalizeAttributes):
      (WebCore::Element::getURLAttribute):
      (WebCore::Element::getNonEmptyURLAttribute):
      (WebCore::Element::detachAllAttrNodesFromElement):
      (WebCore::Element::cloneAttributesFromElement):
      (WebCore::ElementData::isEquivalent):
      (WebCore::ElementData::findAttributeIndexByNameSlowCase):
      (WebCore::ElementData::findAttributeIndexByNameForAttributeNode):
      (WebCore::UniqueElementData::findAttributeByName):
      (WebCore::UniqueElementData::attributeAt):
      * dom/Element.h:
      (WebCore::Element::findAttributeIndexByName):
      (WebCore::Element::fastHasAttribute):
      (WebCore::Element::fastGetAttribute):
      (WebCore::Element::attributeAt):
      (WebCore::Element::findAttributeByName):
      (WebCore::ElementData::findAttributeByName):
      (WebCore::ElementData::findAttributeIndexByName):
      (WebCore::ElementData::attributeAt):
      * dom/NamedNodeMap.cpp:
      (WebCore::NamedNodeMap::removeNamedItem):
      (WebCore::NamedNodeMap::removeNamedItemNS):
      (WebCore::NamedNodeMap::item):
      * dom/Node.cpp:
      (WebCore::Node::dumpStatistics):
      (WebCore::Node::isDefaultNamespace):
      (WebCore::Node::lookupNamespaceURI):
      (WebCore::Node::lookupNamespacePrefix):
      (WebCore::Node::compareDocumentPosition):
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::makePresentationAttributeCacheKey):
      (WebCore::StyledElement::rebuildPresentationAttributeStyle):
      * editing/MarkupAccumulator.cpp:
      (WebCore::MarkupAccumulator::appendElement):
      * editing/markup.cpp:
      (WebCore::completeURLs):
      (WebCore::StyledMarkupAccumulator::appendElement):
      * html/HTMLEmbedElement.cpp:
      (WebCore::HTMLEmbedElement::parametersForPlugin):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::updateType):
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::parametersForPlugin):
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::parseAttribute):
      * html/parser/HTMLConstructionSite.cpp:
      (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
      * inspector/DOMPatchSupport.cpp:
      (WebCore::DOMPatchSupport::innerPatchNode):
      (WebCore::DOMPatchSupport::createDigest):
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::setAttributesAsText):
      (WebCore::InspectorDOMAgent::performSearch):
      (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
      * page/PageSerializer.cpp:
      (WebCore::isCharsetSpecifyingNode):
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::getPresentationAttribute):
      * xml/XPathFunctions.cpp:
      (WebCore::XPath::FunLang::evaluate):
      * xml/XPathNodeSet.cpp:
      (WebCore::XPath::NodeSet::traversalSort):
      * xml/XPathStep.cpp:
      (WebCore::XPath::Step::nodesInAxis):
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      (WebCore::XMLDocumentParser::XMLDocumentParser):
      * xml/parser/XMLDocumentParserQt.cpp:
      (WebCore::XMLDocumentParser::XMLDocumentParser):
      
      Source/WebKit/blackberry:
      
      Reviewed by Antti Koivisto.
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::webContext):
      
      Source/WebKit/qt:
      
      Reviewed by Antti Koivisto.
      
      * Api/qwebelement.cpp:
      (QWebElement::attributeNames):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ae4fef14
  30. 07 Aug, 2013 1 commit
    • antti@apple.com's avatar
      Move style recalculation out from Element · e6cf411a
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119497
      
      Reviewed by Andreas Kling.
      
      Element currently does too much. Element::recalcStyle() and the related functions can be turned into
      standalone functions that operate on DOM tree. This will also give more freedom for future refactoring,
      for example making style recalculation non-recursive.
      
      * WebCore.xcodeproj/project.pbxproj:
      * css/StyleResolveTree.cpp: Added.
      (WebCore::Style::determineChange):
                      
          - moved and renamed from Node::diff
          - factored to use early return style
          - simplifield the null input logic
      
      (WebCore::Style::pseudoStyleCacheIsInvalid):
              
          - moved from Element::pseudoStyleCacheIsInvalid
          - narrowed to take RenderObject rather than operate on Element
      
      (WebCore::Style::resolveLocal):
              
          - split from Element::recalcStyle
          - factored to use early return style
      
      (WebCore::Style::resolveTree):
              
          - moved and renamed from Element::recalcStyle
      
      * css/StyleResolveTree.h: Added.
              
          - introcuduce Style namespace for style related classes and functions
          - move and rename Node::StyleChange -> Style::Change
      
      * css/StyleResolver.h:
      (WebCore::StyleResolverParentPusher::StyleResolverParentPusher):
      (WebCore::StyleResolverParentPusher::push):
      (WebCore::StyleResolverParentPusher::~StyleResolverParentPusher):
              
          Moved this stack helper to StyleResolver.h for now since it is needed by both
          StyleRecalculation and Element.
      
      * dom/Document.cpp:
      (WebCore::Document::recalcStyle):
      (WebCore::Document::updateStyleIfNeeded):
      (WebCore::Document::updateLayoutIgnorePendingStylesheets):
      (WebCore::Document::attach):
      (WebCore::Document::styleResolverChanged):
      (WebCore::Document::webkitWillEnterFullScreenForElement):
      * dom/Document.h:
      * dom/Element.cpp:
      (WebCore::shouldIgnoreAttributeCase):
      (WebCore::Element::updatePseudoElement):
      (WebCore::Element::resetComputedStyle):
      (WebCore::Element::willRecalcStyle):
      (WebCore::Element::didRecalcStyle):
      * dom/Element.h:
              
          - remove Element::recalcStyle
          - make a few private functions needed by StyleRecalculation public
      
      * dom/ElementShadow.cpp:
      (WebCore::ElementShadow::recalcStyle):
      * dom/ElementShadow.h:
      * dom/Node.cpp:
      * dom/Node.h:
      
          - remove Node::StyleChange
          - remove Node::diff
      
      * dom/PseudoElement.cpp:
      (WebCore::PseudoElement::didRecalcStyle):
      * dom/PseudoElement.h:
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::recalcStyle):
      (WebCore::ShadowRoot::setResetStyleInheritance):
      * dom/ShadowRoot.h:
      * dom/Text.cpp:
      (WebCore::Text::recalcTextStyle):
      * dom/Text.h:
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::didRecalcStyle):
      * html/HTMLFormControlElement.h:
      * html/HTMLFrameSetElement.cpp:
      (WebCore::HTMLFrameSetElement::willRecalcStyle):
      * html/HTMLFrameSetElement.h:
      * html/HTMLIFrameElement.cpp:
      (WebCore::HTMLIFrameElement::didRecalcStyle):
      * html/HTMLIFrameElement.h:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::didRecalcStyle):
      * html/HTMLMediaElement.h:
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::didRecalcStyle):
      * html/HTMLOptionElement.h:
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::HTMLPlugInImageElement::willRecalcStyle):
      (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
      (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
      * html/HTMLPlugInImageElement.h:
      * inspector/InspectorOverlay.cpp:
      (WebCore::InspectorOverlay::update):
      * loader/DocumentWriter.cpp:
      (WebCore::DocumentWriter::reportDataReceived):
      * page/Frame.cpp:
      (WebCore::Frame::setPageAndTextZoomFactors):
      * page/Page.cpp:
      (WebCore::Page::setPageScaleFactor):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::updateFirstLetterStyle):
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::willRecalcStyle):
      * svg/SVGElement.h:
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::willRecalcStyle):
      * svg/SVGUseElement.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e6cf411a
  31. 06 Aug, 2013 1 commit
    • weinig@apple.com's avatar
      .: Remove support for HTML5 MicroData · b49e18e4
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119480
      
      Reviewed by Anders Carlsson.
      
      * Source/autotools/SetupWebKitFeatures.m4:
      * Source/cmake/OptionsBlackBerry.cmake:
      * Source/cmake/OptionsEfl.cmake:
      * Source/cmake/OptionsGTK.cmake:
      * Source/cmake/WebKitFeatures.cmake:
      * Source/cmakeconfig.h.cmake:
      
      Source/JavaScriptCore: Remove support for HTML5 MicroData
      https://bugs.webkit.org/show_bug.cgi?id=119480
      
      Reviewed by Anders Carlsson.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebCore: Remove support for HTML5 Microdata
      https://bugs.webkit.org/show_bug.cgi?id=119480
      
      Reviewed by Anders Carlsson.
      
      * CMakeLists.txt:
      * Configurations/FeatureDefines.xcconfig:
      * DerivedSources.cpp:
      * DerivedSources.make:
      * DerivedSources.pri:
      * GNUmakefile.list.am:
      * Target.pri:
      * UseJSC.cmake:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/gobject/GNUmakefile.am:
      * bindings/js/JSBindingsAllInOne.cpp:
      * bindings/js/JSHTMLCollectionCustom.cpp:
      (WebCore::JSHTMLCollection::nameGetter):
      * bindings/js/JSHTMLElementCustom.cpp:
      * bindings/js/JSMicroDataItemValueCustom.cpp: Removed.
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      * dom/Document.cpp:
      * dom/Document.h:
      * dom/Document.idl:
      * dom/Element.cpp:
      (WebCore::Element::ensureCachedHTMLCollection):
      * dom/LiveNodeList.cpp:
      (WebCore::LiveNodeListBase::rootNode):
      (WebCore::LiveNodeListBase::invalidateCache):
      (WebCore::LiveNodeList::namedItem):
      * dom/LiveNodeList.h:
      (WebCore::LiveNodeListBase::shouldInvalidateTypeOnAttributeChange):
      * dom/MicroDataItemList.cpp: Removed.
      * dom/MicroDataItemList.h: Removed.
      * dom/Node.cpp:
      * dom/Node.h:
      * dom/NodeRareData.cpp:
      * dom/NodeRareData.h:
      * dom/PropertyNodeList.cpp: Removed.
      * dom/PropertyNodeList.h: Removed.
      * dom/PropertyNodeList.idl: Removed.
      * html/CollectionType.h:
      * html/HTMLAnchorElement.cpp:
      * html/HTMLAnchorElement.h:
      * html/HTMLAreaElement.cpp:
      * html/HTMLAreaElement.h:
      * html/HTMLCollection.cpp:
      (WebCore::shouldOnlyIncludeDirectChildren):
      (WebCore::rootTypeFromCollectionType):
      (WebCore::invalidationTypeExcludingIdAndNameAttributes):
      (WebCore::isMatchingElement):
      (WebCore::LiveNodeListBase::item):
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::parseAttribute):
      (WebCore::HTMLElement::isURLAttribute):
      * html/HTMLElement.h:
      * html/HTMLElement.idl:
      * html/HTMLEmbedElement.cpp:
      * html/HTMLEmbedElement.h:
      * html/HTMLIFrameElement.cpp:
      * html/HTMLIFrameElement.h:
      * html/HTMLImageElement.cpp:
      * html/HTMLImageElement.h:
      * html/HTMLLinkElement.cpp:
      * html/HTMLLinkElement.h:
      * html/HTMLMediaElement.cpp:
      * html/HTMLMediaElement.h:
      * html/HTMLMetaElement.cpp:
      * html/HTMLMetaElement.h:
      * html/HTMLObjectElement.cpp:
      * html/HTMLObjectElement.h:
      * html/HTMLPropertiesCollection.cpp: Removed.
      * html/HTMLPropertiesCollection.h: Removed.
      * html/HTMLPropertiesCollection.idl: Removed.
      * html/HTMLSourceElement.cpp:
      * html/HTMLSourceElement.h:
      * html/HTMLTrackElement.cpp:
      * html/HTMLTrackElement.h:
      * html/MicroDataAttributeTokenList.cpp: Removed.
      * html/MicroDataAttributeTokenList.h: Removed.
      * html/MicroDataItemValue.cpp: Removed.
      * html/MicroDataItemValue.h: Removed.
      * html/MicroDataItemValue.idl: Removed.
      
      Source/WebKit/blackberry: Remove support for HTML5 MicroData
      https://bugs.webkit.org/show_bug.cgi?id=119480
      
      Reviewed by Anders Carlsson.
      
      * WebCoreSupport/AboutDataEnableFeatures.in:
      
      Source/WebKit/mac: Remove support for HTML5 MicroData
      https://bugs.webkit.org/show_bug.cgi?id=119480
      
      Reviewed by Anders Carlsson.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebKit2: Remove support for HTML5 MicroData
      https://bugs.webkit.org/show_bug.cgi?id=119480
      
      Reviewed by Anders Carlsson.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WTF: Remove support for HTML5 MicroData
      https://bugs.webkit.org/show_bug.cgi?id=119480
      
      Reviewed by Anders Carlsson.
      
      * wtf/FeatureDefines.h:
      
      Tools: Remove support for HTML5 MicroData
      https://bugs.webkit.org/show_bug.cgi?id=119480
      
      Reviewed by Anders Carlsson.
      
      * Scripts/webkitperl/FeatureList.pm:
      * qmake/mkspecs/features/features.pri:
      
      LayoutTests: Remove support for HTML5 MicroData
      https://bugs.webkit.org/show_bug.cgi?id=119480
      
      Reviewed by Anders Carlsson.
      
      * fast/dom/MicroData: Removed.
      * fast/dom/MicroData/001-expected.txt: Removed.
      * fast/dom/MicroData/001.html: Removed.
      * fast/dom/MicroData/002-expected.txt: Removed.
      * fast/dom/MicroData/002.html: Removed.
      * fast/dom/MicroData/003-expected.txt: Removed.
      * fast/dom/MicroData/003.html: Removed.
      * fast/dom/MicroData/004-expected.txt: Removed.
      * fast/dom/MicroData/004.html: Removed.
      * fast/dom/MicroData/005-expected.txt: Removed.
      * fast/dom/MicroData/005.html: Removed.
      * fast/dom/MicroData/006-expected.txt: Removed.
      * fast/dom/MicroData/006.html: Removed.
      * fast/dom/MicroData/007-expected.txt: Removed.
      * fast/dom/MicroData/007.html: Removed.
      * fast/dom/MicroData/008-expected.txt: Removed.
      * fast/dom/MicroData/008.html: Removed.
      * fast/dom/MicroData/009-expected.txt: Removed.
      * fast/dom/MicroData/009.html: Removed.
      * fast/dom/MicroData/add-remove-property-to-item-which-is-not-attached-to-domtree-expected.txt: Removed.
      * fast/dom/MicroData/add-remove-property-to-item-which-is-not-attached-to-domtree.html: Removed.
      * fast/dom/MicroData/domsettabletokenlist-attributes-add-token-expected.txt: Removed.
      * fast/dom/MicroData/domsettabletokenlist-attributes-add-token.html: Removed.
      * fast/dom/MicroData/domsettabletokenlist-attributes-out-of-range-index-expected.txt: Removed.
      * fast/dom/MicroData/domsettabletokenlist-attributes-out-of-range-index.html: Removed.
      * fast/dom/MicroData/element-with-empty-itemprop-expected.txt: Removed.
      * fast/dom/MicroData/element-with-empty-itemprop.html: Removed.
      * fast/dom/MicroData/getitems-empty-string-as-arg-expected.txt: Removed.
      * fast/dom/MicroData/getitems-empty-string-as-arg.html: Removed.
      * fast/dom/MicroData/getitems-multiple-itemtypes-expected.txt: Removed.
      * fast/dom/MicroData/getitems-multiple-itemtypes.html: Removed.
      * fast/dom/MicroData/item-not-attached-to-domtree-expected.txt: Removed.
      * fast/dom/MicroData/item-not-attached-to-domtree.html: Removed.
      * fast/dom/MicroData/item-with-itemprop-attr-expected.txt: Removed.
      * fast/dom/MicroData/item-with-itemprop-attr.html: Removed.
      * fast/dom/MicroData/item-with-itemref-pointing-to-itself-expected.txt: Removed.
      * fast/dom/MicroData/item-with-itemref-pointing-to-itself.html: Removed.
      * fast/dom/MicroData/itemid-attribute-test-001-expected.txt: Removed.
      * fast/dom/MicroData/itemid-attribute-test-001.html: Removed.
      * fast/dom/MicroData/itemid-attribute-test-expected.txt: Removed.
      * fast/dom/MicroData/itemid-attribute-test.html: Removed.
      * fast/dom/MicroData/itemid-must-see-resolved-url-expected.txt: Removed.
      * fast/dom/MicroData/itemid-must-see-resolved-url.html: Removed.
      * fast/dom/MicroData/itemprop-add-remove-tokens-expected.txt: Removed.
      * fast/dom/MicroData/itemprop-add-remove-tokens.html: Removed.
      * fast/dom/MicroData/itemprop-for-an-element-must-be-correct-expected.txt: Removed.
      * fast/dom/MicroData/itemprop-for-an-element-must-be-correct.html: Removed.
      * fast/dom/MicroData/itemprop-must-be-read-only-expected.txt: Removed.
      * fast/dom/MicroData/itemprop-must-be-read-only.html: Removed.
      * fast/dom/MicroData/itemprop-names-override-builtin-properties-expected.txt: Removed.
      * fast/dom/MicroData/itemprop-names-override-builtin-properties.html: Removed.
      * fast/dom/MicroData/itemprop-reflected-by-itemProp-property-expected.txt: Removed.
      * fast/dom/MicroData/itemprop-reflected-by-itemProp-property.html: Removed.
      * fast/dom/MicroData/itemref-add-remove-tokens-expected.txt: Removed.
      * fast/dom/MicroData/itemref-add-remove-tokens.html: Removed.
      * fast/dom/MicroData/itemref-attribute-reflected-by-itemRef-property-expected.txt: Removed.
      * fast/dom/MicroData/itemref-attribute-reflected-by-itemRef-property.html: Removed.
      * fast/dom/MicroData/itemref-for-an-element-must-be-correct-expected.txt: Removed.
      * fast/dom/MicroData/itemref-for-an-element-must-be-correct.html: Removed.
      * fast/dom/MicroData/itemref-must-be-read-only-expected.txt: Removed.
      * fast/dom/MicroData/itemref-must-be-read-only.html: Removed.
      * fast/dom/MicroData/itemref-pointing-to-root-node-expected.txt: Removed.
      * fast/dom/MicroData/itemref-pointing-to-root-node.html: Removed.
      * fast/dom/MicroData/itemref-refers-first-element-with-given-id-expected.txt: Removed.
      * fast/dom/MicroData/itemref-refers-first-element-with-given-id.html: Removed.
      * fast/dom/MicroData/itemscope-attribute-test-expected.txt: Removed.
      * fast/dom/MicroData/itemscope-attribute-test.html: Removed.
      * fast/dom/MicroData/itemscope-must-be-read-write-expected.txt: Removed.
      * fast/dom/MicroData/itemscope-must-be-read-write.html: Removed.
      * fast/dom/MicroData/itemtype-add-remove-tokens-expected.txt: Removed.
      * fast/dom/MicroData/itemtype-add-remove-tokens.html: Removed.
      * fast/dom/MicroData/itemtype-attribute-test-expected.txt: Removed.
      * fast/dom/MicroData/itemtype-attribute-test.html: Removed.
      * fast/dom/MicroData/itemvalue-reflects-data-attr-on-object-element-expected.txt: Removed.
      * fast/dom/MicroData/itemvalue-reflects-data-attr-on-object-element.html: Removed.
      * fast/dom/MicroData/itemvalue-reflects-href-attr-expected.txt: Removed.
      * fast/dom/MicroData/itemvalue-reflects-href-attr.html: Removed.
      * fast/dom/MicroData/itemvalue-reflects-src-attribute-on-img-element-expected.txt: Removed.
      * fast/dom/MicroData/itemvalue-reflects-src-attribute-on-img-element.html: Removed.
      * fast/dom/MicroData/itemvalue-reflects-the-content-attr-on-meta-element-expected.txt: Removed.
      * fast/dom/MicroData/itemvalue-reflects-the-content-attr-on-meta-element.html: Removed.
      * fast/dom/MicroData/itemvalue-reflects-the-src-attr-expected.txt: Removed.
      * fast/dom/MicroData/itemvalue-reflects-the-src-attr.html: Removed.
      * fast/dom/MicroData/itemvalue-returns-element-itself-expected.txt: Removed.
      * fast/dom/MicroData/itemvalue-returns-element-itself.html: Removed.
      * fast/dom/MicroData/itemvalue-returns-null-expected.txt: Removed.
      * fast/dom/MicroData/itemvalue-returns-null.html: Removed.
      * fast/dom/MicroData/itemvalue-throws-excpetion-onsetting-001-expected.txt: Removed.
      * fast/dom/MicroData/itemvalue-throws-excpetion-onsetting-001.html: Removed.
      * fast/dom/MicroData/itemvalue-throws-excpetion-onsetting-002-expected.txt: Removed.
      * fast/dom/MicroData/itemvalue-throws-excpetion-onsetting-002.html: Removed.
      * fast/dom/MicroData/microdata-domtokenlist-attribute-add-remove-tokens-expected.txt: Removed.
      * fast/dom/MicroData/microdata-domtokenlist-attribute-add-remove-tokens.html: Removed.
      * fast/dom/MicroData/nameditem-must-be-case-sensitive-expected.txt: Removed.
      * fast/dom/MicroData/nameditem-must-be-case-sensitive.html: Removed.
      * fast/dom/MicroData/nameditem-must-return-correct-item-properties-expected.txt: Removed.
      * fast/dom/MicroData/nameditem-must-return-correct-item-properties.html: Removed.
      * fast/dom/MicroData/nameditem-returns-propertynodelist-expected.txt: Removed.
      * fast/dom/MicroData/nameditem-returns-propertynodelist.html: Removed.
      * fast/dom/MicroData/names-item-out-of-range-index-expected.txt: Removed.
      * fast/dom/MicroData/names-item-out-of-range-index.html: Removed.
      * fast/dom/MicroData/names-property-must-be-correct-expected.txt: Removed.
      * fast/dom/MicroData/names-property-must-be-correct.html: Removed.
      * fast/dom/MicroData/names-property-test-expected.txt: Removed.
      * fast/dom/MicroData/names-property-test.html: Removed.
      * fast/dom/MicroData/properties-collection-add-remove-itemref-expected.txt: Removed.
      * fast/dom/MicroData/properties-collection-add-remove-itemref.html: Removed.
      * fast/dom/MicroData/properties-collection-add-remove-property-expected.txt: Removed.
      * fast/dom/MicroData/properties-collection-add-remove-property.html: Removed.
      * fast/dom/MicroData/properties-collection-behavior-add-remove-itemscope-attr-expected.txt: Removed.
      * fast/dom/MicroData/properties-collection-behavior-add-remove-itemscope-attr.html: Removed.
      * fast/dom/MicroData/properties-collection-must-be-correct-expected.txt: Removed.
      * fast/dom/MicroData/properties-collection-must-be-correct.html: Removed.
      * fast/dom/MicroData/properties-collection-must-ignore-properties-of-nested-items-expected.txt: Removed.
      * fast/dom/MicroData/properties-collection-must-ignore-properties-of-nested-items.html: Removed.
      * fast/dom/MicroData/properties-collection-must-see-the-properties-added-in-itemref-expected.txt: Removed.
      * fast/dom/MicroData/properties-collection-must-see-the-properties-added-in-itemref.html: Removed.
      * fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name-expected.txt: Removed.
      * fast/dom/MicroData/properties-collection-namedgetter-with-invalid-name.html: Removed.
      * fast/dom/MicroData/properties-collection-nameditem-test-expected.txt: Removed.
      * fast/dom/MicroData/properties-collection-nameditem-test.html: Removed.
      * fast/dom/MicroData/properties-collection-test-expected.txt: Removed.
      * fast/dom/MicroData/properties-collection-test.html: Removed.
      * fast/dom/MicroData/propertiescollection-crash-expected.txt: Removed.
      * fast/dom/MicroData/propertiescollection-crash.html: Removed.
      * fast/dom/MicroData/propertiescollection-on-changing-id-attr-expected.txt: Removed.
      * fast/dom/MicroData/propertiescollection-on-changing-id-attr.html: Removed.
      * fast/dom/MicroData/propertynodelist-add-remove-itemprop-tokens-expected.txt: Removed.
      * fast/dom/MicroData/propertynodelist-add-remove-itemprop-tokens.html: Removed.
      * fast/dom/MicroData/propertynodelist-add-remove-itemref-tokens-expected.txt: Removed.
      * fast/dom/MicroData/propertynodelist-add-remove-itemref-tokens.html: Removed.
      * fast/dom/MicroData/propertynodelist-crash-expected.txt: Removed.
      * fast/dom/MicroData/propertynodelist-crash.html: Removed.
      * fast/dom/MicroData/propertynodelist-getvalues-array-values-obtained-from-itemvalue-of-each-element-expected.txt: Removed.
      * fast/dom/MicroData/propertynodelist-getvalues-array-values-obtained-from-itemvalue-of-each-element.html: Removed.
      * fast/dom/MicroData/propertynodelist-getvalues-test-expected.txt: Removed.
      * fast/dom/MicroData/propertynodelist-getvalues-test.html: Removed.
      * fast/dom/MicroData/propertynodelist-test-add-remove-element-expected.txt: Removed.
      * fast/dom/MicroData/propertynodelist-test-add-remove-element.html: Removed.
      * fast/dom/MicroData/resources: Removed.
      * fast/dom/MicroData/resources/microdata-common.js: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b49e18e4
  32. 02 Aug, 2013 1 commit
    • ch.dumez@sisa.samsung.com's avatar
      compareDocumentPosition() should report PRECEDING or FOLLOWING information... · 072d9592
      ch.dumez@sisa.samsung.com authored
      compareDocumentPosition() should report PRECEDING or FOLLOWING information even if nodes are disconnected
      https://bugs.webkit.org/show_bug.cgi?id=119316
      
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      As per the latest specification, compareDocumentPosition() should report PRECEDING or FOLLOWING
      information even if nodes are disconnected:
      - http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
      
      This behavior is consistent with both IE10, Firefox 22 and since recently Blink.
      
      No new tests, covered by existing tests.
      
      * dom/Node.cpp:
      (WebCore::compareDetachedElementsPosition):
      (WebCore::Node::compareDocumentPosition):
      
      LayoutTests:
      
      Update fast/dom/compare-document-position-disconnected-nodes.html to check that compareDocumentPosition()
      now returns one of the following values for disconnected nodes:
      - DOCUMENT_POSITION_DISCONNECTED | DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC | DOCUMENT_POSITION_PRECEDING
      - DOCUMENT_POSITION_DISCONNECTED | DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC | DOCUMENT_POSITION_FOLLOWING
      
      Several dom/xhtml/level3 are skipped and marked as WonfFix because they are outdated and no longer match
      the DOM4 specification. They expect compareDocumentPosition() not to return PRECEDING / FOLLOWING
      information for disconnected nodes.
      
      * TestExpectations:
      * dom/xhtml/level3/core/nodecomparedocumentposition38-expected.txt:
      * fast/dom/compare-document-position-disconnected-nodes-expected.txt:
      * fast/dom/compare-document-position-disconnected-nodes.html:
      * fast/dom/shadow/compare-document-position-expected.txt:
      * fast/dom/shadow/compare-document-position.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      072d9592