1. 05 Apr, 2013 2 commits
    • kangil.han@samsung.com's avatar
      Prefer prefix ++/-- operators for non-primitive types · d97b4ea1
      kangil.han@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114033
      
      Reviewed by Alexey Proskuryakov.
      
      Post ++/-- creates a copy of current value and it is not necessary, so use prefix instead.
      
      * bindings/js/Dictionary.cpp:
      (WebCore::Dictionary::getOwnPropertiesAsStringHashMap):
      (WebCore::Dictionary::getOwnPropertyNames):
      * bindings/js/ScriptCallStackFactory.cpp:
      (WebCore::createScriptCallStack):
      * dom/ContainerNode.cpp:
      (WebCore::willRemoveChildren):
      * dom/Range.cpp:
      (WebCore::Range::processAncestorsAndTheirSiblings):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::detachChildren):
      * platform/graphics/gpu/LoopBlinnPathProcessor.cpp:
      (WebCore):
      (WebCore::LoopBlinnPathProcessor::subdivideCurvesSlow):
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::paintDocumentMarkers):
      * xml/XPathFunctions.cpp:
      (WebCore::XPath::Function::setArguments):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d97b4ea1
    • ggaren@apple.com's avatar
      Made USE(JSC) unconditional · 95708e2b
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114058
      
      Reviewed by Anders Carlsson.
      
      ../JavaScriptCore: 
      
      * config.h:
      
      ../ThirdParty: 
      
      * gtest/include/gtest/internal/gtest-port.h:
      
      ../WebCore: 
      
      * Modules/webdatabase/Database.cpp:
      * bindings/ScriptControllerBase.cpp:
      (WebCore::ScriptController::executeIfJavaScriptURL):
      * bindings/js/JavaScriptCallFrame.cpp:
      * bindings/js/JavaScriptCallFrame.h:
      * bindings/scripts/InFilesCompiler.pm:
      (generateHeadersHeader):
      * css/MediaQueryListListener.cpp:
      (WebCore::MediaQueryListListener::queryChanged):
      * dom/ContainerNode.cpp:
      (WebCore::dispatchChildRemovalEvents):
      * dom/EventListener.h:
      (EventListener):
      (WebCore::EventListener::visitJSFunction):
      * dom/EventTarget.h:
      (EventTarget):
      (WebCore):
      (WebCore::EventTarget::visitJSEventListeners):
      * dom/Node.cpp:
      * dom/Node.h:
      * dom/ScriptExecutionContext.cpp:
      (WebCore):
      (WebCore::ScriptExecutionContext::globalData):
      * dom/ScriptExecutionContext.h:
      (ScriptExecutionContext):
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::createImageBuffer):
      * html/HTMLImageLoader.cpp:
      (WebCore::HTMLImageLoader::notifyFinished):
      * inspector/InjectedScriptHost.h:
      (InjectedScriptHost):
      (WebCore::InjectedScriptHost::evaluateReturnsEvalFunction):
      * inspector/InspectorInstrumentation.cpp:
      (WebCore):
      (WebCore::InspectorInstrumentation::didCommitLoadImpl):
      * page/Frame.cpp:
      * page/Settings.cpp:
      (WebCore):
      (WebCore::Settings::shouldRespectPriorityInCSSAttributeSetters):
      * page/Settings.h:
      (Settings):
      * plugins/PluginView.cpp:
      (WebCore::PluginView::start):
      (WebCore::PluginView::stop):
      (WebCore::PluginView::performRequest):
      (WebCore::PluginView::npObject):
      (WebCore):
      (WebCore::PluginView::bindingInstance):
      (WebCore::PluginView::privateBrowsingStateChanged):
      * plugins/PluginView.h:
      (PluginView):
      * plugins/PluginViewBase.h:
      (PluginViewBase):
      (WebCore::PluginViewBase::scriptObject):
      * plugins/PluginViewNone.cpp:
      (WebCore):
      (WebCore::PluginView::bindingInstance):
      * plugins/qt/PluginViewQt.cpp:
      (WebCore::PluginView::dispatchNPEvent):
      (WebCore::PluginView::setNPWindowIfNeeded):
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::dropProtection):
      
      ../WebKit/efl: 
      
      * ewk/ewk_frame.cpp:
      (ewk_frame_script_execute):
      
      ../WebKit/qt: 
      
      * Api/qwebscriptworld.cpp:
      (QWebScriptWorld::QWebScriptWorld):
      
      ../WebKit2: 
      
      * Shared/linux/WebMemorySamplerLinux.cpp:
      (WebKit::WebMemorySampler::sampleWebKit):
      * config.h:
      
      ../WTF: 
      
      * wtf/ThreadRestrictionVerifier.h:
      (WTF):
      * wtf/WTFThreadData.cpp:
      (WTF::WTFThreadData::WTFThreadData):
      (WTF::WTFThreadData::~WTFThreadData):
      * wtf/WTFThreadData.h:
      (WTFThreadData):
      * wtf/text/StringImpl.cpp:
      (WTF::StringImpl::~StringImpl):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      95708e2b
  2. 26 Mar, 2013 1 commit
    • morrita@google.com's avatar
      Listening touch events on ShadowRoot can crash. · 71a8397c
      morrita@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113035
      
      Reviewed by Kentaro Hara.
      
      Source/WebCore:
      
      TreeScope destructor clears a document reference on ShadowRoot but
      destructors of ContainerNode and Node assumed it being available
      and tried to access it for some cleanup purposes.
      
      This change extracts such cleanup to Node::willBeDeletedFrom() and
      calls it from ShadowRoot dtor before the document reference gets cleared.
      
      Test: fast/dom/shadow/shadow-root-touch-listener-crash.html
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::~ContainerNode): Adopted willBeDeletedFrom()
      * dom/Node.cpp:
      (WebCore::Node::~Node): Adopted willBeDeletedFrom()
      (WebCore::Node::willBeDeletedFrom): Extracted from Node and ContainerNode
      (WebCore):
      * dom/Node.h:
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::~ShadowRoot): Adopted willBeDeletedFrom()
      
      LayoutTests:
      
      * fast/dom/shadow/shadow-root-touch-listener-crash-expected.txt: Added.
      * fast/dom/shadow/shadow-root-touch-listener-crash.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      71a8397c
  3. 24 Mar, 2013 1 commit
    • cfleizach@apple.com's avatar
      AXObjectCache gets recreated during document tear-down. · fd65313a
      cfleizach@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112525
      
      Reviewed by Simon Fraser.
      
      In many cases, a document's AXObjectCache was being created after the
      document had detached, which is wasteful and could potentially lead to
      crashes because the AXObjectCache has a timer and relies on its document
      to exist.
      
      This patch provides a way to get the existing AX object cache, instead of
      always creating a new one.
      It moves the accessibilityEnabled() checks into the axObjectCache retrieval
      for easier readability.
      It adds a number of ASSERTs to vieryf that only the correct (top) document is used
      for cache manipulation.
      
      * accessibility/AXObjectCache.cpp:
      (WebCore::AXObjectCache::stopCachingComputedObjectAttributes):
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::~ContainerNode):
      * dom/Document.cpp:
      (WebCore::Document::~Document):
      (WebCore::Document::clearAXObjectCache):
      (WebCore::Document::existingAXObjectCache):
      (WebCore::Document::axObjectCache):
      (WebCore::Document::setFocusedNode):
      * dom/Document.h:
      (Document):
      * dom/Element.cpp:
      (WebCore::Element::attributeChanged):
      * dom/Node.cpp:
      (WebCore::Node::~Node):
      (WebCore::Node::isEditableToAccessibility):
      (WebCore::Node::attach):
      (WebCore::Node::rootEditableElement):
      (WebCore::Node::didMoveToNewDocument):
      * editing/AppendNodeCommand.cpp:
      (WebCore::sendAXTextChangedIgnoringLineBreaks):
      * editing/DeleteFromTextNodeCommand.cpp:
      (WebCore::DeleteFromTextNodeCommand::doApply):
      (WebCore::DeleteFromTextNodeCommand::doUnapply):
      * editing/Editor.cpp:
      (WebCore::Editor::respondToChangedContents):
      (WebCore::Editor::markAndReplaceFor):
      * editing/InsertIntoTextNodeCommand.cpp:
      (WebCore::InsertIntoTextNodeCommand::doApply):
      (WebCore::InsertIntoTextNodeCommand::doUnapply):
      * editing/InsertNodeBeforeCommand.cpp:
      (WebCore::InsertNodeBeforeCommand::doApply):
      (WebCore::InsertNodeBeforeCommand::doUnapply):
      * editing/atk/FrameSelectionAtk.cpp:
      (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
      * editing/chromium/FrameSelectionChromium.cpp:
      (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
      * editing/mac/FrameSelectionMac.mm:
      (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::setChecked):
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::optionElementChildrenChanged):
      (WebCore::HTMLSelectElement::setRecalcListItems):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::setInnerTextValue):
      * html/InputType.cpp:
      (WebCore::InputType::applyStep):
      * html/RangeInputType.cpp:
      (WebCore::RangeInputType::handleKeydownEvent):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::prepareForLoadStart):
      (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
      * page/FocusController.cpp:
      (WebCore::FocusController::setInitialFocus):
      * page/Frame.cpp:
      (WebCore::Frame::disconnectOwnerElement):
      * page/FrameView.cpp:
      (WebCore::FrameView::removeFromAXObjectCache):
      (WebCore::FrameView::layout):
      (WebCore::FrameView::scrollToAnchor):
      (WebCore::FrameView::axObjectCache):
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::setHasHorizontalScrollbar):
      (WebCore::ScrollView::setHasVerticalScrollbar):
      * platform/Scrollbar.cpp:
      (WebCore::Scrollbar::~Scrollbar):
      (WebCore):
      (WebCore::Scrollbar::existingAXObjectCache):
      * platform/Scrollbar.h:
      (Scrollbar):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::deleteLineBoxTree):
      (WebCore::RenderBlock::createRootInlineBox):
      (WebCore::RenderBlock::createAndAppendRootInlineBox):
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::selectionChanged):
      * rendering/RenderMenuList.cpp:
      (WebCore::RenderMenuList::addChild):
      (WebCore::RenderMenuList::didUpdateActiveOption):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::styleWillChange):
      (WebCore::RenderObject::willBeDestroyed):
      * rendering/RenderObjectChildList.cpp:
      (WebCore::RenderObjectChildList::removeChildNode):
      (WebCore::RenderObjectChildList::insertChildNode):
      * rendering/RenderText.cpp:
      (WebCore::RenderText::setText):
      * rendering/RenderWidget.cpp:
      (WebCore::RenderWidget::willBeDestroyed):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd65313a
  4. 13 Mar, 2013 1 commit
  5. 06 Mar, 2013 1 commit
    • eric@webkit.org's avatar
      Replace shouldLazyAttach bool with an enum for readability · 9c6f7088
      eric@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=111503
      
      Reviewed by Dimitri Glazkov.
      
      No behavioral change.
      
      * bindings/cpp/WebDOMNodeCustom.cpp:
      (WebDOMNode::insertBefore):
      (WebDOMNode::replaceChild):
      (WebDOMNode::appendChild):
      * bindings/js/JSNodeCustom.cpp:
      (WebCore::JSNode::insertBefore):
      (WebCore::JSNode::replaceChild):
      (WebCore::JSNode::appendChild):
      * bindings/v8/custom/V8NodeCustom.cpp:
      (WebCore):
      (WebCore::V8Node::insertBeforeMethodCustom):
      (WebCore::V8Node::replaceChildMethodCustom):
      (WebCore::V8Node::appendChildMethodCustom):
      * dom/ContainerNode.cpp:
      (WebCore):
      (WebCore::ContainerNode::insertBefore):
      (WebCore::ContainerNode::replaceChild):
      (WebCore::ContainerNode::appendChild):
      (WebCore::updateTreeAfterInsertion):
      * dom/ContainerNode.h:
      (ContainerNode):
      * dom/Node.cpp:
      (WebCore::Node::insertBefore):
      (WebCore::Node::replaceChild):
      (WebCore::Node::appendChild):
      * dom/Node.h:
      (Node):
      * editing/AppendNodeCommand.cpp:
      (WebCore::AppendNodeCommand::doApply):
      * editing/InsertNodeBeforeCommand.cpp:
      (WebCore::InsertNodeBeforeCommand::doApply):
      * html/shadow/MediaControlsApple.cpp:
      (WebCore::MediaControlsApple::createControls):
      * html/shadow/MediaControlsBlackBerry.cpp:
      (WebCore::MediaControlsBlackBerry::createControls):
      * html/shadow/MediaControlsChromium.cpp:
      (WebCore::MediaControlsChromium::initializeControls):
      * html/shadow/MediaControlsChromiumAndroid.cpp:
      (WebCore::MediaControlsChromiumAndroid::createControls):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c6f7088
  6. 05 Mar, 2013 1 commit
    • commit-queue@webkit.org's avatar
      ContainerNode::setActive should not sleep for 100ms on platforms that do not... · 3257b233
      commit-queue@webkit.org authored
      ContainerNode::setActive should not sleep for 100ms on platforms that do not implement synchronous repaint(true) semantics
      https://bugs.webkit.org/show_bug.cgi?id=87054
      
      Patch by James Robinson <jamesr@chromium.org> on 2013-03-05
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      Adds a new ChromeClient function to query if the platform supports the immediate parameter
      to the invalidation APIs and guards the synchronous repaint logic in ContainerNode::setActive()
      with it.
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::setActive):
      * page/ChromeClient.h:
      (WebCore::ChromeClient::supportsImmediateInvalidation):
      
      Source/WebKit/mac:
      
      The Mac WebKit1 port supports immediate invalidations.
      
      * WebCoreSupport/WebChromeClient.h:
      (WebChromeClient):
      * WebCoreSupport/WebChromeClient.mm:
      (WebChromeClient::supportsImmediateInvalidation):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3257b233
  7. 03 Mar, 2013 1 commit
    • abarth@webkit.org's avatar
      Unreviewed rollout of http://trac.webkit.org/r144530 · fa616dd3
      abarth@webkit.org authored
      As described in https://bugs.webkit.org/show_bug.cgi?id=111167 and
      https://bugs.webkit.org/show_bug.cgi?id=111035, this patch caused a
      large number of ASSERTs in chromium-win.
      
      Source/WebCore: 
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/mediastream/RTCPeerConnection.cpp:
      * Modules/notifications/Notification.cpp:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/ScriptControllerBase.cpp:
      * bindings/js/JSNodeCustom.cpp:
      * bindings/js/ScriptController.cpp:
      * bindings/js/ScriptSourceCode.h:
      (WebCore):
      * bindings/objc/DOM.mm:
      * bindings/v8/ScriptController.cpp:
      * bindings/v8/V8DOMWindowShell.cpp:
      * bindings/v8/custom/V8DOMWindowCustom.cpp:
      * css/CSSCrossfadeValue.h:
      (WebCore::CSSCrossfadeValue::CSSCrossfadeValue):
      (WebCore::CSSCrossfadeValue::CrossfadeSubimageObserverProxy::CrossfadeSubimageObserverProxy):
      * css/CSSFontFaceSource.h:
      * css/CSSFontSelector.cpp:
      * css/WebKitCSSSVGDocumentValue.cpp:
      * css/WebKitCSSSVGDocumentValue.h:
      (WebCore):
      * dom/Clipboard.cpp:
      (WebCore::Clipboard::Clipboard):
      * dom/ContainerNode.cpp:
      * dom/DOMImplementation.cpp:
      * dom/PendingScript.h:
      * dom/ScriptElement.cpp:
      * dom/ScriptElement.h:
      * history/CachedFrame.cpp:
      * html/DOMURL.cpp:
      * html/HTMLAnchorElement.cpp:
      * html/HTMLAppletElement.cpp:
      * html/HTMLElement.cpp:
      * html/HTMLEmbedElement.cpp:
      * html/HTMLFrameSetElement.cpp:
      * html/HTMLHtmlElement.cpp:
      * html/HTMLImageElement.cpp:
      * html/HTMLObjectElement.cpp:
      * html/HTMLPlugInElement.cpp:
      * html/ImageDocument.cpp:
      * html/ImageInputType.cpp:
      * html/MediaDocument.cpp:
      * html/PluginDocument.cpp:
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore):
      * html/parser/HTMLConstructionSite.cpp:
      * html/parser/HTMLParserOptions.cpp:
      * html/parser/HTMLScriptRunner.h:
      * html/parser/XSSAuditor.cpp:
      * html/parser/XSSAuditorDelegate.cpp:
      * inspector/InspectorDebuggerAgent.cpp:
      * inspector/InspectorFileSystemAgent.cpp:
      * inspector/InspectorFrontendHost.cpp:
      * inspector/InspectorInstrumentation.h:
      (WebCore):
      * inspector/InspectorPageAgent.cpp:
      * inspector/NetworkResourcesData.cpp:
      * inspector/NetworkResourcesData.h:
      (WebCore):
      * loader/CookieJar.cpp:
      * loader/CrossOriginAccessControl.cpp:
      * loader/CrossOriginAccessControl.h:
      (WebCore):
      * loader/CrossOriginPreflightResultCache.h:
      * loader/DocumentThreadableLoader.h:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::FrameLoader):
      * loader/FrameLoader.h:
      (WebCore):
      (WebCore::FrameLoader::policyChecker):
      * loader/ImageLoader.cpp:
      * loader/ImageLoader.h:
      * loader/LinkLoader.h:
      (WebCore):
      * loader/MainResourceLoader.cpp:
      * loader/MainResourceLoader.h:
      (WebCore):
      * loader/MixedContentChecker.cpp:
      * loader/PingLoader.cpp:
      * loader/PolicyChecker.h:
      (WebCore):
      * loader/ProgressTracker.cpp:
      * loader/SubframeLoader.cpp:
      * loader/SubresourceLoader.cpp:
      * loader/TextTrackLoader.cpp:
      * loader/TextTrackLoader.h:
      (WebCore):
      * loader/ThreadableLoader.h:
      * loader/appcache/ApplicationCacheGroup.cpp:
      * loader/appcache/ApplicationCacheGroup.h:
      (WebCore):
      * loader/appcache/ApplicationCacheHost.cpp:
      * loader/archive/cf/LegacyWebArchive.cpp:
      * loader/cache/CachedFont.cpp:
      * loader/cache/CachedFont.h:
      (CachedFontClient):
      (WebCore::CachedFontClient::~CachedFontClient):
      (WebCore::CachedFontClient::expectedType):
      (WebCore::CachedFontClient::resourceClientType):
      (WebCore::CachedFontClient::fontLoaded):
      (WebCore):
      * loader/cache/CachedFontClient.h: Removed.
      * loader/cache/CachedImage.cpp:
      * loader/cache/CachedRawResource.cpp:
      * loader/cache/CachedRawResource.h:
      (WebCore):
      (CachedRawResourceClient):
      (WebCore::CachedRawResourceClient::~CachedRawResourceClient):
      (WebCore::CachedRawResourceClient::expectedType):
      (WebCore::CachedRawResourceClient::resourceClientType):
      (WebCore::CachedRawResourceClient::dataSent):
      (WebCore::CachedRawResourceClient::responseReceived):
      (WebCore::CachedRawResourceClient::dataReceived):
      (WebCore::CachedRawResourceClient::redirectReceived):
      (WebCore::CachedRawResourceClient::dataDownloaded):
      * loader/cache/CachedRawResourceClient.h: Removed.
      * loader/cache/CachedResource.cpp:
      * loader/cache/CachedResourceHandle.cpp:
      (WebCore):
      * loader/cache/CachedResourceHandle.h:
      (WebCore):
      (WebCore::CachedResourceHandleBase::~CachedResourceHandleBase):
      (WebCore::CachedResourceHandleBase::CachedResourceHandleBase):
      * loader/cache/CachedSVGDocument.h:
      (CachedSVGDocumentClient):
      (WebCore::CachedSVGDocumentClient::~CachedSVGDocumentClient):
      (WebCore::CachedSVGDocumentClient::expectedType):
      (WebCore::CachedSVGDocumentClient::resourceClientType):
      (WebCore):
      * loader/cache/CachedSVGDocumentClient.h: Removed.
      * loader/cache/CachedSVGDocumentReference.cpp: Removed.
      * loader/cache/CachedSVGDocumentReference.h:
      (WebCore):
      (WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
      (WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
      * loader/cache/CachedStyleSheetClient.h:
      (WebCore):
      * loader/cache/MemoryCache.h:
      (WebCore):
      (MemoryCache):
      * loader/chromium/CachedRawResourceChromium.cpp:
      * loader/icon/IconController.cpp:
      * loader/icon/IconLoader.h:
      * loader/mac/ResourceLoaderMac.mm:
      * page/DOMWindowExtension.cpp:
      * page/Frame.cpp:
      (WebCore::Frame::Frame):
      (WebCore):
      (WebCore::Frame::reportMemoryUsage):
      * page/Frame.h:
      (WebCore):
      (Frame):
      (WebCore::Frame::init):
      (WebCore::Frame::loader):
      * page/PerformanceNavigation.cpp:
      * page/PerformanceTiming.cpp:
      * page/PointerLockController.cpp:
      * page/Settings.cpp:
      * page/animation/CSSPropertyAnimation.cpp:
      * platform/chromium/PasteboardChromium.cpp:
      * platform/efl/ErrorsEfl.cpp:
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
      * platform/graphics/filters/FilterOperation.cpp:
      (WebCore):
      * platform/graphics/filters/FilterOperation.h:
      (WebCore):
      (WebCore::FilterOperation::ReferenceFilterOperation::setCachedSVGDocumentReference):
      (WebCore::FilterOperation::ReferenceFilterOperation::ReferenceFilterOperation):
      * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
      * platform/gtk/ErrorsGtk.cpp:
      * platform/gtk/PasteboardGtk.cpp:
      * platform/gtk/PasteboardHelper.h:
      * platform/mac/ClipboardMac.h:
      * platform/mac/ClipboardMac.mm:
      * platform/mac/HTMLConverter.mm:
      * platform/mac/PasteboardMac.mm:
      * platform/network/AuthenticationChallengeBase.cpp:
      * platform/network/cf/CookieJarCFNet.cpp:
      * platform/network/cf/ResourceRequestCFNet.cpp:
      * platform/network/mac/CookieStorageMac.mm:
      * platform/qt/PasteboardQt.cpp:
      * plugins/DOMMimeType.cpp:
      * plugins/PluginRequest.h: Removed.
      * plugins/PluginStream.h:
      (PluginStreamClient):
      (WebCore::PluginStreamClient::~PluginStreamClient):
      (WebCore::PluginStreamClient::streamDidFinishLoading):
      (WebCore):
      * plugins/PluginStreamClient.h: Removed.
      * plugins/PluginView.cpp:
      * plugins/PluginView.h:
      (WebCore):
      (PluginRequest):
      (WebCore::PluginRequest::PluginRequest):
      (WebCore::PluginRequest::frameLoadRequest):
      (WebCore::PluginRequest::notifyData):
      (WebCore::PluginRequest::sendNotification):
      (WebCore::PluginRequest::shouldAllowPopups):
      * rendering/HitTestResult.cpp:
      * rendering/InlineFlowBox.cpp:
      * rendering/RenderBox.cpp:
      * rendering/RenderEmbeddedObject.cpp:
      * rendering/RenderImage.cpp:
      * rendering/RenderImageResource.cpp:
      (WebCore::RenderImageResource::RenderImageResource):
      (WebCore):
      * rendering/RenderImageResource.h:
      (WebCore::RenderImageResource::image):
      (WebCore::RenderImageResource::errorOccurred):
      (WebCore::RenderImageResource::usesImageContainerSize):
      (WebCore::RenderImageResource::imageHasRelativeWidth):
      (WebCore::RenderImageResource::imageHasRelativeHeight):
      (WebCore::RenderImageResource::imageSize):
      * rendering/RenderImageResourceStyleImage.cpp:
      * rendering/RenderLayer.cpp:
      * rendering/RenderLayerBacking.cpp:
      * rendering/RenderLayerFilterInfo.h:
      (WebCore):
      * rendering/RenderListItem.cpp:
      * rendering/RenderListMarker.cpp:
      * rendering/RenderSnapshottedPlugIn.cpp:
      * rendering/RenderTableCol.cpp:
      * rendering/RenderTableRow.cpp:
      * rendering/RenderTableSection.cpp:
      * rendering/style/StyleCachedShader.h:
      * rendering/style/StyleCustomFilterProgram.cpp: Removed.
      * rendering/style/StyleCustomFilterProgram.h:
      (WebCore):
      (WebCore::StyleCustomFilterProgram::vertexShaderString):
      (StyleCustomFilterProgram):
      (WebCore::StyleCustomFilterProgram::fragmentShaderString):
      (WebCore::StyleCustomFilterProgram::isLoaded):
      (WebCore::StyleCustomFilterProgram::willHaveClients):
      (WebCore::StyleCustomFilterProgram::didRemoveLastClient):
      (WebCore::StyleCustomFilterProgram::notifyFinished):
      * svg/SVGFEImageElement.h:
      * svg/SVGFontFaceUriElement.h:
      (SVGFontFaceUriElement):
      * svg/SVGImageLoader.cpp:
      * svg/SVGUseElement.cpp:
      * svg/SVGUseElement.h:
      * svg/graphics/SVGImageCache.cpp:
      * testing/MockPagePopupDriver.cpp:
      * xml/XSLStyleSheet.h:
      (WebCore):
      * xml/XSLTProcessorLibxslt.cpp:
      * xml/parser/XMLDocumentParser.cpp:
      * xml/parser/XMLDocumentParser.h:
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      
      Source/WebKit/chromium: 
      
      * src/ApplicationCacheHost.cpp:
      * src/AssociatedURLLoader.cpp:
      * src/EditorClientImpl.cpp:
      * src/SharedWorkerRepository.cpp:
      * src/WebDataSourceImpl.cpp:
      * src/WebFrameImpl.h:
      (WebCore):
      * src/WebNode.cpp:
      * src/WebSharedWorkerImpl.cpp:
      * tests/FrameLoaderClientImplTest.cpp:
      
      Source/WebKit/efl: 
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      * ewk/ewk_frame.cpp:
      
      Source/WebKit/gtk: 
      
      * webkit/webkitwebpolicydecision.cpp:
      
      Source/WebKit/mac: 
      
      * DOM/WebDOMOperations.mm:
      * Misc/WebNSPasteboardExtras.mm:
      * WebCoreSupport/WebFrameNetworkingContext.mm:
      * WebView/WebRenderLayer.mm:
      * WebView/WebRenderNode.mm:
      
      Source/WebKit/qt: 
      
      * WebCoreSupport/NotificationPresenterClientQt.cpp:
      * WebCoreSupport/QWebPageAdapter.cpp:
      
      Source/WebKit2: 
      
      * NetworkProcess/HostRecord.h:
      * NetworkProcess/NetworkResourceLoadScheduler.h:
      * NetworkProcess/NetworkResourceLoader.h:
      (WebCore):
      * Shared/WebRenderLayer.cpp:
      * Shared/WebRenderObject.cpp:
      * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
      * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
      * WebProcess/Plugins/PDF/PDFPlugin.mm:
      * WebProcess/Plugins/PluginView.cpp:
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
      * WebProcess/WebPage/mac/WebPageMac.mm:
      * WebProcess/WebProcess.cpp:
      * WebProcess/soup/WebProcessSoup.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fa616dd3
  8. 01 Mar, 2013 3 commits
    • ap@apple.com's avatar
      Reduce amount of rebuilding when touching networking headers · fc363ce1
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=111035
      
              Reviewed by Eric Seidel.
      
              This uses a number of common unsurprising techniques. One interesting observation
              is that including CachedResource related headers is very expensive. We can usually
              get away with their Client counterparts, and with CachedResourceHandle.
      
              * page/Frame.cpp:
              * page/Frame.h:
              Don't include FrameLoader, greatly reducing include graph for most non-loader files.
              This required making Frame::init() non-inline - I'm not sure why it ever was.
      
              * loader/FrameLoader.cpp:
              * loader/FrameLoader.h:
              Even though FrameLoader is logically on loading side of WebCore, it's included in
              too many places. Not including PolicyChecker.h and ResourceHandle.h was among the
              largest wins. As a future improvement, we should probably convert other members
              to OwnPtrs.
      
              * css/CSSCrossfadeValue.h: Initializing CachedResourceHandle with 0 requires a
              definition of a class it holds, but default construction does not.
      
              * loader/CrossOriginAccessControl.h: This file among others only needs ResourceHandleTypes.h,
              not ResourceHandle.h. This header is semi-recent, so not all include sites were updated.
      
              * loader/cache/CachedFont.h:
              * loader/cache/CachedFontClient.h: Added.
              * loader/cache/CachedRawResource.h:
              * loader/cache/CachedRawResourceClient.h: Added.
              * loader/cache/CachedSVGDocument.h:
              * loader/cache/CachedSVGDocumentClient.h: Added.
              These types were defining client types in the same headers, making it impossible
              to avoid including networking headers through CachedResource. Moved clients into
              separate files.
      
              * plugins/PluginStream.h:
              * plugins/PluginStreamClient.h: Added.
              Similar situation here.
      
              * loader/cache/CachedResourceHandle.cpp:
              * loader/cache/CachedResourceHandle.h:
              Moved functions that need to know about CachedResource to .cpp file. This is another
              huge win. Added a destructor, so that CachedResource woudn't be needed in all files
              that include CachedResourceHandle.
      
              * loader/cache/CachedSVGDocumentReference.cpp: Added.
              * loader/cache/CachedSVGDocumentReference.h:
              Moved constructor and virtual function implementations to a .cpp file - they need
              not inlining, and this lets us avoid including CachedSVGDocument.h in the header.
      
              * platform/graphics/filters/FilterOperation.cpp:
              * platform/graphics/filters/FilterOperation.h:
              Avoid including CachedSVGDocumentReference.h. This is not such a big win now that
              CachedSVGDocumentReference.h itself is smaller, but FilterOperation is so clearly
              rendering code that it seems best to cut any ties with resources and loading.
              Added a virtual destrutor in .cpp file, because inline destructors in polymorphic
              classes are generally harmful (due to code bloat).
      
              * plugins/PluginRequest.h: Added.
              * plugins/PluginView.h:
              Moved PluginRequest into a separate file, it was out of place in a view hierarchy
              class file.
      
              * rendering/RenderImageResource.cpp:
              * rendering/RenderImageResource.h:
              Moved definitions of virtual functions to a .cpp file. Thre is no win from having
              them inline, and now we don't need CachedImage.h in the header.
      
              * rendering/style/StyleCustomFilterProgram.cpp: Added.
              * rendering/style/StyleCustomFilterProgram.h:
              Ditto.
      
              * CMakeLists.txt:
              * GNUmakefile.list.am:
              * Modules/mediastream/RTCPeerConnection.cpp:
              * Modules/notifications/Notification.cpp:
              * Target.pri:
              * WebCore.exp.in:
              * WebCore.gypi:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.vcxproj/WebCore.vcxproj:
              * WebCore.vcxproj/WebCore.vcxproj.filters:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/ScriptControllerBase.cpp:
              * bindings/js/JSNodeCustom.cpp:
              * bindings/js/ScriptController.cpp:
              * bindings/js/ScriptSourceCode.h:
              * bindings/objc/DOM.mm:
              * bindings/v8/ScriptController.cpp:
              * bindings/v8/V8DOMWindowShell.cpp:
              * bindings/v8/custom/V8DOMWindowCustom.cpp:
              * css/CSSFontFaceSource.h:
              * css/CSSFontSelector.cpp:
              * css/WebKitCSSSVGDocumentValue.cpp:
              * css/WebKitCSSSVGDocumentValue.h:
              * dom/Clipboard.cpp:
              * dom/ContainerNode.cpp:
              * dom/DOMImplementation.cpp:
              * dom/PendingScript.h:
              * dom/ScriptElement.cpp:
              * dom/ScriptElement.h:
              * history/CachedFrame.cpp:
              * html/DOMURL.cpp:
              * html/HTMLAnchorElement.cpp:
              * html/HTMLAppletElement.cpp:
              * html/HTMLElement.cpp:
              * html/HTMLEmbedElement.cpp:
              * html/HTMLFrameSetElement.cpp:
              * html/HTMLHtmlElement.cpp:
              * html/HTMLImageElement.cpp:
              * html/HTMLObjectElement.cpp:
              * html/HTMLPlugInElement.cpp:
              * html/ImageDocument.cpp:
              * html/ImageInputType.cpp:
              * html/MediaDocument.cpp:
              * html/PluginDocument.cpp:
              * html/canvas/WebGLRenderingContext.cpp:
              * html/parser/HTMLConstructionSite.cpp:
              * html/parser/HTMLParserOptions.cpp:
              * html/parser/HTMLScriptRunner.h:
              * html/parser/XSSAuditor.cpp:
              * html/parser/XSSAuditorDelegate.cpp:
              * inspector/InspectorDebuggerAgent.cpp:
              * inspector/InspectorFileSystemAgent.cpp:
              * inspector/InspectorFrontendHost.cpp:
              * inspector/InspectorInstrumentation.h:
              * inspector/InspectorPageAgent.cpp:
              * inspector/NetworkResourcesData.cpp:
              * inspector/NetworkResourcesData.h:
              * loader/CookieJar.cpp:
              * loader/CrossOriginAccessControl.cpp:
              * loader/CrossOriginPreflightResultCache.h:
              * loader/DocumentThreadableLoader.h:
              * loader/ImageLoader.cpp:
              * loader/ImageLoader.h:
              * loader/LinkLoader.h:
              * loader/MainResourceLoader.cpp:
              * loader/MainResourceLoader.h:
              * loader/MixedContentChecker.cpp:
              * loader/PingLoader.cpp:
              * loader/PolicyChecker.h:
              * loader/ProgressTracker.cpp:
              * loader/SubframeLoader.cpp:
              * loader/SubresourceLoader.cpp:
              * loader/TextTrackLoader.cpp:
              * loader/TextTrackLoader.h:
              * loader/ThreadableLoader.h:
              * loader/appcache/ApplicationCacheGroup.cpp:
              * loader/appcache/ApplicationCacheGroup.h:
              * loader/appcache/ApplicationCacheHost.cpp:
              * loader/archive/cf/LegacyWebArchive.cpp:
              * loader/cache/CachedFont.cpp:
              * loader/cache/CachedImage.cpp:
              * loader/cache/CachedRawResource.cpp:
              * loader/cache/CachedResource.cpp:
              * loader/cache/CachedStyleSheetClient.h:
              * loader/cache/MemoryCache.cpp:
              * loader/cache/MemoryCache.h:
              * loader/chromium/CachedRawResourceChromium.cpp:
              * loader/icon/IconController.cpp:
              * loader/icon/IconLoader.h:
              * loader/mac/ResourceLoaderMac.mm:
              * page/DOMWindowExtension.cpp:
              * page/DragController.cpp:
              * page/PerformanceNavigation.cpp:
              * page/PerformanceTiming.cpp:
              * page/PointerLockController.cpp:
              * page/Settings.cpp:
              * page/animation/CSSPropertyAnimation.cpp:
              * platform/chromium/PasteboardChromium.cpp:
              * platform/efl/ErrorsEfl.cpp:
              * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
              * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
              * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
              * platform/gtk/ErrorsGtk.cpp:
              * platform/gtk/PasteboardGtk.cpp:
              * platform/gtk/PasteboardHelper.h:
              * platform/mac/ClipboardMac.h:
              * platform/mac/ClipboardMac.mm:
              * platform/mac/HTMLConverter.mm:
              * platform/mac/PasteboardMac.mm:
              * platform/network/AuthenticationChallengeBase.cpp:
              * platform/network/cf/CookieJarCFNet.cpp:
              * platform/network/cf/ResourceRequestCFNet.cpp:
              * platform/network/mac/CookieStorageMac.mm:
              * platform/qt/PasteboardQt.cpp:
              * plugins/DOMMimeType.cpp:
              * plugins/PluginView.cpp:
              * rendering/HitTestResult.cpp:
              * rendering/InlineFlowBox.cpp:
              * rendering/RenderBox.cpp:
              * rendering/RenderEmbeddedObject.cpp:
              * rendering/RenderImage.cpp:
              * rendering/RenderImageResourceStyleImage.cpp:
              * rendering/RenderLayer.cpp:
              * rendering/RenderLayerBacking.cpp:
              * rendering/RenderLayerFilterInfo.h:
              * rendering/RenderListItem.cpp:
              * rendering/RenderListMarker.cpp:
              * rendering/RenderSnapshottedPlugIn.cpp:
              * rendering/RenderTableCol.cpp:
              * rendering/RenderTableRow.cpp:
              * rendering/RenderTableSection.cpp:
              * rendering/style/StyleCachedShader.h:
              * svg/SVGFEImageElement.h:
              * svg/SVGFontFaceUriElement.h:
              * svg/SVGImageLoader.cpp:
              * svg/SVGUseElement.cpp:
              * svg/SVGUseElement.h:
              * svg/graphics/SVGImageCache.cpp:
              * testing/MockPagePopupDriver.cpp:
              * xml/XSLStyleSheet.h:
              * xml/XSLTProcessorLibxslt.cpp:
              * xml/parser/XMLDocumentParser.cpp:
              * xml/parser/XMLDocumentParser.h:
              * xml/parser/XMLDocumentParserLibxml2.cpp:
              Many self-evident changes - removing unnecessary header includes, adding smaller
              more local ones that are now necessary.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc363ce1
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r144422 and r144424. · 0b87a6c7
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/144422
      http://trac.webkit.org/changeset/144424
      https://bugs.webkit.org/show_bug.cgi?id=111167
      
      Caused over 20 tests to fail assertion on Chromium Win port as
      ASSERTION FAILED: m_platformRequestUpdated (Requested by
      toyoshim on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-01
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/mediastream/RTCPeerConnection.cpp:
      * Modules/notifications/Notification.cpp:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/ScriptControllerBase.cpp:
      * bindings/js/JSNodeCustom.cpp:
      * bindings/js/ScriptController.cpp:
      * bindings/js/ScriptSourceCode.h:
      * bindings/objc/DOM.mm:
      * bindings/v8/ScriptController.cpp:
      * bindings/v8/V8DOMWindowShell.cpp:
      * bindings/v8/custom/V8DOMWindowCustom.cpp:
      * css/CSSCrossfadeValue.h:
      (WebCore::CSSCrossfadeValue::CSSCrossfadeValue):
      (WebCore::CSSCrossfadeValue::CrossfadeSubimageObserverProxy::CrossfadeSubimageObserverProxy):
      * css/CSSFontFaceSource.h:
      * css/CSSFontSelector.cpp:
      * css/WebKitCSSSVGDocumentValue.cpp:
      * css/WebKitCSSSVGDocumentValue.h:
      (WebCore):
      * dom/Clipboard.cpp:
      (WebCore::Clipboard::Clipboard):
      * dom/ContainerNode.cpp:
      * dom/DOMImplementation.cpp:
      * dom/PendingScript.h:
      * dom/ScriptElement.cpp:
      * dom/ScriptElement.h:
      * history/CachedFrame.cpp:
      * html/DOMURL.cpp:
      * html/HTMLAnchorElement.cpp:
      * html/HTMLAppletElement.cpp:
      * html/HTMLElement.cpp:
      * html/HTMLEmbedElement.cpp:
      * html/HTMLFrameSetElement.cpp:
      * html/HTMLHtmlElement.cpp:
      * html/HTMLImageElement.cpp:
      * html/HTMLObjectElement.cpp:
      * html/HTMLPlugInElement.cpp:
      * html/ImageDocument.cpp:
      * html/ImageInputType.cpp:
      * html/MediaDocument.cpp:
      * html/PluginDocument.cpp:
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore):
      * html/parser/HTMLConstructionSite.cpp:
      * html/parser/HTMLParserOptions.cpp:
      * html/parser/HTMLScriptRunner.h:
      * html/parser/XSSAuditor.cpp:
      * html/parser/XSSAuditorDelegate.cpp:
      * inspector/InspectorDebuggerAgent.cpp:
      * inspector/InspectorFileSystemAgent.cpp:
      * inspector/InspectorFrontendHost.cpp:
      * inspector/InspectorInstrumentation.h:
      (WebCore):
      * inspector/InspectorPageAgent.cpp:
      * inspector/NetworkResourcesData.cpp:
      * inspector/NetworkResourcesData.h:
      (WebCore):
      * loader/CookieJar.cpp:
      * loader/CrossOriginAccessControl.cpp:
      * loader/CrossOriginAccessControl.h:
      (WebCore):
      * loader/CrossOriginPreflightResultCache.h:
      * loader/DocumentThreadableLoader.h:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::FrameLoader):
      * loader/FrameLoader.h:
      (WebCore):
      (WebCore::FrameLoader::policyChecker):
      * loader/ImageLoader.cpp:
      * loader/ImageLoader.h:
      * loader/LinkLoader.h:
      * loader/MainResourceLoader.cpp:
      * loader/MainResourceLoader.h:
      * loader/MixedContentChecker.cpp:
      * loader/PingLoader.cpp:
      * loader/PolicyChecker.h:
      (WebCore):
      * loader/ProgressTracker.cpp:
      * loader/SubframeLoader.cpp:
      * loader/SubresourceLoader.cpp:
      * loader/TextTrackLoader.cpp:
      * loader/TextTrackLoader.h:
      * loader/ThreadableLoader.h:
      * loader/appcache/ApplicationCacheGroup.cpp:
      * loader/appcache/ApplicationCacheGroup.h:
      (WebCore):
      * loader/appcache/ApplicationCacheHost.cpp:
      * loader/archive/cf/LegacyWebArchive.cpp:
      * loader/cache/CachedFont.cpp:
      * loader/cache/CachedFont.h:
      (CachedFontClient):
      (WebCore::CachedFontClient::~CachedFontClient):
      (WebCore::CachedFontClient::expectedType):
      (WebCore::CachedFontClient::resourceClientType):
      (WebCore::CachedFontClient::fontLoaded):
      (WebCore):
      * loader/cache/CachedFontClient.h: Removed.
      * loader/cache/CachedImage.cpp:
      * loader/cache/CachedRawResource.cpp:
      * loader/cache/CachedRawResource.h:
      (WebCore):
      (CachedRawResourceClient):
      (WebCore::CachedRawResourceClient::~CachedRawResourceClient):
      (WebCore::CachedRawResourceClient::expectedType):
      (WebCore::CachedRawResourceClient::resourceClientType):
      (WebCore::CachedRawResourceClient::dataSent):
      (WebCore::CachedRawResourceClient::responseReceived):
      (WebCore::CachedRawResourceClient::dataReceived):
      (WebCore::CachedRawResourceClient::redirectReceived):
      (WebCore::CachedRawResourceClient::dataDownloaded):
      * loader/cache/CachedRawResourceClient.h: Removed.
      * loader/cache/CachedResource.cpp:
      * loader/cache/CachedResourceHandle.cpp:
      * loader/cache/CachedResourceHandle.h:
      (WebCore::CachedResourceHandleBase::~CachedResourceHandleBase):
      (WebCore::CachedResourceHandleBase::CachedResourceHandleBase):
      * loader/cache/CachedSVGDocument.h:
      (CachedSVGDocumentClient):
      (WebCore::CachedSVGDocumentClient::~CachedSVGDocumentClient):
      (WebCore::CachedSVGDocumentClient::expectedType):
      (WebCore::CachedSVGDocumentClient::resourceClientType):
      (WebCore):
      * loader/cache/CachedSVGDocumentClient.h: Removed.
      * loader/cache/CachedSVGDocumentReference.cpp: Removed.
      * loader/cache/CachedSVGDocumentReference.h:
      (WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
      (WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
      * loader/cache/CachedStyleSheetClient.h:
      * loader/cache/MemoryCache.cpp:
      * loader/cache/MemoryCache.h:
      (WebCore):
      (MemoryCache):
      * loader/chromium/CachedRawResourceChromium.cpp:
      * loader/icon/IconController.cpp:
      * loader/icon/IconLoader.h:
      * loader/mac/ResourceLoaderMac.mm:
      * page/DOMWindowExtension.cpp:
      * page/DragController.cpp:
      * page/Frame.cpp:
      (WebCore::Frame::Frame):
      (WebCore::Frame::reportMemoryUsage):
      * page/Frame.h:
      (WebCore):
      (Frame):
      (WebCore::Frame::init):
      (WebCore::Frame::loader):
      * page/PerformanceNavigation.cpp:
      * page/PerformanceTiming.cpp:
      * page/PointerLockController.cpp:
      * page/Settings.cpp:
      * page/animation/CSSPropertyAnimation.cpp:
      * platform/chromium/PasteboardChromium.cpp:
      * platform/efl/ErrorsEfl.cpp:
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
      * platform/graphics/filters/FilterOperation.cpp:
      * platform/graphics/filters/FilterOperation.h:
      (WebCore::FilterOperation::ReferenceFilterOperation::setCachedSVGDocumentReference):
      (WebCore::FilterOperation::ReferenceFilterOperation::ReferenceFilterOperation):
      * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
      * platform/gtk/ErrorsGtk.cpp:
      * platform/gtk/PasteboardGtk.cpp:
      * platform/gtk/PasteboardHelper.h:
      * platform/mac/ClipboardMac.h:
      * platform/mac/ClipboardMac.mm:
      * platform/mac/HTMLConverter.mm:
      * platform/mac/PasteboardMac.mm:
      * platform/network/AuthenticationChallengeBase.cpp:
      * platform/network/cf/CookieJarCFNet.cpp:
      * platform/network/cf/ResourceRequestCFNet.cpp:
      * platform/network/mac/CookieStorageMac.mm:
      * platform/qt/PasteboardQt.cpp:
      * plugins/DOMMimeType.cpp:
      * plugins/PluginRequest.h: Removed.
      * plugins/PluginStream.h:
      (PluginStreamClient):
      (WebCore::PluginStreamClient::~PluginStreamClient):
      (WebCore::PluginStreamClient::streamDidFinishLoading):
      (WebCore):
      * plugins/PluginStreamClient.h: Removed.
      * plugins/PluginView.cpp:
      * plugins/PluginView.h:
      (WebCore):
      (PluginRequest):
      (WebCore::PluginRequest::PluginRequest):
      (WebCore::PluginRequest::frameLoadRequest):
      (WebCore::PluginRequest::notifyData):
      (WebCore::PluginRequest::sendNotification):
      (WebCore::PluginRequest::shouldAllowPopups):
      * rendering/HitTestResult.cpp:
      * rendering/InlineFlowBox.cpp:
      * rendering/RenderBox.cpp:
      * rendering/RenderEmbeddedObject.cpp:
      * rendering/RenderImage.cpp:
      * rendering/RenderImageResource.cpp:
      (WebCore::RenderImageResource::RenderImageResource):
      * rendering/RenderImageResource.h:
      (WebCore::RenderImageResource::image):
      (WebCore::RenderImageResource::errorOccurred):
      (WebCore::RenderImageResource::usesImageContainerSize):
      (WebCore::RenderImageResource::imageHasRelativeWidth):
      (WebCore::RenderImageResource::imageHasRelativeHeight):
      (WebCore::RenderImageResource::imageSize):
      * rendering/RenderImageResourceStyleImage.cpp:
      * rendering/RenderLayer.cpp:
      * rendering/RenderLayerBacking.cpp:
      * rendering/RenderLayerFilterInfo.h:
      * rendering/RenderListItem.cpp:
      * rendering/RenderListMarker.cpp:
      * rendering/RenderSnapshottedPlugIn.cpp:
      * rendering/RenderTableCol.cpp:
      * rendering/RenderTableRow.cpp:
      * rendering/RenderTableSection.cpp:
      * rendering/style/StyleCachedShader.h:
      * rendering/style/StyleCustomFilterProgram.cpp: Removed.
      * rendering/style/StyleCustomFilterProgram.h:
      (WebCore):
      (WebCore::StyleCustomFilterProgram::vertexShaderString):
      (StyleCustomFilterProgram):
      (WebCore::StyleCustomFilterProgram::fragmentShaderString):
      (WebCore::StyleCustomFilterProgram::isLoaded):
      (WebCore::StyleCustomFilterProgram::willHaveClients):
      (WebCore::StyleCustomFilterProgram::didRemoveLastClient):
      (WebCore::StyleCustomFilterProgram::notifyFinished):
      * svg/SVGFEImageElement.h:
      * svg/SVGFontFaceUriElement.h:
      (SVGFontFaceUriElement):
      * svg/SVGImageLoader.cpp:
      * svg/SVGUseElement.cpp:
      * svg/SVGUseElement.h:
      * svg/graphics/SVGImageCache.cpp:
      * testing/MockPagePopupDriver.cpp:
      * xml/XSLStyleSheet.h:
      * xml/XSLTProcessorLibxslt.cpp:
      * xml/parser/XMLDocumentParser.cpp:
      * xml/parser/XMLDocumentParser.h:
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      
      Source/WebKit/chromium:
      
      * src/ApplicationCacheHost.cpp:
      * src/AssociatedURLLoader.cpp:
      * src/EditorClientImpl.cpp:
      * src/SharedWorkerRepository.cpp:
      * src/WebDataSourceImpl.cpp:
      * src/WebFrameImpl.h:
      (WebCore):
      * src/WebNode.cpp:
      * src/WebSharedWorkerImpl.cpp:
      * tests/FrameLoaderClientImplTest.cpp:
      
      Source/WebKit/efl:
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      * ewk/ewk_frame.cpp:
      
      Source/WebKit/gtk:
      
      * webkit/webkitwebpolicydecision.cpp:
      
      Source/WebKit/mac:
      
      * DOM/WebDOMOperations.mm:
      * Misc/WebNSPasteboardExtras.mm:
      * WebCoreSupport/WebFrameNetworkingContext.mm:
      * WebView/WebRenderLayer.mm:
      * WebView/WebRenderNode.mm:
      
      Source/WebKit/qt:
      
      * WebCoreSupport/NotificationPresenterClientQt.cpp:
      * WebCoreSupport/QWebPageAdapter.cpp:
      
      Source/WebKit2:
      
      * NetworkProcess/HostRecord.h:
      * NetworkProcess/NetworkResourceLoadScheduler.h:
      * NetworkProcess/NetworkResourceLoader.h:
      (WebCore):
      * Shared/WebRenderLayer.cpp:
      * Shared/WebRenderObject.cpp:
      * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
      * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
      * WebProcess/Plugins/PDF/PDFPlugin.mm:
      * WebProcess/Plugins/PluginView.cpp:
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
      * WebProcess/WebPage/mac/WebPageMac.mm:
      * WebProcess/WebProcess.cpp:
      * WebProcess/soup/WebProcessSoup.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0b87a6c7
    • ap@apple.com's avatar
      Reduce amount of rebuilding when touching networking headers · b2f13721
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=111035
      
      Reviewed by Eric Seidel.
      
      Source/WebCore:
      
      This uses a number of common unsurprising techniques. One interesting observation
      is that including CachedResource related headers is very expensive. We can usually
      get away with their Client counterparts, and with CachedResourceHandle.
      
      * page/Frame.cpp:
      * page/Frame.h:
      Don't include FrameLoader, greatly reducing include graph for most non-loader files.
      This required making Frame::init() non-inline - I'm not sure why it ever was.
      
      * loader/FrameLoader.cpp:
      * loader/FrameLoader.h:
      Even though FrameLoader is logically on loading side of WebCore, it's included in
      too many places. Not including PolicyChecker.h and ResourceHandle.h was among the
      largest wins. As a future improvement, we should probably convert other members
      to OwnPtrs.
      
      * css/CSSCrossfadeValue.h: Initializing CachedResourceHandle with 0 requires a
      definition of a class it holds, but default construction does not.
      
      * loader/CrossOriginAccessControl.h: This file among others only needs ResourceHandleTypes.h,
      not ResourceHandle.h. This header is semi-recent, so not all include sites were updated.
      
      * loader/cache/CachedFont.h:
      * loader/cache/CachedFontClient.h: Added.
      * loader/cache/CachedRawResource.h:
      * loader/cache/CachedRawResourceClient.h: Added.
      * loader/cache/CachedSVGDocument.h:
      * loader/cache/CachedSVGDocumentClient.h: Added.
      These types were defining client types in the same headers, making it impossible
      to avoid including networking headers through CachedResource. Moved clients into
      separate files.
      
      * plugins/PluginStream.h:
      * plugins/PluginStreamClient.h: Added.
      Similar situation here.
      
      * loader/cache/CachedResourceHandle.cpp:
      * loader/cache/CachedResourceHandle.h:
      Moved functions that need to know about CachedResource to .cpp file. This is another
      huge win. Added a destructor, so that CachedResource woudn't be needed in all files
      that include CachedResourceHandle.
      
      * loader/cache/CachedSVGDocumentReference.cpp: Added.
      * loader/cache/CachedSVGDocumentReference.h:
      Moved constructor and virtual function implementations to a .cpp file - they need
      not inlining, and this lets us avoid including CachedSVGDocument.h in the header.
      
      * platform/graphics/filters/FilterOperation.cpp:
      * platform/graphics/filters/FilterOperation.h:
      Avoid including CachedSVGDocumentReference.h. This is not such a big win now that
      CachedSVGDocumentReference.h itself is smaller, but FilterOperation is so clearly
      rendering code that it seems best to cut any ties with resources and loading.
      Added a virtual destrutor in .cpp file, because inline destructors in polymorphic
      classes are generally harmful (due to code bloat).
      
      * plugins/PluginRequest.h: Added.
      * plugins/PluginView.h:
      Moved PluginRequest into a separate file, it was out of place in a view hierarchy
      class file.
      
      * rendering/RenderImageResource.cpp:
      * rendering/RenderImageResource.h:
      Moved definitions of virtual functions to a .cpp file. Thre is no win from having
      them inline, and now we don't need CachedImage.h in the header.
      
      * rendering/style/StyleCustomFilterProgram.cpp: Added.
      * rendering/style/StyleCustomFilterProgram.h:
      Ditto.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/mediastream/RTCPeerConnection.cpp:
      * Modules/notifications/Notification.cpp:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/ScriptControllerBase.cpp:
      * bindings/js/JSNodeCustom.cpp:
      * bindings/js/ScriptController.cpp:
      * bindings/js/ScriptSourceCode.h:
      * bindings/objc/DOM.mm:
      * bindings/v8/ScriptController.cpp:
      * bindings/v8/V8DOMWindowShell.cpp:
      * bindings/v8/custom/V8DOMWindowCustom.cpp:
      * css/CSSFontFaceSource.h:
      * css/CSSFontSelector.cpp:
      * css/WebKitCSSSVGDocumentValue.cpp:
      * css/WebKitCSSSVGDocumentValue.h:
      * dom/Clipboard.cpp:
      * dom/ContainerNode.cpp:
      * dom/DOMImplementation.cpp:
      * dom/PendingScript.h:
      * dom/ScriptElement.cpp:
      * dom/ScriptElement.h:
      * history/CachedFrame.cpp:
      * html/DOMURL.cpp:
      * html/HTMLAnchorElement.cpp:
      * html/HTMLAppletElement.cpp:
      * html/HTMLElement.cpp:
      * html/HTMLEmbedElement.cpp:
      * html/HTMLFrameSetElement.cpp:
      * html/HTMLHtmlElement.cpp:
      * html/HTMLImageElement.cpp:
      * html/HTMLObjectElement.cpp:
      * html/HTMLPlugInElement.cpp:
      * html/ImageDocument.cpp:
      * html/ImageInputType.cpp:
      * html/MediaDocument.cpp:
      * html/PluginDocument.cpp:
      * html/canvas/WebGLRenderingContext.cpp:
      * html/parser/HTMLConstructionSite.cpp:
      * html/parser/HTMLParserOptions.cpp:
      * html/parser/HTMLScriptRunner.h:
      * html/parser/XSSAuditor.cpp:
      * html/parser/XSSAuditorDelegate.cpp:
      * inspector/InspectorDebuggerAgent.cpp:
      * inspector/InspectorFileSystemAgent.cpp:
      * inspector/InspectorFrontendHost.cpp:
      * inspector/InspectorInstrumentation.h:
      * inspector/InspectorPageAgent.cpp:
      * inspector/NetworkResourcesData.cpp:
      * inspector/NetworkResourcesData.h:
      * loader/CookieJar.cpp:
      * loader/CrossOriginAccessControl.cpp:
      * loader/CrossOriginPreflightResultCache.h:
      * loader/DocumentThreadableLoader.h:
      * loader/ImageLoader.cpp:
      * loader/ImageLoader.h:
      * loader/LinkLoader.h:
      * loader/MainResourceLoader.cpp:
      * loader/MainResourceLoader.h:
      * loader/MixedContentChecker.cpp:
      * loader/PingLoader.cpp:
      * loader/PolicyChecker.h:
      * loader/ProgressTracker.cpp:
      * loader/SubframeLoader.cpp:
      * loader/SubresourceLoader.cpp:
      * loader/TextTrackLoader.cpp:
      * loader/TextTrackLoader.h:
      * loader/ThreadableLoader.h:
      * loader/appcache/ApplicationCacheGroup.cpp:
      * loader/appcache/ApplicationCacheGroup.h:
      * loader/appcache/ApplicationCacheHost.cpp:
      * loader/archive/cf/LegacyWebArchive.cpp:
      * loader/cache/CachedFont.cpp:
      * loader/cache/CachedImage.cpp:
      * loader/cache/CachedRawResource.cpp:
      * loader/cache/CachedResource.cpp:
      * loader/cache/CachedStyleSheetClient.h:
      * loader/cache/MemoryCache.cpp:
      * loader/cache/MemoryCache.h:
      * loader/chromium/CachedRawResourceChromium.cpp:
      * loader/icon/IconController.cpp:
      * loader/icon/IconLoader.h:
      * loader/mac/ResourceLoaderMac.mm:
      * page/DOMWindowExtension.cpp:
      * page/DragController.cpp:
      * page/PerformanceNavigation.cpp:
      * page/PerformanceTiming.cpp:
      * page/PointerLockController.cpp:
      * page/Settings.cpp:
      * page/animation/CSSPropertyAnimation.cpp:
      * platform/chromium/PasteboardChromium.cpp:
      * platform/efl/ErrorsEfl.cpp:
      * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
      * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
      * platform/gtk/ErrorsGtk.cpp:
      * platform/gtk/PasteboardGtk.cpp:
      * platform/gtk/PasteboardHelper.h:
      * platform/mac/ClipboardMac.h:
      * platform/mac/ClipboardMac.mm:
      * platform/mac/HTMLConverter.mm:
      * platform/mac/PasteboardMac.mm:
      * platform/network/AuthenticationChallengeBase.cpp:
      * platform/network/cf/CookieJarCFNet.cpp:
      * platform/network/cf/ResourceRequestCFNet.cpp:
      * platform/network/mac/CookieStorageMac.mm:
      * platform/qt/PasteboardQt.cpp:
      * plugins/DOMMimeType.cpp:
      * plugins/PluginView.cpp:
      * rendering/HitTestResult.cpp:
      * rendering/InlineFlowBox.cpp:
      * rendering/RenderBox.cpp:
      * rendering/RenderEmbeddedObject.cpp:
      * rendering/RenderImage.cpp:
      * rendering/RenderImageResourceStyleImage.cpp:
      * rendering/RenderLayer.cpp:
      * rendering/RenderLayerBacking.cpp:
      * rendering/RenderLayerFilterInfo.h:
      * rendering/RenderListItem.cpp:
      * rendering/RenderListMarker.cpp:
      * rendering/RenderSnapshottedPlugIn.cpp:
      * rendering/RenderTableCol.cpp:
      * rendering/RenderTableRow.cpp:
      * rendering/RenderTableSection.cpp:
      * rendering/style/StyleCachedShader.h:
      * svg/SVGFEImageElement.h:
      * svg/SVGFontFaceUriElement.h:
      * svg/SVGImageLoader.cpp:
      * svg/SVGUseElement.cpp:
      * svg/SVGUseElement.h:
      * svg/graphics/SVGImageCache.cpp:
      * testing/MockPagePopupDriver.cpp:
      * xml/XSLStyleSheet.h:
      * xml/XSLTProcessorLibxslt.cpp:
      * xml/parser/XMLDocumentParser.cpp:
      * xml/parser/XMLDocumentParser.h:
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      Many self-evident changes - removing unnecessary header includes, adding smaller
      more local ones that are now necessary.
      
      Source/WebKit/chromium:
      
      Adding includes that are now necessary because WebCore headers don't have them
      any more.
      
      * src/ApplicationCacheHost.cpp:
      * src/AssociatedURLLoader.cpp:
      * src/EditorClientImpl.cpp:
      * src/SharedWorkerRepository.cpp:
      * src/WebDataSourceImpl.cpp:
      * src/WebFrameImpl.h:
      * src/WebNode.cpp:
      * src/WebSharedWorkerImpl.cpp:
      * tests/FrameLoaderClientImplTest.cpp:
      
      Source/WebKit/efl:
      
      Adding includes that are now necessary because WebCore headers don't have them
      any more.
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      * ewk/ewk_frame.cpp:
      
      Source/WebKit/gtk:
      
      Adding includes that are now necessary because WebCore headers don't have them
      any more.
      
      * webkit/webkitwebpolicydecision.cpp:
      
      Source/WebKit/mac:
      
      Adding includes that are now necessary because WebCore headers don't have them
      any more.
      
      * DOM/WebDOMOperations.mm:
      * Misc/WebNSPasteboardExtras.mm:
      * WebCoreSupport/WebFrameNetworkingContext.mm:
      * WebView/WebRenderLayer.mm:
      * WebView/WebRenderNode.mm:
      
      Source/WebKit/qt:
      
      Adding includes that are now necessary because WebCore headers don't have them
      any more.
      
      * WebCoreSupport/NotificationPresenterClientQt.cpp:
      * WebCoreSupport/QWebPageAdapter.cpp:
      
      Source/WebKit2:
      
      Adding includes that are now necessary because WebCore headers don't have them
      any more.
      
      * NetworkProcess/HostRecord.h:
      * NetworkProcess/NetworkResourceLoadScheduler.h:
      * NetworkProcess/NetworkResourceLoader.h:
      * Shared/WebRenderLayer.cpp:
      * Shared/WebRenderObject.cpp:
      * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
      * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
      * WebProcess/Plugins/PDF/PDFPlugin.mm:
      * WebProcess/Plugins/PluginView.cpp:
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
      * WebProcess/WebPage/mac/WebPageMac.mm:
      * WebProcess/WebProcess.cpp:
      * WebProcess/soup/WebProcessSoup.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b2f13721
  9. 14 Feb, 2013 1 commit
  10. 11 Feb, 2013 2 commits
    • enrica@apple.com's avatar
      Source/WebCore: Add ENABLE_DELETION_UI to control the use of the deletion UI. · f3731061
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=109463.
      
      Reviewed by Ryosuke Niwa.
              
      This patch adds #if ENABLE(DELETION_UI) in every spot where
      DeleteButtonController is used. This class is now only instantiated
      if the feature is enabled. I've also done some cleanup in the
      DeleteButtonController class, removing unused methods and making
      private some methods only used internally to the class.
      Both DeleteButtonController and DeleteButton classes are now excluded
      from the compilation if the feature is not enabled.
      
      No new tests, no change of functionality.
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::cloneChildNodes):
      * editing/CompositeEditCommand.cpp:
      (WebCore::EditCommandComposition::unapply):
      (WebCore::EditCommandComposition::reapply):
      (WebCore::CompositeEditCommand::apply):
      * editing/DeleteButton.cpp:
      * editing/DeleteButtonController.cpp:
      * editing/DeleteButtonController.h: Some cleanup.
      (WebCore::DeleteButtonController::enabled): Made private.
      * editing/EditCommand.cpp:
      (WebCore::EditCommand::EditCommand):
      * editing/Editor.cpp:
      (WebCore::Editor::notifyComponentsOnChangedSelection):
      (WebCore::Editor::Editor):
      (WebCore::Editor::rangeForPoint):
      (WebCore::Editor::deviceScaleFactorChanged):
      * editing/Editor.h:
      * editing/htmlediting.cpp: avoidIntersectionWithNode is
      used only if the feature is enabled.
      * editing/htmlediting.h:
      * editing/markup.cpp:
      (WebCore::createMarkup):
      (WebCore::createFragmentFromNodes):
      * rendering/RenderTable.cpp: Removed unnecessary include
      fo DeleteButtonController.h
      
      Source/WTF: Add ENABLE_DELETION_UI to control the use of the deletion UI.
      https://bugs.webkit.org/show_bug.cgi?id=109463.
              
      ENABLE_DELETION_UI is set to 1 by default for
      all ports. It is explicitly enabled for MAC and disabled for iOS.
      
      Reviewed by Ryosuke Niwa.
      
      * wtf/Platform.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3731061
    • jchaffraix@webkit.org's avatar
      Regression(r131539): Heap-use-after-free in WebCore::RenderBlock::willBeDestroyed · bbcc3a1c
      jchaffraix@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107189
      
      Reviewed by Abhishek Arya.
      
      Source/WebCore: 
      
      Test: fast/dynamic/continuation-detach-crash.html
      
      This patch reverts r131539 and the following changes (r132591 and r139664).
      This means we redo detaching from the bottom-up which solves the regression.
      It fixes the attached test case as we re-attach child nodes before detaching
      the parent. It seems wrong to do but this avoid a stale continuation.
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::detach): Detach the children first, then ourself.
      * dom/Node.cpp:
      (WebCore::Node::detach): Clear the renderer instead of ASSERT'ing.
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::willBeDestroyed): Removed the code to clear the associated node's renderer.
      (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
      * rendering/RenderObjectChildList.cpp:
      (WebCore::RenderObjectChildList::removeChildNode):
      Moved the repainting logic back into removeChildNode from destroyAndCleanupAnonymousWrappers.
      (WebCore::RenderObjectChildList::destroyLeftoverChildren): Re-added the code to clear the associated node's
      renderer.
      * rendering/RenderTextFragment.cpp:
      (WebCore::RenderTextFragment::setText): Re-added the code to set the associated node's renderer.
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::detach):
      * dom/Node.cpp:
      (WebCore::Node::detach):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::willBeDestroyed):
      (WebCore::RenderObject::destroyAndCleanupAnonymousWrappers):
      * rendering/RenderObjectChildList.cpp:
      (WebCore::RenderObjectChildList::destroyLeftoverChildren):
      (WebCore::RenderObjectChildList::removeChildNode):
      * rendering/RenderTextFragment.cpp:
      (WebCore::RenderTextFragment::setText):
      
      LayoutTests: 
      
      * fast/dynamic/continuation-detach-crash-expected.txt: Added.
      * fast/dynamic/continuation-detach-crash.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bbcc3a1c
  11. 08 Feb, 2013 1 commit
    • mkwst@chromium.org's avatar
      Replace ExceptionCode assertions with ASSERT_NO_EXCEPTION macro. · 4d257487
      mkwst@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=109044
      
      Reviewed by Darin Adler.
      
      The pattern:
      
          ExceptionCode ec = 0;
          methodThatGeneratesException(ec);
          ASSERT(!ec);
      
      is more clearly and succinctly written as:
      
          methodThatGeneratesException(ASSERT_NO_EXCEPTION);
      
      This patch replaces the occurances of the former that never touch 'ec'
      again with the latter. It does the same for 'ASSERT(ec == 0);' (and, as
      a drive-by, replaces 'ASSERT(ec == 0)' with 'ASSERT(!ec)' in places
      where it does indeed matter that 'ec' get set properly.
      
      No change in behavior should result from this refactoring.
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::takeAllChildrenFrom):
      * dom/Document.cpp:
      (WebCore::Document::setTitle):
      * dom/MessagePort.cpp:
      (WebCore::MessagePort::dispatchMessages):
      (WebCore::MessagePort::disentanglePorts):
      * editing/DeleteButtonController.cpp:
      (WebCore::enclosingDeletableElement):
      (WebCore::DeleteButtonController::createDeletionUI):
          Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
      (WebCore::DeleteButtonController::show):
          Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
      * editing/EditorCommand.cpp:
      (WebCore::unionDOMRanges):
      * editing/ReplaceNodeWithSpanCommand.cpp:
      (WebCore::swapInNodePreservingAttributesAndChildren):
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::ReplacementFragment::ReplacementFragment):
      (WebCore::ReplacementFragment::removeNode):
      (WebCore::ReplacementFragment::insertNodeBefore):
      (WebCore::ReplacementFragment::insertFragmentForTestRendering):
      (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
      (WebCore::ReplaceSelectionCommand::insertAsListItems):
      * editing/SplitTextNodeCommand.cpp:
      (WebCore::SplitTextNodeCommand::doUnapply):
      * editing/TextIterator.cpp:
      (WebCore::CharacterIterator::range):
      (WebCore::BackwardsCharacterIterator::range):
      (WebCore::TextIterator::rangeFromLocationAndLength):
      (WebCore::collapsedToBoundary):
      * editing/htmlediting.cpp:
      (WebCore::createTabSpanElement):
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::fontForSelection):
      (WebCore::Editor::fontAttributesForSelectionStart):
      * editing/markup.cpp:
      (WebCore::createMarkup):
      (WebCore::trimFragment):
      (WebCore::createFragmentFromMarkupWithContext):
      (WebCore::fillContainerFromString):
      (WebCore::createFragmentFromText):
      (WebCore::createFragmentFromNodes):
      * html/ColorInputType.cpp:
      (WebCore::ColorInputType::createShadowSubtree):
          Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
      * html/HTMLOptionsCollection.cpp:
      (WebCore::HTMLOptionsCollection::add):
          Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::updatePlaceholderText):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
      (WebCore::HTMLTextFormControlElement::setInnerTextValue):
      * html/TextFieldInputType.cpp:
      (WebCore::TextFieldInputType::updatePlaceholderText):
      * html/ValidationMessage.cpp:
      (WebCore::ValidationMessage::buildBubbleTree):
      * html/shadow/MediaControlElementTypes.cpp:
      (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::getCookies):
      * inspector/InspectorStyleSheet.cpp:
      (WebCore::InspectorStyleSheet::addRule):
      * loader/appcache/ApplicationCacheHost.cpp:
      (WebCore::ApplicationCacheHost::dispatchDOMEvent):
      * page/DOMSelection.cpp:
      (WebCore::DOMSelection::deleteFromDocument):
      * page/DragController.cpp:
      (WebCore::prepareClipboardForImageDrag):
      * rendering/RenderTextControl.cpp:
      (WebCore::RenderTextControl::visiblePositionForIndex):
          Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4d257487
  12. 07 Feb, 2013 3 commits
    • esprehn@chromium.org's avatar
      HTML parser should queue MutationRecords for its operations · bc01ebc4
      esprehn@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=89351
      
      Reviewed by Eric Seidel.
      
      Source/WebCore:
      
      Generate mutation records inside the parser. This is done by using a
      ChildListMutationScope in the ContainerNode::parser* methods and then
      adding delivery before each <script> element would be processed by
      the parser.
      
      Test: fast/dom/MutationObserver/parser-mutations.html
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::takeAllChildrenFrom):
      (WebCore::ContainerNode::parserInsertBefore):
      (WebCore::ContainerNode::parserRemoveChild):
      (WebCore::ContainerNode::parserAppendChild):
      * html/parser/HTMLScriptRunner.cpp:
      (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
      (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
      (WebCore::HTMLScriptRunner::execute):
      (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
      (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets):
      (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
      (WebCore::HTMLScriptRunner::runScript):
      
      LayoutTests:
      
      Add new test mutation records in the parser and fix shadow-dom.html
      test since it used setTimeout and sometimes could observe parser
      mutations.
      
      * fast/dom/MutationObserver/parser-mutations-expected.txt: Added.
      * fast/dom/MutationObserver/parser-mutations.html: Added.
      * fast/dom/MutationObserver/shadow-dom-expected.txt:
      * fast/dom/MutationObserver/shadow-dom.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc01ebc4
    • gavinp@chromium.org's avatar
      Unreviewed, rolling out r142118. · 0a23dbe0
      gavinp@chromium.org authored
      http://trac.webkit.org/changeset/142118
      https://bugs.webkit.org/show_bug.cgi?id=109044
      
      Broke SVG! Oh noes!
      
      * Modules/indexeddb/IDBCursor.cpp:
      (WebCore::IDBCursor::direction):
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::mode):
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::takeAllChildrenFrom):
      * dom/Document.cpp:
      (WebCore::Document::setTitle):
      * dom/MessagePort.cpp:
      (WebCore::MessagePort::dispatchMessages):
      (WebCore::MessagePort::disentanglePorts):
      * editing/DeleteButtonController.cpp:
      (WebCore::enclosingDeletableElement):
      (WebCore::DeleteButtonController::createDeletionUI):
      (WebCore::DeleteButtonController::show):
      * editing/EditorCommand.cpp:
      (WebCore::unionDOMRanges):
      * editing/ReplaceNodeWithSpanCommand.cpp:
      (WebCore::swapInNodePreservingAttributesAndChildren):
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::ReplacementFragment::ReplacementFragment):
      (WebCore::ReplacementFragment::removeNode):
      (WebCore::ReplacementFragment::insertNodeBefore):
      (WebCore::ReplacementFragment::insertFragmentForTestRendering):
      (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
      (WebCore::ReplaceSelectionCommand::insertAsListItems):
      * editing/SplitTextNodeCommand.cpp:
      (WebCore::SplitTextNodeCommand::doUnapply):
      * editing/TextIterator.cpp:
      (WebCore::CharacterIterator::range):
      (WebCore::BackwardsCharacterIterator::range):
      (WebCore::TextIterator::rangeFromLocationAndLength):
      (WebCore::collapsedToBoundary):
      * editing/htmlediting.cpp:
      (WebCore::createTabSpanElement):
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::fontForSelection):
      (WebCore::Editor::fontAttributesForSelectionStart):
      * editing/markup.cpp:
      (WebCore::createMarkup):
      (WebCore::trimFragment):
      (WebCore::createFragmentFromMarkupWithContext):
      (WebCore::fillContainerFromString):
      (WebCore::createFragmentFromText):
      (WebCore::createFragmentFromNodes):
      * html/ColorInputType.cpp:
      (WebCore::ColorInputType::createShadowSubtree):
      * html/HTMLOptionsCollection.cpp:
      (WebCore::HTMLOptionsCollection::add):
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::updatePlaceholderText):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
      (WebCore::HTMLTextFormControlElement::setInnerTextValue):
      * html/TextFieldInputType.cpp:
      (WebCore::TextFieldInputType::updatePlaceholderText):
      * html/ValidationMessage.cpp:
      (WebCore::ValidationMessage::buildBubbleTree):
      * html/shadow/MediaControlElementTypes.cpp:
      (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::getCookies):
      * inspector/InspectorStyleSheet.cpp:
      (WebCore::InspectorStyleSheet::addRule):
      * loader/appcache/ApplicationCacheHost.cpp:
      (WebCore::ApplicationCacheHost::dispatchDOMEvent):
      * page/DOMSelection.cpp:
      (WebCore::DOMSelection::deleteFromDocument):
      * page/DragController.cpp:
      (WebCore::prepareClipboardForImageDrag):
      * rendering/RenderTextControl.cpp:
      (WebCore::RenderTextControl::visiblePositionForIndex):
      * rendering/style/SVGRenderStyle.h:
      (WebCore::SVGRenderStyle::initialBaselineShiftValue):
      (WebCore::SVGRenderStyle::initialKerning):
      (WebCore::SVGRenderStyle::initialStrokeDashOffset):
      (WebCore::SVGRenderStyle::initialStrokeWidth):
      * svg/SVGAnimatedLength.cpp:
      (WebCore::sharedSVGLength):
      (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
      (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
      * svg/SVGAnimatedLengthList.cpp:
      (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
      (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
      * svg/SVGLength.cpp:
      (WebCore::SVGLength::SVGLength):
      * svg/SVGTextContentElement.cpp:
      (WebCore::SVGTextContentElement::textLengthAnimated):
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::constructQualifiedName):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0a23dbe0
    • mkwst@chromium.org's avatar
      Replace ExceptionCode assertions with ASSERT_NO_EXCEPTION macro. · 50f39a6e
      mkwst@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=109044
      
      Reviewed by Darin Adler.
      
      The pattern:
      
          ExceptionCode ec = 0;
          methodThatGeneratesException(ec);
          ASSERT(!ec);
      
      is more clearly and succinctly written as:
      
          methodThatGeneratesException(ASSERT_NO_EXCEPTION);
      
      This patch replaces the occurances of the former that never touch 'ec'
      again with the latter. It does the same for 'ASSERT(ec == 0);' (and, as
      a drive-by, replaces 'ASSERT(ec == 0)' with 'ASSERT(!ec)' in places
      where it does indeed matter that 'ec' get set properly.
      
      No change in behavior should result from this refactoring.
      
      * Modules/indexeddb/IDBCursor.cpp:
      (WebCore::IDBCursor::direction):
      * Modules/indexeddb/IDBObjectStore.cpp:
      (WebCore):
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::mode):
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::takeAllChildrenFrom):
      * dom/Document.cpp:
      (WebCore::Document::setTitle):
      * dom/MessagePort.cpp:
      (WebCore::MessagePort::dispatchMessages):
      (WebCore::MessagePort::disentanglePorts):
      * editing/DeleteButtonController.cpp:
      (WebCore::enclosingDeletableElement):
      (WebCore::DeleteButtonController::createDeletionUI):
          Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
      (WebCore::DeleteButtonController::show):
          Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
      * editing/EditorCommand.cpp:
      (WebCore::unionDOMRanges):
      * editing/ReplaceNodeWithSpanCommand.cpp:
      (WebCore::swapInNodePreservingAttributesAndChildren):
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::ReplacementFragment::ReplacementFragment):
      (WebCore::ReplacementFragment::removeNode):
      (WebCore::ReplacementFragment::insertNodeBefore):
      (WebCore::ReplacementFragment::insertFragmentForTestRendering):
      (WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
      (WebCore::ReplaceSelectionCommand::insertAsListItems):
      * editing/SplitTextNodeCommand.cpp:
      (WebCore::SplitTextNodeCommand::doUnapply):
      * editing/TextIterator.cpp:
      (WebCore::CharacterIterator::range):
      (WebCore::BackwardsCharacterIterator::range):
      (WebCore::TextIterator::rangeFromLocationAndLength):
      (WebCore::collapsedToBoundary):
      * editing/htmlediting.cpp:
      (WebCore::createTabSpanElement):
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::fontForSelection):
      (WebCore::Editor::fontAttributesForSelectionStart):
      * editing/markup.cpp:
      (WebCore::createMarkup):
      (WebCore::trimFragment):
      (WebCore::createFragmentFromMarkupWithContext):
      (WebCore::fillContainerFromString):
      (WebCore::createFragmentFromText):
      (WebCore::createFragmentFromNodes):
      * html/ColorInputType.cpp:
      (WebCore::ColorInputType::createShadowSubtree):
          Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
      * html/HTMLOptionsCollection.cpp:
      (WebCore::HTMLOptionsCollection::add):
          Replaced 'ASSERT(ec == 0)' with 'ASSERT(!ec)' to match the style guide.
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::updatePlaceholderText):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::indexForVisiblePosition):
      (WebCore::HTMLTextFormControlElement::setInnerTextValue):
      * html/TextFieldInputType.cpp:
      (WebCore::TextFieldInputType::updatePlaceholderText):
      * html/ValidationMessage.cpp:
      (WebCore::ValidationMessage::buildBubbleTree):
      * html/shadow/MediaControlElementTypes.cpp:
      (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::getCookies):
      * inspector/InspectorStyleSheet.cpp:
      (WebCore::InspectorStyleSheet::addRule):
      * loader/appcache/ApplicationCacheHost.cpp:
      (WebCore::ApplicationCacheHost::dispatchDOMEvent):
      * page/DOMSelection.cpp:
      (WebCore::DOMSelection::deleteFromDocument):
      * page/DragController.cpp:
      (WebCore::prepareClipboardForImageDrag):
      * rendering/RenderTextControl.cpp:
      (WebCore::RenderTextControl::visiblePositionForIndex):
      * rendering/style/SVGRenderStyle.h:
      (WebCore::SVGRenderStyle::initialBaselineShiftValue):
      (WebCore::SVGRenderStyle::initialKerning):
      (WebCore::SVGRenderStyle::initialStrokeDashOffset):
      (WebCore::SVGRenderStyle::initialStrokeWidth):
      * svg/SVGAnimatedLength.cpp:
      (WebCore::sharedSVGLength):
      (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
      (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
      * svg/SVGAnimatedLengthList.cpp:
      (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
      (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
      * svg/SVGLength.cpp:
      (WebCore::SVGLength::SVGLength):
      * svg/SVGTextContentElement.cpp:
      (WebCore::SVGTextContentElement::textLengthAnimated):
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::constructQualifiedName):
          Replaced inline ASSERT with ASSERT_NO_EXCEPTION.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      50f39a6e
  13. 04 Feb, 2013 1 commit
    • mkwst@chromium.org's avatar
      Cleanup: Normalize usage of ExceptionCode in ContainerNode::checkXxxChild() · 6d127683
      mkwst@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=108766
      
      Reviewed by Kentaro Hara.
      
      This patch refactors checkAddChild and checkReplaceChild to remove the
      creation of an extra ExceptionCode that's not necessary for the
      desired behavior, and to bring the ExceptionCode usage into line with
      the rest of WebKit (this was the only case where ExceptionCode was
      assigned inside an 'if' statement's condition).
      
      After this patch, 'ec' will always be assigned a value, even if the
      result of 'checkAcceptChild' is 0. This would only change behavior if
      'ec' was non-zero coming into the function, and 'checkAcceptChild'
      returned 0. Since every callsite is either directly after an explicit
      zeroing of 'ec', or after an 'if (ec)' clause, that case should never
      appear. This patch, therefore, shouldn't visibly change WebKit's
      behavior.
      
      * dom/ContainerNode.cpp:
      (WebCore::checkAddChild):
      (WebCore::checkReplaceChild):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d127683
  14. 01 Feb, 2013 1 commit
    • loislo@chromium.org's avatar
      Web Inspector: Native Memory Instrumentation: provide edge names to class... · a7d09fcf
      loislo@chromium.org authored
      Web Inspector: Native Memory Instrumentation: provide edge names to class members in all WebCore instrumented classes.
      https://bugs.webkit.org/show_bug.cgi?id=107369
      
      Reviewed by Yury Semikhatsky.
      
      It is almost mechanical change generated by a script.
      Late I'll implement name to edge name consistency check in clang plugin.
      
      * Modules/webaudio/AudioContext.cpp:
      (WebCore::AudioContext::reportMemoryUsage):
      * Modules/webaudio/AudioNode.cpp:
      (WebCore::AudioNode::reportMemoryUsage):
      * bindings/js/ScriptWrappable.h:
      (WebCore::ScriptWrappable::reportMemoryUsage):
      * bindings/v8/DOMDataStore.cpp:
      (WebCore::DOMDataStore::reportMemoryUsage):
      * bindings/v8/DOMWrapperMap.h:
      (WebCore::DOMWrapperMap::reportMemoryUsage):
      * bindings/v8/V8PerIsolateData.cpp:
      (WebCore::V8PerIsolateData::reportMemoryUsage):
      * bindings/v8/V8ValueCache.cpp:
      (WebCore::StringCache::reportMemoryUsage):
      * css/CSSBorderImageSliceValue.cpp:
      (WebCore::CSSBorderImageSliceValue::reportDescendantMemoryUsage):
      * css/CSSCalculationValue.cpp:
      * css/CSSCanvasValue.cpp:
      (WebCore::CSSCanvasValue::reportDescendantMemoryUsage):
      * css/CSSCharsetRule.cpp:
      (WebCore::CSSCharsetRule::reportMemoryUsage):
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::CSSComputedStyleDeclaration::reportMemoryUsage):
      * css/CSSCrossfadeValue.cpp:
      (WebCore::CSSCrossfadeValue::reportDescendantMemoryUsage):
      * css/CSSCursorImageValue.cpp:
      (WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
      * css/CSSFontFaceRule.cpp:
      (WebCore::CSSFontFaceRule::reportMemoryUsage):
      * css/CSSFontFaceSrcValue.cpp:
      (WebCore::CSSFontFaceSrcValue::reportDescendantMemoryUsage):
      * css/CSSFunctionValue.cpp:
      (WebCore::CSSFunctionValue::reportDescendantMemoryUsage):
      * css/CSSGradientValue.cpp:
      (WebCore::CSSGradientColorStop::reportMemoryUsage):
      (WebCore::CSSGradientValue::reportBaseClassMemoryUsage):
      (WebCore::CSSLinearGradientValue::reportDescendantMemoryUsage):
      (WebCore::CSSRadialGradientValue::reportDescendantMemoryUsage):
      * css/CSSGroupingRule.cpp:
      (WebCore::CSSGroupingRule::reportMemoryUsage):
      * css/CSSImageGeneratorValue.cpp:
      (WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
      * css/CSSImageSetValue.cpp:
      (WebCore::CSSImageSetValue::reportDescendantMemoryUsage):
      (WebCore::CSSImageSetValue::ImageWithScale::reportMemoryUsage):
      * css/CSSImageValue.cpp:
      (WebCore::CSSImageValue::reportDescendantMemoryUsage):
      * css/CSSImportRule.cpp:
      (WebCore::CSSImportRule::reportMemoryUsage):
      * css/CSSMediaRule.cpp:
      (WebCore::CSSMediaRule::reportMemoryUsage):
      * css/CSSPageRule.cpp:
      (WebCore::CSSPageRule::reportMemoryUsage):
      * css/CSSPrimitiveValue.cpp:
      (WebCore::CSSPrimitiveValue::reportDescendantMemoryUsage):
      * css/CSSProperty.cpp:
      (WebCore::CSSProperty::reportMemoryUsage):
      * css/CSSReflectValue.cpp:
      (WebCore::CSSReflectValue::reportDescendantMemoryUsage):
      * css/CSSRule.cpp:
      (WebCore::CSSRule::reportMemoryUsage):
      * css/CSSRuleList.cpp:
      (WebCore::StaticCSSRuleList::reportMemoryUsage):
      * css/CSSRuleList.h:
      * css/CSSSelectorList.cpp:
      (WebCore::CSSSelectorList::reportMemoryUsage):
      * css/CSSStyleRule.cpp:
      (WebCore::CSSStyleRule::reportMemoryUsage):
      * css/CSSStyleSheet.cpp:
      (WebCore::CSSStyleSheet::reportMemoryUsage):
      * css/CSSValue.cpp:
      (WebCore::TextCloneCSSValue::reportDescendantMemoryUsage):
      * css/CSSValueList.cpp:
      (WebCore::CSSValueList::reportDescendantMemoryUsage):
      * css/CSSVariableValue.h:
      (WebCore::CSSVariableValue::reportDescendantMemoryUsage):
      * css/FontFeatureValue.cpp:
      (WebCore::FontFeatureValue::reportDescendantMemoryUsage):
      * css/FontValue.cpp:
      (WebCore::FontValue::reportDescendantMemoryUsage):
      * css/MediaList.cpp:
      (WebCore::MediaQuerySet::reportMemoryUsage):
      (WebCore::MediaList::reportMemoryUsage):
      * css/MediaQuery.cpp:
      (WebCore::MediaQuery::reportMemoryUsage):
      * css/MediaQueryExp.cpp:
      (WebCore::MediaQueryExp::reportMemoryUsage):
      * css/PropertySetCSSStyleDeclaration.cpp:
      (WebCore::PropertySetCSSStyleDeclaration::reportMemoryUsage):
      (WebCore::StyleRuleCSSStyleDeclaration::reportMemoryUsage):
      (WebCore::InlineCSSStyleDeclaration::reportMemoryUsage):
      * css/RuleFeature.cpp:
      (WebCore::RuleFeatureSet::reportMemoryUsage):
      * css/RuleSet.cpp:
      (WebCore::RuleData::reportMemoryUsage):
      (WebCore::RuleSet::reportMemoryUsage):
      (WebCore::RuleSet::RuleSetSelectorPair::reportMemoryUsage):
      * css/ShadowValue.cpp:
      (WebCore::ShadowValue::reportDescendantMemoryUsage):
      * css/StylePropertySet.cpp:
      (WebCore::StylePropertySet::reportMemoryUsage):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::MatchedProperties::reportMemoryUsage):
      (WebCore::StyleResolver::MatchedPropertiesCacheItem::reportMemoryUsage):
      (WebCore::MediaQueryResult::reportMemoryUsage):
      (WebCore::StyleResolver::reportMemoryUsage):
      * css/StyleRule.cpp:
      (WebCore::StyleRule::reportDescendantMemoryUsage):
      (WebCore::StyleRulePage::reportDescendantMemoryUsage):
      (WebCore::StyleRuleFontFace::reportDescendantMemoryUsage):
      (WebCore::StyleRuleGroup::reportDescendantMemoryUsage):
      (WebCore::StyleRuleMedia::reportDescendantMemoryUsage):
      (WebCore::StyleRuleRegion::reportDescendantMemoryUsage):
      (WebCore::StyleRuleViewport::reportDescendantMemoryUsage):
      * css/StyleRuleImport.cpp:
      (WebCore::StyleRuleImport::reportDescendantMemoryUsage):
      * css/StyleScopeResolver.cpp:
      (WebCore::StyleScopeResolver::reportMemoryUsage):
      * css/StyleSheetContents.cpp:
      (WebCore::StyleSheetContents::reportMemoryUsage):
      * css/WebKitCSSKeyframeRule.cpp:
      (WebCore::StyleKeyframe::reportMemoryUsage):
      (WebCore::WebKitCSSKeyframeRule::reportMemoryUsage):
      * css/WebKitCSSKeyframesRule.cpp:
      (WebCore::StyleRuleKeyframes::reportDescendantMemoryUsage):
      (WebCore::WebKitCSSKeyframesRule::reportMemoryUsage):
      * css/WebKitCSSSVGDocumentValue.cpp:
      (WebCore::WebKitCSSSVGDocumentValue::reportDescendantMemoryUsage):
      * css/WebKitCSSShaderValue.cpp:
      (WebCore::WebKitCSSShaderValue::reportDescendantMemoryUsage):
      * css/WebKitCSSViewportRule.cpp:
      (WebCore::WebKitCSSViewportRule::reportMemoryUsage):
      * dom/Attribute.h:
      (WebCore::Attribute::reportMemoryUsage):
      * dom/CharacterData.cpp:
      (WebCore::CharacterData::reportMemoryUsage):
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::reportMemoryUsage):
      * dom/ContainerNode.h:
      (ContainerNode):
      * dom/Document.cpp:
      (WebCore::Document::reportMemoryUsage):
      * dom/DocumentEventQueue.cpp:
      (WebCore::DocumentEventQueue::reportMemoryUsage):
      * dom/DocumentOrderedMap.cpp:
      (WebCore::DocumentOrderedMap::reportMemoryUsage):
      * dom/DocumentStyleSheetCollection.cpp:
      (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
      * dom/Element.cpp:
      (WebCore::Element::reportMemoryUsage):
      * dom/ElementAttributeData.cpp:
      (WebCore::ElementAttributeData::reportMemoryUsage):
      * dom/ElementRareData.cpp:
      (WebCore::ElementRareData::reportMemoryUsage):
      * dom/ElementShadow.cpp:
      (WebCore::ElementShadow::reportMemoryUsage):
      * dom/Event.cpp:
      (WebCore::Event::reportMemoryUsage):
      * dom/LiveNodeList.cpp:
      (WebCore::LiveNodeListBase::reportMemoryUsage):
      * dom/Node.cpp:
      (WebCore::Node::reportMemoryUsage):
      * dom/NodeRareData.cpp:
      (WebCore::NodeListsNodeData::reportMemoryUsage):
      (WebCore::NodeRareData::reportMemoryUsage):
      * dom/QualifiedName.cpp:
      (WebCore::QualifiedName::reportMemoryUsage):
      (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
      * dom/ScriptExecutionContext.cpp:
      (WebCore::ScriptExecutionContext::reportMemoryUsage):
      * dom/SecurityContext.cpp:
      (WebCore::SecurityContext::reportMemoryUsage):
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::reportMemoryUsage):
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::reportMemoryUsage):
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::reportMemoryUsage):
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::reportMemoryUsage):
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::reportMemoryUsage):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::reportMemoryUsage):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::reportMemoryUsage):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::reportMemoryUsage):
      * inspector/HeapGraphSerializer.cpp:
      (WebCore::HeapGraphSerializer::HeapGraphSerializer):
      (WebCore::HeapGraphSerializer::reportNode):
      (WebCore::HeapGraphSerializer::reportMemoryUsage):
      * inspector/HeapGraphSerializer.h:
      (HeapGraphSerializer):
      * inspector/InspectorBaseAgent.cpp:
      (WebCore::InspectorBaseAgentInterface::reportMemoryUsage):
      * inspector/InspectorController.cpp:
      (WebCore::InspectorController::reportMemoryUsage):
      * inspector/InspectorDOMStorageAgent.cpp:
      (WebCore::InspectorDOMStorageAgent::reportMemoryUsage):
      * inspector/InspectorDOMStorageResource.cpp:
      (WebCore::InspectorDOMStorageResource::reportMemoryUsage):
      * inspector/InspectorDebuggerAgent.cpp:
      (WebCore::InspectorDebuggerAgent::reportMemoryUsage):
      (WebCore::ScriptDebugListener::Script::reportMemoryUsage):
      * inspector/InspectorMemoryAgent.cpp:
      (WebCore::InspectorMemoryAgent::reportMemoryUsage):
      * inspector/InspectorOverlay.cpp:
      (WebCore::InspectorOverlay::reportMemoryUsage):
      * inspector/InspectorProfilerAgent.cpp:
      (WebCore::InspectorProfilerAgent::reportMemoryUsage):
      * inspector/InspectorResourceAgent.cpp:
      (WebCore::InspectorResourceAgent::reportMemoryUsage):
      * inspector/MemoryInstrumentationImpl.cpp:
      (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
      (WebCore::MemoryInstrumentationImpl::reportMemoryUsage):
      * inspector/NetworkResourcesData.cpp:
      (WebCore::XHRReplayData::reportMemoryUsage):
      (WebCore::NetworkResourcesData::ResourceData::reportMemoryUsage):
      (WebCore::NetworkResourcesData::reportMemoryUsage):
      * loader/CachedMetadata.cpp:
      (WebCore::CachedMetadata::reportMemoryUsage):
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::reportMemoryUsage):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::reportMemoryUsage):
      * loader/MainResourceLoader.cpp:
      (WebCore::MainResourceLoader::reportMemoryUsage):
      * loader/Prerenderer.cpp:
      (WebCore::Prerenderer::reportMemoryUsage):
      * loader/ResourceBuffer.cpp:
      (WebCore::ResourceBuffer::reportMemoryUsage):
      * loader/ResourceLoader.cpp:
      (WebCore::ResourceLoader::reportMemoryUsage):
      * loader/SubresourceLoader.cpp:
      (WebCore::SubresourceLoader::reportMemoryUsage):
      * loader/SubstituteData.cpp:
      (WebCore::SubstituteData::reportMemoryUsage):
      * loader/cache/CachedCSSStyleSheet.cpp:
      (WebCore::CachedCSSStyleSheet::reportMemoryUsage):
      * loader/cache/CachedFont.cpp:
      (WebCore::CachedFont::reportMemoryUsage):
      * loader/cache/CachedImage.cpp:
      (WebCore::CachedImage::reportMemoryUsage):
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource::reportMemoryUsage):
      * loader/cache/CachedResourceHandle.cpp:
      (WebCore::CachedResourceHandleBase::reportMemoryUsage):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::reportMemoryUsage):
      * loader/cache/CachedSVGDocument.cpp:
      (WebCore::CachedSVGDocument::reportMemoryUsage):
      * loader/cache/CachedScript.cpp:
      (WebCore::CachedScript::reportMemoryUsage):
      * loader/cache/CachedShader.cpp:
      (WebCore::CachedShader::reportMemoryUsage):
      * loader/cache/CachedXSLStyleSheet.cpp:
      (WebCore::CachedXSLStyleSheet::reportMemoryUsage):
      * loader/cache/MemoryCache.cpp:
      (WebCore::MemoryCache::reportMemoryUsage):
      * page/DOMTimer.cpp:
      (WebCore::DOMTimer::reportMemoryUsage):
      * page/Frame.cpp:
      (WebCore::Frame::reportMemoryUsage):
      * page/Page.cpp:
      (WebCore::Page::reportMemoryUsage):
      * platform/KURL.cpp:
      (WebCore::KURL::reportMemoryUsage):
      * platform/KURLGoogle.cpp:
      (WebCore::KURLGooglePrivate::reportMemoryUsage):
      * platform/KURLWTFURLImpl.h:
      (WebCore::KURLWTFURLImpl::reportMemoryUsage):
      * platform/ScrollableArea.cpp:
      (WebCore::ScrollableArea::reportMemoryUsage):
      * platform/SharedBuffer.cpp:
      (WebCore::SharedBuffer::reportMemoryUsage):
      * platform/audio/AudioArray.h:
      (WebCore::AudioArray::reportMemoryUsage):
      * platform/audio/FFTFrame.cpp:
      (WebCore::FFTFrame::reportMemoryUsage):
      * platform/audio/HRTFDatabase.cpp:
      (WebCore::HRTFDatabase::reportMemoryUsage):
      * platform/audio/HRTFDatabaseLoader.cpp:
      (WebCore::HRTFDatabaseLoader::reportMemoryUsage):
      * platform/audio/HRTFElevation.cpp:
      (WebCore::HRTFElevation::reportMemoryUsage):
      * platform/audio/HRTFKernel.cpp:
      (WebCore::HRTFKernel::reportMemoryUsage):
      * platform/audio/ffmpeg/FFTFrameFFMPEG.cpp:
      (reportMemoryUsage):
      * platform/graphics/BitmapImage.cpp:
      (WebCore::BitmapImage::reportMemoryUsage):
      (WebCore::FrameData::reportMemoryUsage):
      * platform/graphics/CrossfadeGeneratedImage.cpp:
      (WebCore::CrossfadeGeneratedImage::reportMemoryUsage):
      * platform/graphics/GeneratorGeneratedImage.cpp:
      (WebCore::GeneratorGeneratedImage::reportMemoryUsage):
      * platform/graphics/GraphicsLayer.cpp:
      (WebCore::GraphicsLayer::reportMemoryUsage):
      * platform/graphics/ImageBuffer.cpp:
      (WebCore::ImageBuffer::reportMemoryUsage):
      * platform/graphics/ImageSource.cpp:
      (WebCore::ImageSource::reportMemoryUsage):
      * platform/graphics/chromium/GraphicsLayerChromium.cpp:
      (WebCore::GraphicsLayerChromium::reportMemoryUsage):
      * platform/graphics/skia/ImageBufferSkia.cpp:
      (WebCore::ImageBufferData::reportMemoryUsage):
      * platform/graphics/skia/MemoryInstrumentationSkia.cpp:
      (reportMemoryUsage):
      * platform/graphics/skia/NativeImageSkia.cpp:
      (WebCore::NativeImageSkia::reportMemoryUsage):
      * platform/image-decoders/ImageDecoder.cpp:
      (WebCore::ImageFrame::reportMemoryUsage):
      (WebCore):
      (WebCore::ImageDecoder::reportMemoryUsage):
      * platform/image-decoders/skia/ImageDecoderSkia.cpp:
      (WebCore::ImageFrame::reportMemoryUsage):
      * platform/network/FormData.cpp:
      (WebCore::FormData::reportMemoryUsage):
      (WebCore::FormDataElement::reportMemoryUsage):
      * platform/network/ResourceRequestBase.cpp:
      (WebCore::ResourceRequestBase::reportMemoryUsageBase):
      * platform/network/ResourceResponseBase.cpp:
      (WebCore::ResourceResponseBase::reportMemoryUsage):
      * platform/network/chromium/ResourceRequest.cpp:
      (WebCore::ResourceRequest::reportMemoryUsage):
      * rendering/InlineBox.cpp:
      (WebCore::InlineBox::reportMemoryUsage):
      * rendering/InlineFlowBox.cpp:
      (WebCore::InlineFlowBox::reportMemoryUsage):
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::reportMemoryUsage):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::reportMemoryUsage):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::reportMemoryUsage):
      * rendering/RenderFrameSet.cpp:
      (WebCore::RenderFrameSet::reportMemoryUsage):
      (WebCore::RenderFrameSet::GridAxis::reportMemoryUsage):
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::reportMemoryUsage):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::reportMemoryUsage):
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::reportMemoryUsage):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::reportMemoryUsage):
      * rendering/RenderListMarker.cpp:
      (WebCore::RenderListMarker::reportMemoryUsage):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::reportMemoryUsage):
      * rendering/RenderTableCol.cpp:
      (WebCore::RenderTableCol::reportMemoryUsage):
      * rendering/RenderTableRow.cpp:
      (WebCore::RenderTableRow::reportMemoryUsage):
      * rendering/RenderTableSection.cpp:
      (WebCore::RenderTableSection::reportMemoryUsage):
      (WebCore::RenderTableSection::RowStruct::reportMemoryUsage):
      (WebCore::RenderTableSection::CellStruct::reportMemoryUsage):
      * rendering/RenderText.cpp:
      (WebCore::RenderText::reportMemoryUsage):
      * rendering/RenderView.cpp:
      (WebCore::RenderView::reportMemoryUsage):
      * rendering/style/DataRef.h:
      (WebCore::DataRef::reportMemoryUsage):
      * rendering/style/RenderStyle.cpp:
      (WebCore::RenderStyle::reportMemoryUsage):
      * rendering/style/StyleRareInheritedData.cpp:
      (WebCore::StyleRareInheritedData::reportMemoryUsage):
      * rendering/style/StyleRareNonInheritedData.cpp:
      (WebCore::StyleRareNonInheritedData::reportMemoryUsage):
      * svg/SVGPaint.cpp:
      (WebCore::SVGPaint::reportDescendantMemoryUsage):
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::reportMemoryUsage):
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::reportMemoryUsage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a7d09fcf
  15. 31 Jan, 2013 1 commit
  16. 30 Jan, 2013 1 commit
  17. 29 Jan, 2013 1 commit
  18. 25 Jan, 2013 1 commit
    • commit-queue@webkit.org's avatar
      Assert the connectedSubframeCount is consistent and fix over counting · be321c04
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107302
      
      Patch by Elliott Sprehn <esprehn@gmail.com> on 2013-01-25
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      Add a debug assertion that walks the subtree during frame disconnection
      and manually counts the number of connected subframes to assert that the
      value from Node::connectedSubframeCount() is the same as if we traversed
      through the tree.
      
      In fixing the places where this assertion failed I made document destruction
      faster by not walking the entire document looking for frames if the entire
      frame tree has been destroyed by way of FrameLoader::detachChildren().
      I had inadvertently introduced this improvement in r133933, but then I
      regressed it in r140090 when we switched to counting because I didn't
      realize we destroy the frame tree separate of frame disconnection on
      document unload so all frames could have been destroyed but the counts
      left on the ancestors.
      
      I also fixed another overcounting case where the adoption agency algorithm
      may call ContainerNode::takeAllChildrenFrom() which in turn calls
      ContainerNode::removeAllChildren() and could have left a connected subframe
      count on the node even though all the frames had been removed.
      
      This assertion did not uncover any cases of undercounting the number of
      frames.
      
      This also fixes a rare edge case where removeChild of an iframe that
      was already being unloaded would not unload the frame until the top level
      unload was done, and a reparenting of the iframe would not cause it to load.
      
      Test: fast/frames/reparent-in-unload-contentdocument.html
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::removeAllChildren):
      (WebCore::ContainerNode::parserInsertBefore):
      (WebCore::ContainerNode::parserRemoveChild):
      (WebCore::ContainerNode::parserAppendChild):
      * dom/ContainerNodeAlgorithms.cpp:
      (WebCore):
      (WebCore::assertConnectedSubframeCountIsConsistent):
      * dom/ContainerNodeAlgorithms.h:
      (WebCore):
      (WebCore::ChildFrameDisconnector::disconnect):
      * dom/Node.cpp:
      (WebCore::Node::updateAncestorConnectedSubframeCountForRemoval):
      (WebCore):
      (WebCore::Node::updateAncestorConnectedSubframeCountForInsertion):
      * dom/Node.h:
      (Node):
      * html/HTMLFrameOwnerElement.cpp:
      (WebCore::HTMLFrameOwnerElement::clearContentFrame):
      (WebCore):
      (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
      * html/HTMLFrameOwnerElement.h:
      (HTMLFrameOwnerElement):
      
      LayoutTests:
      
      Add a test that removing an iframe in the middle of unload causes the
      contentDocument to become immediately inaccessible.
      
      * fast/frames/reparent-in-unload-contentdocument-expected.txt: Added.
      * fast/frames/reparent-in-unload-contentdocument.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      be321c04
  19. 24 Jan, 2013 1 commit
    • morrita@google.com's avatar
      Refactoring: The name ContainerNode::removeChildren and... · 287e4e77
      morrita@google.com authored
      Refactoring: The name ContainerNode::removeChildren and ContainerNde::removeAllChilren() is confusing
      https://bugs.webkit.org/show_bug.cgi?id=107640
      
      Reviewed by Eric Seidel.
      
      This change renames unsafe removeAllChilren() function to
      removeDetachedChildren() and move it to protected visibility.
      
      In theory, the removed nodes should be detached() before. But some
      tests violates that assumption. It should be fixed.
      
      No new tests. No behavior change.
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::removeDetachedChildren):
      (WebCore::ContainerNode::takeAllChildrenFrom):
      (WebCore::ContainerNode::~ContainerNode):
      * dom/ContainerNode.h:
      (ContainerNode):
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::removeDetachedChildrenInContainer):
      (WebCore):
      * dom/Document.cpp:
      (WebCore::Document::removedLastRef):
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::~ShadowRoot):
      * svg/SVGElementInstance.cpp:
      (WebCore::SVGElementInstance::detach):
      * svg/SVGElementInstance.h:
      (SVGElementInstance):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      287e4e77
  20. 23 Jan, 2013 1 commit
  21. 17 Jan, 2013 1 commit
    • esprehn@chromium.org's avatar
      Track subframe count to avoid traversing the tree when there's no subframes · 64fc1e8b
      esprehn@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=101821
      
      Reviewed by Ojan Vafai.
      
      Source/WebCore:
      
      Make removeChild 9-14% faster by not walking the descendants looking for
      frames when there's known to be no frames.
      
      This is a more generalized version of the fix in Bug 101619 that only
      avoided this walk when the whole document had no frames. This patch extends
      it to skip traversing subtrees that have no frames by tracking the number of
      frames in subtrees and then only walking those subtrees that are known to
      contain frames in removeChild.
      
      Test: fast/frames/parser-append-subframe-count.html
      
      * dom/ContainerNode.cpp:
      (WebCore::willRemoveChildren):
      (WebCore::parserAppendChild):
      (WebCore::parserRemoveChild):
      (WebCore::parserInsertBefore):
          The parser may move nodes without doing frame disconnection so we
          must maintain the connected subframe count manually during these
          mutations.
      * dom/ContainerNodeAlgorithms.cpp:
      (WebCore::ChildFrameDisconnector::collectFrameOwners):
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::ChildFrameDisconnector::ChildFrameDisconnector):
      (ChildFrameDisconnector):
      (WebCore::ChildFrameDisconnector::collectFrameOwners):
        Renamed from collectDescendant() to better reflect what it really does.
      (WebCore::ChildFrameDisconnector::disconnectCollectedFrameOwners):
        Renamed from disconnect() to better reflect what it really does.
      (WebCore::ChildFrameDisconnector::disconnect):
        New method that does the collection of frame owners on either the root
        or only it's descendants.
      * dom/Node.cpp:
      (WebCore::Node::connectedSubframeCount):
      (WebCore::Node::incrementConnectedSubframeCount):
      (WebCore::Node::decrementConnectedSubframeCount):
      * dom/Node.h:
      * dom/NodeRareData.h:
      (WebCore::NodeRareData::NodeRareData):
      (WebCore::NodeRareData::connectedSubframeCount):
      (WebCore::NodeRareData::incrementConnectedSubframeCount):
      (WebCore::NodeRareData::decrementConnectedSubframeCount):
      * html/HTMLFrameOwnerElement.cpp:
      (WebCore::HTMLFrameOwnerElement::setContentFrame):
      (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
      
      LayoutTests:
      
      Add a test that when frames are moved around by the parser and not actually
      detached we keep the subframe counters of ancestors consistent.
      
      * fast/frames/parser-append-subframe-count-expected.txt: Added.
      * fast/frames/parser-append-subframe-count.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64fc1e8b
  22. 16 Jan, 2013 1 commit
  23. 15 Jan, 2013 2 commits
    • leviw@chromium.org's avatar
      Unreviewed, rolling out r139790. · 1ee7f29e
      leviw@chromium.org authored
      http://trac.webkit.org/changeset/139790
      https://bugs.webkit.org/show_bug.cgi?id=106948
      
      The patch is failing its own test.
      
      Source/JavaScriptCore: 
      
      * bytecode/GlobalResolveInfo.h: Removed property svn:mergeinfo.
      
      Source/WebCore: 
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::parserInsertBefore):
      (WebCore::ContainerNode::parserRemoveChild):
      (WebCore::ContainerNode::parserAppendChild):
      * html/parser/HTMLScriptRunner.cpp:
      (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
      (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
      (WebCore::HTMLScriptRunner::execute):
      (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
      (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets):
      (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
      (WebCore::HTMLScriptRunner::runScript):
      
      LayoutTests: 
      
      * fast/dom/MutationObserver/parser-mutations-expected.txt: Removed.
      * fast/dom/MutationObserver/parser-mutations.html: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1ee7f29e
    • commit-queue@webkit.org's avatar
      HTML parser should queue MutationRecords for its operations · a227b81c
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=89351
      
      Patch by Elliott Sprehn <esprehn@gmail.com> on 2013-01-15
      Reviewed by Eric Seidel.
      
      Source/WebCore:
      
      Generate mutation records inside the parser. This is done by using a
      ChildListMutationScope in the ContainerNode::parser* methods and then
      adding delivery before each <script> element would be processed by
      the parser.
      
      Test: fast/dom/MutationObserver/parser-mutations.html
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::parserInsertBefore):
      (WebCore::ContainerNode::parserRemoveChild):
      (WebCore::ContainerNode::parserAppendChild):
      * html/parser/HTMLScriptRunner.cpp:
      (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
      (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
      (WebCore::HTMLScriptRunner::execute):
      (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
      (WebCore::HTMLScriptRunner::executeScriptsWaitingForStylesheets):
      (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
      (WebCore::HTMLScriptRunner::runScript):
      
      LayoutTests:
      
      Add tests for parser generated mutations.
      
      XXX: This needs a bunch more tests observing the adoption
      agency algorithm to catch parserInsertBefore and parserRemoveChild
      mutations.
      
      * fast/dom/MutationObserver/parser-mutations-expected.txt: Added.
      * fast/dom/MutationObserver/parser-mutations.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a227b81c
  24. 08 Jan, 2013 1 commit
    • rafaelw@chromium.org's avatar
      [HTMLTemplateElement] Allow <template> content to be inspected · fd9c3ed5
      rafaelw@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105839
      
      Reviewed by Pavel Feldman.
      
      In addition to the plumbing which allows template contents to be
      displayed within the inspector, this patch adds a manually-managed
      weakref from the template document back to its host document (typically
      the creator). This is required so that the inspector agent can be found
      for template elements.
      
      * dom/Document.cpp:
      (WebCore::Document::~Document):
      (WebCore::Document::templateDocument):
      * dom/Document.h:
      (Document):
      (WebCore::Document::setTemplateDocumentHost):
      (WebCore::Document::templateDocumentHost):
      * editing/markup.cpp:
      (WebCore::createFragmentForInnerOuterHTML):
      * html/HTMLTemplateElement.cpp:
      (WebCore::HTMLTemplateElement::content):
      * inspector/Inspector.json:
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::buildObjectForNode):
      * inspector/InspectorInstrumentation.h:
      (WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
      * inspector/front-end/DOMAgent.js:
      (WebInspector.DOMNode):
      (WebInspector.DOMNode.prototype.hasChildNodes):
      (WebInspector.DOMNode.prototype._insertChild):
      (WebInspector.DOMNode.prototype._setChildrenPayload):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd9c3ed5
  25. 04 Jan, 2013 1 commit
    • adamk@chromium.org's avatar
      Remove ENABLE_MUTATION_OBSERVERS #define · a0129590
      adamk@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105459
      
      Reviewed by Ryosuke Niwa.
      
      .:
      
      * Source/cmake/WebKitFeatures.cmake:
      * Source/cmakeconfig.h.cmake:
      
      Source/JavaScriptCore:
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebCore:
      
      The flag has been on by default for quite awhile now (nearly a year)
      and the feature is a standardized part of DOM4.
      
      The only place it was disabled was under "unstable" features for the
      gtk port, but the fact that it's shipping in several major WebKit
      browsers as well as Firefox suggests that it's not too unstable.
      
      * Configurations/FeatureDefines.xcconfig:
      * GNUmakefile.am: Removed ENABLE_MUTATION_OBSERVERS from the "unstable features" list.
      * GNUmakefile.features.am.in:
      * bindings/js/JSDictionary.cpp:
      (WebCore):
      (WebCore::JSDictionary::convertValue):
      * bindings/js/JSDictionary.h:
      * bindings/js/JSMainThreadExecState.cpp:
      (WebCore::JSMainThreadExecState::didLeaveScriptContext):
      * bindings/js/JSMutationCallbackCustom.cpp:
      * bindings/js/JSMutationObserverCustom.cpp:
      * bindings/v8/V8GCController.cpp:
      * bindings/v8/V8RecursionScope.cpp:
      (WebCore::V8RecursionScope::didLeaveScriptContext):
      * bindings/v8/custom/V8MutationCallbackCustom.cpp:
      * bindings/v8/custom/V8MutationObserverCustom.cpp:
      * css/PropertySetCSSStyleDeclaration.cpp:
      (WebCore::PropertySetCSSStyleDeclaration::setCssText):
      (WebCore::PropertySetCSSStyleDeclaration::setProperty):
      (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
      (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
      * dom/CharacterData.cpp:
      (WebCore::CharacterData::dispatchModifiedEvent):
      * dom/ChildListMutationScope.cpp:
      * dom/ChildListMutationScope.h:
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::insertBefore):
      (WebCore::ContainerNode::replaceChild):
      (WebCore::willRemoveChild):
      (WebCore::willRemoveChildren):
      (WebCore::ContainerNode::appendChild):
      (WebCore::updateTreeAfterInsertion):
      * dom/Document.cpp:
      (WebCore::Document::Document):
      * dom/Document.h:
      (Document):
      * dom/Element.cpp:
      (WebCore::Element::willModifyAttribute):
      * dom/MutationCallback.h:
      * dom/MutationCallback.idl:
      * dom/MutationObserver.cpp:
      * dom/MutationObserver.h:
      * dom/MutationObserver.idl:
      * dom/MutationObserverInterestGroup.cpp:
      * dom/MutationObserverInterestGroup.h:
      * dom/MutationObserverRegistration.cpp:
      * dom/MutationObserverRegistration.h:
      * dom/MutationRecord.cpp:
      * dom/MutationRecord.h:
      * dom/MutationRecord.idl:
      * dom/Node.cpp:
      (WebCore::Node::clearRareData):
      (WebCore::Node::setTextContent):
      (WebCore::Node::didMoveToNewDocument):
      (WebCore::Node::notifyMutationObserversNodeWillDetach):
      * dom/Node.h:
      (Node):
      * dom/NodeRareData.cpp:
      (SameSizeAsNodeRareData):
      (WebCore::NodeRareData::reportMemoryUsage):
      * dom/NodeRareData.h:
      (NodeRareData):
      (WebCore::NodeRareData::ensureTransientMutationObserverRegistry):
      * editing/markup.cpp:
      (WebCore::replaceChildrenWithFragment):
      (WebCore::replaceChildrenWithText):
      * page/DOMWindow.idl:
      
      Source/WebKit/blackberry:
      
      * WebCoreSupport/AboutDataEnableFeatures.in:
      
      Source/WebKit/chromium:
      
      * features.gypi:
      * src/WebKit.cpp:
      (WebKit::initialize):
      (WebKit::shutdown):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      (DumpRenderTreeSupportEfl::deliverAllMutationsIfNecessary):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
      (DumpRenderTreeSupportGtk::deliverAllMutationsIfNecessary):
      
      Source/WebKit/mac:
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebKit2:
      
      * Configurations/FeatureDefines.xcconfig:
      
      Tools:
      
      * Scripts/webkitperl/FeatureList.pm:
      * qmake/mkspecs/features/features.pri:
      
      WebKitLibraries:
      
      * win/tools/vsprops/FeatureDefines.vsprops:
      * win/tools/vsprops/FeatureDefinesCairo.vsprops:
      
      LayoutTests:
      
      Remove references to ENABLE(MUTATION_OBSERVERS) from tests.
      
      * fast/dom/MutationObserver/cross-document.html:
      * fast/dom/MutationObserver/database-callback-delivery.html:
      * fast/dom/MutationObserver/disconnect-cancel-pending.html:
      * fast/dom/MutationObserver/filesystem-callback-delivery.html:
      * fast/dom/MutationObserver/mutation-observer-constructor.html:
      * fast/dom/MutationObserver/observe-attributes.html:
      * fast/dom/MutationObserver/observe-characterdata.html:
      * fast/dom/MutationObserver/observe-childList.html:
      * fast/dom/MutationObserver/observe-exceptions.html:
      * fast/dom/MutationObserver/observe-subtree.html:
      * fast/dom/MutationObserver/takeRecords.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0129590
  26. 03 Jan, 2013 2 commits
    • adamk@chromium.org's avatar
      Unreviewed build fix. · b092fb66
      adamk@chromium.org authored
      * dom/ContainerNode.cpp:
      (WebCore::isInTemplateContent): s/UNUSED/UNUSED_PARAM/
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b092fb66
    • adamk@chromium.org's avatar
      [HTMLTemplateElement] Disallow cycles within template content · 0503b9a8
      adamk@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=105066
      
      Reviewed by Ojan Vafai.
      
      Source/WebCore:
      
      Cycles in <template> content aren't quite as bad as cycles in normal
      DOM trees, but they can easily cause crashes, e.g. in cloneNode and
      innerHTML.
      
      Shadow DOM has an analagous issue, and this patch tackles that problem
      at the same time by creating a new method, Node::containsIncludingHostElements.
      
      In order to disallow cycles, the HTMLTemplateElement.content
      DocumentFragment needs a pointer to its host. The approach here
      creates a new subclass with a host pointer and a new virtual method
      to DocumentFragment to identify the subclass.
      
      To avoid unnecessary virtual function calls, also changed how
      Document::templateContentsOwnerDocument works to allow fast inlined
      access and avoid lazy creation when not needed.
      
      Tests: fast/dom/HTMLTemplateElement/cycles-in-shadow.html
             fast/dom/HTMLTemplateElement/cycles.html
             fast/dom/shadow/shadow-hierarchy-exception.html
      
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/ContainerNode.cpp:
      (WebCore::isInTemplateContent):
      (WebCore::containsConsideringHostElements):
      (WebCore::checkAcceptChild):
      * dom/Document.cpp:
      (WebCore::Document::ensureTemplateContentsOwnerDocument): Renamed to make clear that it lazily creates the Document. Updated all existing callers to call this method.
      * dom/Document.h:
      (Document):
      (WebCore::Document::templateContentsOwnerDocument): Fast, inlined accessor for use in checkAcceptChild().
      * dom/DocumentFragment.h:
      (WebCore::DocumentFragment::isTemplateContent):
      * dom/Node.cpp:
      (WebCore::Node::containsIncludingShadowDOM): made const, simplified
      (WebCore::Node::containsIncludingHostElements): Specialized version of Node::contains that knows how to jump over template content boundaries.
      * dom/Node.h:
      (Node):
      * dom/TemplateContentDocumentFragment.h: Added.
      (TemplateContentDocumentFragment): Subclass of DocumentFragment which stores its host template element.
      (WebCore::TemplateContentDocumentFragment::create):
      (WebCore::TemplateContentDocumentFragment::host):
      (WebCore::TemplateContentDocumentFragment::TemplateContentDocumentFragment):
      * editing/markup.cpp:
      (WebCore::createFragmentForInnerOuterHTML):
      * html/HTMLTemplateElement.cpp:
      (WebCore::HTMLTemplateElement::content): Construct the new subclass.
      
      LayoutTests:
      
      * fast/dom/HTMLTemplateElement/cycles-expected.txt: Added.
      * fast/dom/HTMLTemplateElement/cycles-in-shadow-expected.txt: Added.
      * fast/dom/HTMLTemplateElement/cycles-in-shadow.html: Added.
      * fast/dom/HTMLTemplateElement/cycles.html: Added.
      * fast/dom/shadow/shadow-hierarchy-exception-expected.txt: Added.
      * fast/dom/shadow/shadow-hierarchy-exception.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0503b9a8
  27. 16 Dec, 2012 1 commit
    • leviw@chromium.org's avatar
      Push pixel snapping logic into TransformState · 104fddd8
      leviw@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=101779
      
      Reviewed by Simon Fraser.
      
      Source/WebCore:
      
      The old SnapOffsetForTransforms behavior fell apart when there was content nested in
      multiple levels of containers with sub-pixel offsets. The point of this flag was to
      mirror the pixel snapping that occurs in paint, where offsets are accumulated bottom-
      up through the render tree and snapped at the end. This change eliminates this flag
      and pushes pixel snapping logic down into TransformState.
      
      TransformState now tracks a LayoutSize accumulated offset when there's no transform
      or we're just translating. We then snap and apply this offset before accumulating
      values into a transform, and when returning planar coordinates to callers.
      
      Test: fast/sub-pixel/transformed-iframe-copy-on-scroll.html added,
            fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html modified to also catch this bug.
      
      * platform/graphics/transforms/TransformState.cpp:
      (WebCore::TransformState::operator=): Pass accumulated offset.
      (WebCore::TransformState::translateTransform): Extracted this functionality for
      re-use when applying the accumulated offset, or accumulating from a call to move.
      (WebCore::TransformState::translateMappedCoordinates): Same as above when we're not
      acculating into a transform.
      (WebCore::TransformState::move): Changed to accumulate into m_accumulatedOffset when
      not accumulating into a transform.
      (WebCore::TransformState::applyAccumulatedOffset):
      (WebCore::TransformState::applyTransform): Applies the accumulated offset before the
      transform.
      (WebCore::TransformState::flatten): Ditto for flattening.
      (WebCore::TransformState::mappedPoint): Translates by the accumulated offset before
      returning.
      (WebCore::TransformState::mappedQuad): Ditto.
      * platform/graphics/transforms/TransformState.h:
      (TransformState): Added m_accumulatedOffset.
      * rendering/RenderGeometryMap.cpp:
      (WebCore::RenderGeometryMap::mapToContainer): When not using a transform, we still need
      to snap our offset before applying to our float result. Also, flatten when we have a
      non-uniform step.
      * rendering/RenderGeometryMap.h:
      (RenderGeometryMap): Remove use of SnapOffsetForTransforms.
      
      Everything below simply drops the use of SnapOffsetForTransforms:
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::getUpperLeftCorner):
      * dom/MouseRelatedEvent.cpp:
      (WebCore::MouseRelatedEvent::computeRelativePosition):
      * editing/FrameSelection.cpp:
      (WebCore::CaretBase::absoluteBoundsForLocalRect):
      * editing/RenderedPosition.cpp:
      (WebCore::RenderedPosition::absoluteRect):
      * editing/VisiblePosition.cpp:
      (WebCore::VisiblePosition::absoluteCaretBounds):
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
      * html/shadow/SliderThumbElement.cpp:
      (WebCore::SliderThumbElement::setPositionFromPoint):
      * html/shadow/SpinButtonElement.cpp:
      (WebCore::SpinButtonElement::defaultEventHandler):
      * page/FrameView.cpp:
      (WebCore::FrameView::convertFromRenderer):
      (WebCore::FrameView::convertToRenderer):
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::paintDocumentMarker):
      (WebCore::InlineTextBox::paintTextMatchMarker):
      (WebCore::InlineTextBox::computeRectForReplacementMarker):
      * rendering/LayoutState.cpp:
      (WebCore::LayoutState::LayoutState):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::mapLocalToContainer):
      (WebCore::RenderBox::pushMappingToContainer):
      * rendering/RenderBox.h:
      (RenderBox):
      * rendering/RenderBoxModelObject.cpp:
      (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
      * rendering/RenderEmbeddedObject.cpp:
      (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
      * rendering/RenderFrameSet.cpp:
      (WebCore::RenderFrameSet::userResize):
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::mapLocalToContainer):
      (WebCore::RenderInline::pushMappingToContainer):
      * rendering/RenderInline.h:
      (RenderInline):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::absoluteToContents):
      (WebCore::RenderLayer::scrollTo):
      (WebCore::RenderLayer::childrenClipRect):
      (WebCore::RenderLayer::selfClipRect):
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::contentsVisible):
      * rendering/RenderMediaControls.cpp:
      (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
      * rendering/RenderMenuList.cpp:
      (WebCore::RenderMenuList::showPopup):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::absoluteFocusRingQuads):
      * rendering/RenderObject.h:
      * rendering/RenderText.cpp:
      (WebCore::RenderText::absoluteRectsForRange):
      (WebCore::RenderText::absoluteQuads):
      (WebCore::RenderText::absoluteQuadsForRange):
      * rendering/RenderTheme.cpp:
      (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
      * rendering/RenderView.cpp:
      (WebCore::RenderView::selectionBounds):
      * rendering/RenderView.h:
      (RenderView):
      * rendering/RenderWidget.cpp:
      (WebCore::RenderWidget::updateWidgetGeometry):
      * rendering/svg/RenderSVGForeignObject.cpp:
      (WebCore::RenderSVGForeignObject::mapLocalToContainer):
      * rendering/svg/RenderSVGForeignObject.h:
      (RenderSVGForeignObject):
      * rendering/svg/RenderSVGInline.cpp:
      (WebCore::RenderSVGInline::mapLocalToContainer):
      * rendering/svg/RenderSVGInline.h:
      (RenderSVGInline):
      * rendering/svg/RenderSVGModelObject.cpp:
      (WebCore::RenderSVGModelObject::mapLocalToContainer):
      * rendering/svg/RenderSVGModelObject.h:
      (RenderSVGModelObject):
      * rendering/svg/RenderSVGRoot.h:
      (RenderSVGRoot):
      * rendering/svg/RenderSVGText.cpp:
      (WebCore::RenderSVGText::mapLocalToContainer):
      * rendering/svg/RenderSVGText.h:
      (RenderSVGText):
      * rendering/svg/SVGRenderSupport.cpp:
      (WebCore::SVGRenderSupport::mapLocalToContainer):
      * rendering/svg/SVGRenderSupport.h:
      (SVGRenderSupport):
      
      Source/WebKit/chromium:
      
      Eliminating use of SnapOffsetForTransforms as it's no longer needed.
      
      * src/FindInPageCoordinates.cpp:
      (WebKit::toNormalizedRect):
      * src/LinkHighlight.cpp:
      (WebKit::convertTargetSpaceQuadToCompositedLayer):
      * src/WebInputEventConversion.cpp:
      (WebKit::convertAbsoluteLocationForRenderObject):
      * src/WebPluginContainerImpl.cpp:
      (WebKit::WebPluginContainerImpl::windowToLocalPoint):
      
      Source/WebKit/mac:
      
      * WebView/WebFullScreenController.mm:
      (screenRectOfContents): Removed SnapOffsetForTransforms as it's no longer needed.
      
      Source/WebKit2:
      
      Eliminating use of SnapOffsetForTransforms as it's no longer needed.
      
      * WebProcess/FullScreen/WebFullScreenManager.cpp:
      (WebKit::screenRectOfContents):
      
      LayoutTests:
      
      * fast/dom/Window/webkitConvertPoint.html: Updating values to match corrected pixel snapping.
      * fast/multicol/break-properties.html: Fixing sub-pixel layout feature checking.
      * fast/multicol/vertical-lr/break-properties.html: Ditto.
      * fast/multicol/vertical-rl/break-properties.html: Ditto.
      * fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html: Updating to catch the bug where the old
      pixel snapping logic did the wrong thing when nested.
      * fast/sub-pixel/transformed-iframe-copy-on-scroll.html: Added.
      * platform/chromium-linux/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.png:
      * platform/chromium-linux/fast/sub-pixel/transformed-iframe-copy-on-scroll-expected.png: Added.
      * platform/chromium-linux/fast/sub-pixel/transformed-iframe-copy-on-scroll-expected.txt: Added.
      * platform/chromium-win/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.txt:
      * platform/chromium/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      104fddd8
  28. 10 Dec, 2012 1 commit
    • antti@apple.com's avatar
      Factor node traversal into standalone functions · 5d47b589
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=104507
      
      Source/WebCore: 
      
      Reviewed by Eric Seidel.
      
      Node traversal functions are currently Node and ContainerNode members. Their implementations
      are confusingly scattered over multiple header and source files. These functions have no particular
      reason to be members as they don't require non-public access. They should be made freestanding
      function instead and gathered together.
              
      This patch adds NodeTraversal namespace, defined in NodeTraversal.h. It contains freestanding
      functions for traversing Nodes. Most popular functions are inlined (as before) and
      there are ContainerNode specific specializations (as before).
              
      In client code
              
          node = node->traverseNextNode();
          node = node->traverseNextSibling();
              
      becomes
              
          node = NodeTraversal::next(node);
          node = NodeTraversal::nextSkippingChildren(node);
                  
      etc.
      
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * accessibility/AccessibilityNodeObject.cpp:
      (WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):
      * accessibility/AccessibilityObject.cpp:
      (WebCore::AccessibilityObject::firstAccessibleObjectFromNode):
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::addImageMapChildren):
      * bindings/js/JSDocumentCustom.cpp:
      (WebCore::toJS):
      * css/SelectorChecker.cpp:
      (WebCore::SelectorChecker::allVisitedStateChanged):
      (WebCore::SelectorChecker::visitedStateChanged):
      * css/StyleInvalidationAnalysis.cpp:
      (WebCore::StyleInvalidationAnalysis::invalidateStyle):
      * dom/ContainerNode.cpp:
      (WebCore::dispatchChildInsertionEvents):
      (WebCore::dispatchChildRemovalEvents):
      * dom/ContainerNode.h:
      (ContainerNode):
      (WebCore):
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::ChildFrameDisconnector::collectDescendant):
      * dom/Document.cpp:
      (WebCore::Document::buildAccessKeyMap):
      (WebCore::Document::removeAllEventListeners):
      (WebCore::Document::updateBaseURL):
      (WebCore::Document::processBaseElement):
      (WebCore::Document::nodeAbsIndex):
      (WebCore::Document::nodeWithAbsIndex):
      (WebCore::Document::getFocusableNodes):
      * dom/DocumentMarkerController.cpp:
      (WebCore::DocumentMarkerController::markersInRange):
      (WebCore::DocumentMarkerController::setMarkersActive):
      (WebCore::DocumentMarkerController::hasMarkers):
      (WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
      * dom/DocumentOrderedMap.cpp:
      (WebCore::DocumentOrderedMap::get):
      * dom/ElementShadow.cpp:
      (WebCore::ElementShadow::collectSelectFeatureSetFrom):
      * dom/Node.cpp:
      (WebCore::Node::normalize):
      (WebCore::Node::lazyAttach):
      (WebCore):
      (WebCore::Node::detach):
      (WebCore::traverseTreeAndMark):
      * dom/Node.h:
      (Node):
      * dom/NodeIterator.cpp:
      (WebCore::NodeIterator::NodePointer::moveToNext):
      (WebCore::NodeIterator::NodePointer::moveToPrevious):
      (WebCore::NodeIterator::updateForNodeRemoval):
      * dom/NodeTraversal.h: Added.
      (WebCore):
      (NodeTraversal):
      (WebCore::NodeTraversal::traverseNextNodeTemplate):
      (WebCore::NodeTraversal::next):
      (WebCore::NodeTraversal::traverseNextSiblingTemplate):
      (WebCore::NodeTraversal::nextSibling):
      * dom/Range.cpp:
      (WebCore::Range::toString):
      (WebCore::Range::checkDeleteExtract):
      (WebCore::Range::firstNode):
      (WebCore::Range::pastLastNode):
      (WebCore::Range::textRects):
      (WebCore::Range::textQuads):
      (WebCore::Range::getBorderAndTextQuads):
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::labelElementForId):
      (WebCore::TreeScope::findAnchor):
      * dom/TreeScopeAdopter.cpp:
      (WebCore::TreeScopeAdopter::moveTreeToNewScope):
      (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
      * dom/TreeWalker.cpp:
      (WebCore::TreeWalker::nextNode):
      * editing/ApplyStyleCommand.cpp:
      (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
      (WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle):
      (WebCore::containsNonEditableRegion):
      (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
      (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle):
      (WebCore::ApplyStyleCommand::removeInlineStyle):
      * editing/BreakBlockquoteCommand.cpp:
      (WebCore::BreakBlockquoteCommand::doApply):
      * editing/CompositeEditCommand.cpp:
      (WebCore::CompositeEditCommand::deleteInsignificantText):
      (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
      * editing/DeleteSelectionCommand.cpp:
      (WebCore::firstEditablePositionInNode):
      (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
      (WebCore::DeleteSelectionCommand::handleGeneralDelete):
      * editing/EditCommand.cpp:
      (WebCore::SimpleEditCommand::addNodeAndDescendants):
      * editing/EditingStyle.cpp:
      (WebCore::EditingStyle::triStateOfStyle):
      (WebCore::EditingStyle::textDirectionForSelection):
      * editing/Editor.cpp:
      (WebCore::Editor::simplifyMarkup):
      * editing/FrameSelection.cpp:
      (WebCore::scanForForm):
      (WebCore::FrameSelection::setSelectionFromNone):
      * editing/InsertParagraphSeparatorCommand.cpp:
      (WebCore::InsertParagraphSeparatorCommand::doApply):
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::ReplacementFragment::removeUnrenderedNodes):
      (WebCore::ReplacementFragment::removeInterchangeNodes):
      (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChildren):
      (WebCore::ReplaceSelectionCommand::InsertedNodes::willRemoveNode):
      (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
      (WebCore::removeHeadContents):
      (WebCore::ReplaceSelectionCommand::handleStyleSpans):
      * editing/ReplaceSelectionCommand.h:
      (WebCore::ReplaceSelectionCommand::InsertedNodes::pastLastLeaf):
      * editing/SimplifyMarkupCommand.cpp:
      (WebCore::SimplifyMarkupCommand::doApply):
      * editing/TextIterator.cpp:
      (WebCore::TextIterator::advance):
      (WebCore::shouldEmitNewlineAfterNode):
      * editing/htmlediting.cpp:
      (WebCore::hasARenderedDescendant):
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::fontForSelection):
      * editing/markup.cpp:
      (WebCore::completeURLs):
      (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):
      (WebCore::findNodesSurroundingContext):
      (WebCore::trimFragment):
      * editing/visible_units.cpp:
      (WebCore::startOfParagraph):
      (WebCore::endOfParagraph):
      * html/HTMLCollection.cpp:
      (WebCore::nextNode):
      * html/HTMLElement.cpp:
      (WebCore::setHasDirAutoFlagRecursively):
      (WebCore::HTMLElement::directionality):
      (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
      (WebCore::HTMLElement::getItemRefElements):
      * html/HTMLFieldSetElement.cpp:
      (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
      (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::formElementIndex):
      * html/HTMLLabelElement.cpp:
      (WebCore::HTMLLabelElement::control):
      * html/HTMLLegendElement.cpp:
      (WebCore::HTMLLegendElement::associatedControl):
      * html/HTMLMapElement.cpp:
      (WebCore::HTMLMapElement::mapMouseEvent):
      * html/HTMLNameCollection.cpp:
      (WebCore::HTMLNameCollection::virtualItemAfter):
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::collectOptionInnerText):
      * html/HTMLPropertiesCollection.cpp:
      (WebCore::nextNodeWithProperty):
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::recalcListItems):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::selection):
      (WebCore::HTMLTextFormControlElement::innerTextValue):
      (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
      * html/RadioInputType.cpp:
      (WebCore::RadioInputType::handleKeydownEvent):
      * html/shadow/ContentDistributor.cpp:
      (WebCore::ShadowRootContentDistributionData::ensureInsertionPointList):
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::performSearch):
      * inspector/InspectorMemoryAgent.cpp:
      * page/FocusController.cpp:
      (WebCore::FocusController::findFocusCandidateInContainer):
      * page/Frame.cpp:
      (WebCore::Frame::searchForLabelsAboveCell):
      (WebCore::Frame::searchForLabelsBeforeElement):
      * rendering/RenderNamedFlowThread.cpp:
      (WebCore::RenderNamedFlowThread::getRanges):
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
      (WebCore::SVGSVGElement::getElementById):
      * svg/SVGUseElement.cpp:
      (WebCore::removeDisallowedElementsFromSubtree):
      * svg/animation/SMILTimeContainer.cpp:
      (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
      * xml/XPathNodeSet.cpp:
      (WebCore::XPath::NodeSet::traversalSort):
      * xml/XPathStep.cpp:
      (WebCore::XPath::Step::nodesInAxis):
      * xml/XPathUtil.cpp:
      (WebCore::XPath::stringValue):
      
      Source/WebKit/chromium: 
      
      Reviewed by Eric Seidel.
      
      * src/WebFrameImpl.cpp:
      (WebKit::WebFrameImpl::setFindEndstateFocusAndSelection):
      
      Source/WebKit/mac: 
      
      Reviewed by Eric Seidel.
          
      * WebView/WebHTMLRepresentation.mm:
      (searchForLabelsBeforeElement):
      
      Source/WebKit2: 
      
      Reviewed by Eric Seidel.
      
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::containsAnyFormElements):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5d47b589
  29. 05 Dec, 2012 2 commits
    • commit-queue@webkit.org's avatar
      Add infrastructure for :before and :after in DOM · fb6d226c
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=103705
      
      Patch by Elliott Sprehn <esprehn@chromium.org> on 2012-12-05
      Reviewed by Eric Seidel.
      
      Add all infrastructure for reimplementing generated content :before and
      :after as DOM Elements. Now ElementRareData has two pointers to PseudoElements
      for the generated content and Node has methods for traversing the tree
      including generated content.
      
      This will allow the generated content to be treated as real nodes instead
      of anonymous and take part in the usual recalcStyle and attach flow which
      fixes many bugs and vastly simplifies the ifecycle of generated content.
      
      Instead of attempting to land both the infrastructure and enable it at
      the same time which has proven problematic due to how drastic this change
      is, this patch contains only the support code so a much smaller future
      patch can be used to switch it on.
      
      No new behavior, this is just the infrastructure.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/DOMAllInOne.cpp:
      * dom/Element.cpp:
      (WebCore::Element::~Element):
      (WebCore::Element::detach):
      (WebCore::Element::updatePseudoElement):
      (WebCore::Element::createPseudoElementIfNeeded):
      (WebCore::Element::beforePseudoElement):
      (WebCore::Element::afterPseudoElement):
      * dom/Element.h:
      (Element):
      * dom/ElementRareData.h:
      (ElementRareData):
      (WebCore::ElementRareData::ElementRareData):
      (WebCore::ElementRareData::~ElementRareData):
      (WebCore::ElementRareData::setPseudoElement):
      (WebCore::ElementRareData::pseudoElement):
      (WebCore::ElementRareData::releasePseudoElement):
      * dom/Node.cpp:
      (WebCore::Node::pseudoAwarePreviousSibling):
      (WebCore::Node::pseudoAwareNextSibling):
      (WebCore::Node::rendererIsEditable):
      (WebCore::checkAcceptChild):
      * dom/Node.h:
      (Node):
      (WebCore::Node::isPseudoElement):
      (WebCore::Node::isBeforePseudoElement):
      (WebCore::Node::isAfterPseudoElement):
      (WebCore::Node::pseudoId):
      (WebCore::Node::customPseudoId):
      * dom/NodeRenderingContext.cpp:
      (WebCore::NodeRenderingContext::nextRenderer):
      (WebCore::NodeRenderingContext::previousRenderer):
      * dom/Position.cpp:
      (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
      * dom/PseudoElement.cpp: Added.
      (WebCore::pseudoElementTagName):
      (WebCore::PseudoElement::PseudoElement):
      (WebCore::PseudoElement::customStyleForRenderer):
      (WebCore::PseudoElement::attach):
      (WebCore::PseudoElement::rendererIsNeeded):
      (WebCore::PseudoElement::updateChildStyle):
      (WebCore::PseudoElement::didRecalcStyle):
      * dom/PseudoElement.h: Added.
      (PseudoElement):
      (WebCore::PseudoElement::create):
      (WebCore::pseudoElementIsNeeded):
      * editing/visible_units.cpp:
      (WebCore::logicallyPreviousBox):
      (WebCore::logicallyNextBox):
      (WebCore::startPositionForLine):
      (WebCore::endPositionForLine):
      * page/animation/AnimationController.cpp:
      (WebCore::AnimationController::updateAnimations):
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestResult::setInnerNode):
      (WebCore::HitTestResult::setInnerNonSharedNode):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::isSelectionRoot):
      (WebCore::RenderBlock::renderName):
      * rendering/RenderCounter.cpp:
      (WebCore::RenderCounter::originalText):
      * rendering/RenderDeprecatedFlexibleBox.cpp:
      (WebCore::RenderDeprecatedFlexibleBox::renderName):
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::renderName):
      * rendering/RenderMultiColumnBlock.cpp:
      (WebCore::RenderMultiColumnBlock::renderName):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::createObject):
      (WebCore::RenderObject::setPseudoStyle):
      (WebCore::RenderObject::createVisiblePosition):
      * rendering/RenderObject.h:
      (WebCore::RenderObject::isPseudoElement):
      (RenderObject):
      (WebCore::RenderObject::generatingNode):
      * rendering/RenderTableCell.h:
      (WebCore::RenderTableCell::renderName):
      * rendering/RenderTableRow.h:
      (WebCore::RenderTableRow::renderName):
      * rendering/RenderTableSection.h:
      (WebCore::RenderTableSection::renderName):
      * rendering/RenderTreeAsText.cpp:
      (WebCore::RenderTreeAsText::writeRenderObject):
      * rendering/style/ContentData.cpp:
      (WebCore::ImageContentData::createRenderer):
      (WebCore::TextContentData::createRenderer):
      (WebCore::CounterContentData::createRenderer):
      (WebCore::QuoteContentData::createRenderer):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fb6d226c
    • rafaelw@chromium.org's avatar
      DOMImplementation.createDocument should call appendChild rather than... · 018c0739
      rafaelw@chromium.org authored
      DOMImplementation.createDocument should call appendChild rather than parserAppendChild to add docType and documentElement
      https://bugs.webkit.org/show_bug.cgi?id=104040
      
      Reviewed by Ojan Vafai.
      
      createDocument now calls appendChild.
      
      No new tests (no observable changes).
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::parserAppendChild):
      * dom/DOMImplementation.cpp:
      (WebCore::DOMImplementation::createDocument):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      018c0739
  30. 04 Dec, 2012 2 commits
    • dpranke@chromium.org's avatar
      parser* methods in ContainerNode should not support DocumentFragment · 834f7742
      dpranke@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=103965
      
      Patch by Elliott Sprehn <esprehn@chromium.org> on 2012-12-04
      Reviewed by Darin Adler.
      
      Only parserInsertBefore ever supported DocumentFragment and this feature
      is never used. It appears this code ended up in parserInsertBefore when
      it was created as a copy of insertBefore that didn't fire events. This
      patch removes that code and adds assertions that we never pass
      DocumentFragments since doing so would cause a corrupted tree as we never
      check checkAcceptChild or do other validation in the parser methods.
      
      No new tests, just refactoring.
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::parserInsertBefore):
      (WebCore::ContainerNode::parserRemoveChild):
      (WebCore::ContainerNode::parserAppendChild):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      834f7742
    • ossy@webkit.org's avatar
      Unreviewed build fix after r136467 · 78cf9b75
      ossy@webkit.org authored
      The template element patch added asserts in parserAppendChild and parserInsertBefore which should be valid, but DOMImplementation::createDocument() calls parserAppendChild with docType without regard to its owner. This patch removes the assert and adds a FIXME.
      
      Patch by Rafael Weinstein <rafaelw@chromium.org> on 2012-12-03
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::parserInsertBefore):
      (WebCore::ContainerNode::parserAppendChild):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      78cf9b75