1. 01 Oct, 2013 1 commit
  2. 04 Jan, 2013 1 commit
    • senorblanco@chromium.org's avatar
      CSS url() filters with forward references don't work · 7b6792be
      senorblanco@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90405
      
      Based on a patch by Keyar Hood.
      
      Reviewed by Dirk Schulze.
      
      Source/WebCore:
      
      In order for CSS to reference SVG filters that will occur later in
      the document, or will be added at a future time, we need a way to
      notify the target element (the one the filter style is applied to)
      when the correct SVG filter is added to the DOM.
      There is already code for SVG elements that handles this problem, in
      SVGResourcesCache. This patch allows any element to have a reference to
      an SVG element in SVGResourceCache.
      
      Tests: css3/filters/effect-reference-after.html
             css3/filters/effect-reference-delete-crash.html
             css3/filters/effect-reference-delete.html
             css3/filters/effect-reference-removed-while-pending-resources.html
             css3/filters/effect-reference-rename.html
             css3/filters/effect-reference-reset-style-delete-crash.html
             svg/filters/filter-cycle.html
      
      * dom/Element.cpp:
      (WebCore::Element::~Element):
      (WebCore::Element::removedFrom):
      When an Element is deleted or removed from its container, and it
      has pending resources, remove it from the SVGResourceCache resources
      on deletion or when removed from its container.
      (WebCore::Element::hasPendingResources):
      (WebCore::Element::setHasPendingResources):
      (WebCore::Element::clearHasPendingResources):
      Accessors for ElementRareData's new bit flag.
      * dom/Element.h:
      (WebCore::Element::buildPendingResource):
      Virtual function to override for referenced elements (moved from SVGElement).
      * dom/ElementRareData.h:
      (WebCore::ElementRareData::hasPendingResources):
      (WebCore::ElementRareData::setHasPendingResources):
      (WebCore::ElementRareData::ElementRareData):
      Add a new bit flag to indicate whether the element depends on pending resources or not, and accessors.
      * dom/NodeRareData.h:
      (WebCore::NodeRareData::NodeRareData):
      (NodeRareData):
      The actual flag bit lives in NodeRareData, so it compacts better with
      other flags.
      * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
      (WebCore::BitmapTextureImageBuffer::applyFilters):
      Changed to the new function signature for FilterEffectRenderer::build().
      * rendering/FilterEffectRenderer.cpp:
      (WebCore::createCustomFilterEffect):
      (WebCore::FilterEffectRenderer::buildReferenceFilter):
      Changed signature to accept a RenderObject rather than a Document, so we know which node to notify when the SVG filter arrives.  If the referenced filter cannot be found, add its id as a pending reference.
      (WebCore::FilterEffectRenderer::build):
      * rendering/FilterEffectRenderer.h:
      Change to signatures of build() and buildReferenceFilter() to pass
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):
      Use the new semantics for FilterEffectRenderer::build().
      * rendering/svg/RenderSVGResourceContainer.cpp:
      (WebCore::RenderSVGResourceContainer::registerResource):
      Call clearHasPendingResourceIfPossible on the SVGDocumentExtensions, not
      on the element, since we want to support generic Elements.
      * rendering/svg/SVGResourcesCache.cpp:
      (WebCore::SVGResourcesCache::addResourcesFromRenderObject):
      (WebCore::SVGResourcesCache::clientStyleChanged):
      For non-SVG elements, set a synthetic style change when parent resources
      are invalidated.
      (WebCore::SVGResourcesCache::resourceDestroyed):
      Add support for non-SVG Elements.
      * svg/SVGDocumentExtensions.cpp:
      (WebCore::SVGDocumentExtensions::addPendingResource):
      (WebCore::SVGDocumentExtensions::isElementPendingResources):
      (WebCore::SVGDocumentExtensions::isElementPendingResource):
      Changed to allow use of Element instead of SVGElement.
      (WebCore::SVGDocumentExtensions::clearHasPendingResourcesIfPossible):
      Moved from SVGElement, and made to work on any Element.  This way,
      we avoid adding this function to Element itself.
      (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
      (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
      Changed to allow use of Element instead of SVGElement.
      * svg/SVGDocumentExtensions.h:
      SVGElement -> Element.
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::~SVGElement):
      (WebCore::SVGElement::removedFrom):
      Don't handle pending resource notifications (Element will do it).
      * svg/SVGElement.h:
      All functions moved to Element, except for clearHasPendingResourcesIfPossible() moved to SVGDocumentExtensions.
      * svg/SVGElementRareData.h:
      (WebCore::SVGElementRareData::SVGElementRareData):
      m_hasPendingResources and accessors moved to ElementRareData.
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
      SVGElement -> Element, and call SVGDocumentExtensions for
      clearHasPendingResourcesIfPossible().
      
      LayoutTests:
      
      * css3/filters/effect-reference-after-expected.html: Added.
      * css3/filters/effect-reference-after.html: Added.
      * css3/filters/effect-reference-delete-crash.html: Added.
      * css3/filters/effect-reference-delete-expected.html: Added.
      * css3/filters/effect-reference-delete.html: Added.
      * css3/filters/effect-reference-removed-while-pending-resources-expected.html: Added.
      * css3/filters/effect-reference-removed-while-pending-resources.html: Added.
      * css3/filters/effect-reference-rename-expected.html: Added.
      * css3/filters/effect-reference-rename.html: Added.
      * css3/filters/effect-reference-reset-style-delete-crash-expected.txt: Added.
      * css3/filters/effect-reference-reset-style-delete-crash.html: Added.
      * css3/filters/script-tests/effect-reference-delete-crash.js: Added.
      * css3/filters/script-tests/effect-reference-reset-style-delete-crash.js: Added.
      * svg/filters/filter-cycle-expected.html: Added.
      * svg/filters/filter-cycle.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7b6792be
  3. 17 Dec, 2010 1 commit
    • caseq@chromium.org's avatar
      2010-12-15 Andrey Kosyakov <caseq@chromium.org> · eb1e75f4
      caseq@chromium.org authored
              Reviewed by Pavel Feldman.
      
              Web Inspector: [Extension API] add support for adding/overriding HTTP request headers
              https://bugs.webkit.org/show_bug.cgi?id=50493
      
              Test: http/tests/inspector/extensions-headers.html
      
              * inspector/Inspector.idl:
              * inspector/InspectorController.cpp:
              (WebCore::InspectorController::willSendRequest): Apply extra headers.
              (WebCore::InspectorController::setExtraHeaders):
              * inspector/InspectorController.h:
              * inspector/front-end/ExtensionAPI.js:
              (WebInspector.injectedExtensionAPI.Resources.prototype.getHAR):
              (WebInspector.injectedExtensionAPI.Resources.prototype.addRequestHeaders):
              * inspector/front-end/ExtensionServer.js:
              (WebInspector.ExtensionServer):
              (WebInspector.ExtensionServer.prototype._onAddRequestHeaders):
      
      2010-12-15  Andrey Kosyakov  <caseq@chromium.org>
      
              Reviewed by Pavel Feldman.
      
              Web Inspector: [Extension API] add support for adding/overriding HTTP request headers
              Moved extensions test frameworks under http/tests/inspector, so HTTP tests may reuse it.
              https://bugs.webkit.org/show_bug.cgi?id=50493
      
              * http/tests/inspector/extensions-headers-expected.txt: Added.
              * http/tests/inspector/extensions-headers.html: Added.
              * http/tests/inspector/extensions-test.js: Renamed from LayoutTests/inspector/extensions-test.js.
              (log):
              (extensionFunctions):
              (initialize_ExtensionsTest.InspectorTest.dispatchOnMessage):
              (initialize_ExtensionsTest.InspectorTest.runExtensionTests):
              (initialize_ExtensionsTest.extensionOutput):
              (initialize_ExtensionsTest.dumpSidebarContent):
              (initialize_ExtensionsTest.reloadPage):
              (test):
              * http/tests/inspector/resources/echo-headers.php: Added.
              * http/tests/inspector/resources/extension-main.html: Renamed from LayoutTests/inspector/resources/extension-main.html.
              * http/tests/inspector/resources/extension-main.js: Renamed from LayoutTests/inspector/resources/extension-main.js.
              (fetchTests.callback):
              (fetchTests):
              (runTests):
              (onTestsDone):
              (dispatchOnFrontend.callbackWrapper):
              (dispatchOnFrontend):
              (callbackAndNextTest.callbackWrapper):
              (callbackAndNextTest):
              * http/tests/inspector/resources/extension-panel.html: Renamed from LayoutTests/inspector/resources/extension-panel.html.
              * http/tests/inspector/resources/extension-sidebar.html: Renamed from LayoutTests/inspector/resources/extension-sidebar.html.
              * inspector/extensions-api-expected.txt:
              * inspector/extensions-api.html:
              * inspector/extensions-audits-api.html:
              * inspector/extensions-audits.html:
              * inspector/extensions-eval.html:
              * inspector/extensions-events.html:
              * inspector/extensions-resources-expected.txt:
              * inspector/extensions-resources.html:
              * inspector/extensions.html:
              * platform/chromium/test_expectations.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eb1e75f4
  4. 02 Aug, 2010 1 commit
    • loislo@chromium.org's avatar
      ndrey Kosyakov <caseq@chromium.org> · 6a07f07f
      loislo@chromium.org authored
              Reviewed by Pavel Feldman.
      
              Web Inspector: adding experimental support for WebInspector extensions API.
              https://bugs.webkit.org/show_bug.cgi?id=40425
      
              Tests: inspector/extensions-api.html
                     inspector/extensions.html
      
              * WebCore.gypi:
              * WebCore.vcproj/WebCore.vcproj:
              * inspector/InspectorController.cpp:
              (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
              (WebCore::InspectorController::didCommitLoad):
              * inspector/InspectorFrontendHost.cpp:
              (WebCore::InspectorFrontendHost::setExtensionAPI):
              * inspector/InspectorFrontendHost.h:
              * inspector/InspectorFrontendHost.idl:
              * inspector/front-end/ElementsPanel.js:
              (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
              (WebInspector.ElementsPanel):
              * inspector/front-end/ExtensionAPI.js: Added. An API implementation that gets injected into the extension context.
              (injectedExtensionAPI):
              (injectedExtensionAPI.EventSinkImpl.prototype.addListener):
              (injectedExtensionAPI.EventSinkImpl.prototype.removeListener):
              (injectedExtensionAPI.EventSinkImpl.prototype._fire):
              (injectedExtensionAPI.EventSink):
              (injectedExtensionAPI.InspectorExtensionAPI):
              (injectedExtensionAPI.InspectorExtensionAPI.prototype.log):
              (injectedExtensionAPI.Resources.prototype.getAll):
              (injectedExtensionAPI.Resources.prototype.get return):
              (injectedExtensionAPI.Resources.prototype):
              (injectedExtensionAPI.Panels):
              (injectedExtensionAPI.Panels.prototype.create.callbackWrapper):
              (injectedExtensionAPI.Panels.prototype.create):
              (injectedExtensionAPI.PanelImpl):
              (injectedExtensionAPI.PanelImpl.prototype.createSidebarPane.callbackWrapper):
              (injectedExtensionAPI.PanelImpl.prototype.createSidebarPane):
              (injectedExtensionAPI.ExtensionPanel):
              (injectedExtensionAPI.ExtensionSidebarPaneImpl):
              (injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setHeight):
              (injectedExtensionAPI.ExtensionSidebarPaneImpl.prototype.setExpanded):
              (injectedExtensionAPI.InspectedWindow):
              (injectedExtensionAPI.InspectedWindow.prototype.reload):
              (injectedExtensionAPI.InspectedWindow.prototype.evaluate):
              (injectedExtensionAPI.ExtensionServerClient.prototype.sendRequest):
              (injectedExtensionAPI.ExtensionServerClient.prototype.registerHandler):
              (injectedExtensionAPI.ExtensionServerClient.prototype.nextObjectId):
              (injectedExtensionAPI.ExtensionServerClient.prototype._registerCallback):
              (injectedExtensionAPI.ExtensionServerClient.prototype._onCallback):
              (injectedExtensionAPI.ExtensionServerClient.prototype._onMessage):
              (injectedExtensionAPI.expandURL):
              (injectedExtensionAPI.):
              * inspector/front-end/ExtensionPanel.js: Added. A class that provides WebInspector's Panel interface to the inspector, hosts extension panel within an IFrame and proxies Panel callbacks to the extension
      .
              (WebInspector.ExtensionPanel):
              (WebInspector.ExtensionPanel.prototype.get defaultFocusedElement):
              (WebInspector.ExtensionPanel.prototype.updateMainViewWidth):
              (WebInspector.ExtensionPanel.prototype.searchCanceled):
              (WebInspector.ExtensionPanel.prototype.performSearch):
              (WebInspector.ExtensionPanel.prototype.jumpToNextSearchResult):
              (WebInspector.ExtensionPanel.prototype.jumpToPreviousSearchResult):
              (WebInspector.ExtensionPanel.prototype._addStyleRule):
              * inspector/front-end/ExtensionRegistryStub.js: Added. A stub for ExtensionRegistry class that is meant to provide a list of extensions. Actual implementations may be browser-specfic.
              (.WebInspector.InspectorExtensionRegistryStub):
              (.WebInspector.InspectorExtensionRegistryStub.prototype.getExtensionsAsync):
              * inspector/front-end/ExtensionServer.js: Added. Communicates with ExtensionAPI via DOM messaging and proxies requests to WebInspector classes.
              (WebInspector.ExtensionServer):
              (WebInspector.ExtensionServer.prototype.notifyPanelShown):
              (WebInspector.ExtensionServer.prototype.notifyObjectSelected):
              (WebInspector.ExtensionServer.prototype.notifyResourceFinished):
              (WebInspector.ExtensionServer.prototype.notifySearchAction):
              (WebInspector.ExtensionServer.prototype.notifyInspectedPageLoaded):
              (WebInspector.ExtensionServer.prototype.notifyInspectedURLChanged):
              (WebInspector.ExtensionServer.prototype.notifyInspectorReset):
              (WebInspector.ExtensionServer.prototype._convertResource):
              (WebInspector.ExtensionServer.prototype._postNotification):
              (WebInspector.ExtensionServer.prototype._onSubscribe):
              (WebInspector.ExtensionServer.prototype._onUnsubscribe):
              (WebInspector.ExtensionServer.prototype._onCreatePanel):
              (WebInspector.ExtensionServer.prototype._onCreateSidebar):
              (WebInspector.ExtensionServer.prototype._createClientIframe):
              (WebInspector.ExtensionServer.prototype._onSetSidebarHeight):
              (WebInspector.ExtensionServer.prototype._onSetSidebarExpansion):
              (WebInspector.ExtensionServer.prototype._onLog):
              (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
              (WebInspector.ExtensionServer.prototype._onRevealAndSelect):
              (WebInspector.ExtensionServer.prototype._onRevealAndSelectResource):
              (WebInspector.ExtensionServer.prototype._dispatchCallback):
              (WebInspector.ExtensionServer.prototype._onGetResources):
              (WebInspector.ExtensionServer.prototype.initExtensions):
              (WebInspector.ExtensionServer.prototype._addExtensions):
              (WebInspector.ExtensionServer.prototype._onWindowMessage):
              (WebInspector.ExtensionServer.prototype._onmessage):
              (WebInspector.ExtensionServer.prototype._registerHandler):
              (WebInspector.ExtensionStatus):
              (WebInspector.addExtensions):
              * inspector/front-end/InjectedScript.js:
              (injectedScriptConstructor):
              * inspector/front-end/InjectedScriptAccess.js:
              * inspector/front-end/InspectorFrontendHostStub.js:
              (.WebInspector.InspectorFrontendHostStub.prototype.setExtensionAPI):
              (.WebInspector.InspectorFrontendHostStub.prototype.canAttachWindow):
              * inspector/front-end/WebKit.qrc:
              * inspector/front-end/inspector.html:
              * inspector/front-end/inspector.js:
              (WebInspector.loaded):
              (WebInspector.updateResource):
              (WebInspector.reset):
              (WebInspector.inspectedURLChanged):
              (WebInspector.didCommitLoad):
      
      2010-08-02  Andrey Kosyakov  <caseq@chromium.org>
      
              Reviewed by Pavel Feldman.
      
              Web Inspector: adding tests for WebInspector extensions API.
              https://bugs.webkit.org/show_bug.cgi?id=40425
      
              * http/tests/inspector/inspector-test.js:
              (dumpObject):
              * inspector/extensions-api-expected.txt: Added.
              * inspector/extensions-api.html: Added.
              * inspector/extensions-expected.txt: Added.
              * inspector/extensions-test.js: Added.
              (log):
              (frontend_initializeExtension):
              (doit):
              (done.callback):
              (done):
              (extensionFunctions):
              * inspector/extensions.html: Added.
              * inspector/resources/extension-main.html: Added.
              * inspector/resources/extension-main.js: Added.
              (fetchTests.callback):
              (fetchTests):
              (runTests):
              (onTestsDone):
              (runTest):
              (callbackAndNextTest.callbackWrapper):
              (callbackAndNextTest):
              (output):
              * inspector/resources/extension-panel.html: Added.
              * inspector/resources/extension-sidebar.html: Added.
              * platform/chromium/test_expectations.txt:
      
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a07f07f
  5. 17 Sep, 2008 1 commit
    • weinig@apple.com's avatar
      WebCore: · 930ed39e
      weinig@apple.com authored
      2008-09-17  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Adele Peterson.
      
              Patch for <rdar://problem/6133884> 
              Calling window.resizeTo() on a subframe shouldn't change the window size
      
              Test: fast/dom/Window/window-resize-and-move-sub-frame.html
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::moveBy):
              (WebCore::DOMWindow::moveTo):
              (WebCore::DOMWindow::resizeBy):
              (WebCore::DOMWindow::resizeTo):
      
      LayoutTests:
      
      2008-09-17  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Adele Peterson.
      
              Test for <rdar://problem/6133884> 
              Calling window.resizeTo() on a subframe shouldn't change the window size
      
              * fast/dom/Window/resources/blank.html: Added.
              * fast/dom/Window/window-resize-and-move-sub-frame-expected.txt: Added.
              * fast/dom/Window/window-resize-and-move-sub-frame.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      930ed39e
  6. 25 Jul, 2008 1 commit
  7. 25 Jan, 2007 1 commit