1. 19 May, 2013 1 commit
    • andersca@apple.com's avatar
      Remove link prerendering code · a82aee4a
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=116415
      
      Reviewed by Darin Adler.
      
      .:
      
      This code was only used by Chromium and is dead now.
      
      * Source/autotools/SetupWebKitFeatures.m4:
      * Source/cmake/WebKitFeatures.cmake:
      * Source/cmakeconfig.h.cmake:
      
      Source/JavaScriptCore:
      
      This code was only used by Chromium and is dead now.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebCore:
      
      * Configurations/FeatureDefines.xcconfig:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/Document.cpp:
      (WebCore::Document::Document):
      * dom/Document.h:
      (WebCore):
      (Document):
      * dom/EventNames.h:
      (WebCore):
      * html/HTMLLinkElement.cpp:
      * html/HTMLLinkElement.h:
      * html/LinkRelAttribute.cpp:
      (WebCore::LinkRelAttribute::LinkRelAttribute):
      * html/LinkRelAttribute.h:
      (LinkRelAttribute):
      * loader/LinkLoader.cpp:
      (WebCore::LinkLoader::~LinkLoader):
      (WebCore::LinkLoader::loadLink):
      (WebCore::LinkLoader::released):
      * loader/LinkLoader.h:
      (WebCore):
      (LinkLoader):
      * loader/LinkLoaderClient.h:
      (LinkLoaderClient):
      * loader/Prerenderer.cpp: Removed.
      * loader/Prerenderer.h: Removed.
      * loader/PrerendererClient.cpp: Removed.
      * loader/PrerendererClient.h: Removed.
      * platform/PrerenderClient.h: Removed.
      * platform/PrerenderHandle.h: Removed.
      
      Source/WebKit/blackberry:
      
      This code was only used by Chromium and is dead now.
      
      * WebCoreSupport/AboutDataEnableFeatures.in:
      
      Source/WebKit/mac:
      
      This code was only used by Chromium and is dead now.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebKit2:
      
      This code was only used by Chromium and is dead now.
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WTF:
      
      This code was only used by Chromium and is dead now.
      
      * wtf/FeatureDefines.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a82aee4a
  2. 25 Apr, 2013 1 commit
  3. 31 Mar, 2013 1 commit
    • rafaelw@chromium.org's avatar
      HTMLLinkElement should resolve resource URLs when resources will be fetched · cc2132a3
      rafaelw@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113630
      
      Source/WebCore:
      
      HTMLLinkElement was resolving its URL when the href attribute was processed and caching it without ever
      invalidating the cached URL. This patch removes the cached URL and adds getURL() which resolve the
      URL dynamically.
      
      Reviewed by Eric Seidel.
      
      Test: fast/dom/HTMLLinkElement/resolve-url-on-insertion.html
      
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::getURL):
      (WebCore):
      (WebCore::HTMLLinkElement::parseAttribute):
      (WebCore::HTMLLinkElement::shouldLoadLink):
      (WebCore::HTMLLinkElement::process):
      * html/HTMLLinkElement.h:
      (HTMLLinkElement):
      
      LayoutTests:
      
      Reviewed by Eric Seidel.
      
      * fast/dom/HTMLLinkElement/resolve-url-on-insertion-expected.txt: Added.
      * fast/dom/HTMLLinkElement/resolve-url-on-insertion.html: Added.
      * fast/dom/HTMLLinkElement/resources/stylesheet2.css: Added.
      (#test2):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc2132a3
  4. 29 Mar, 2013 1 commit
    • keishi@webkit.org's avatar
      Add the event handler content attributes that are defined in the spec to HTMLElement · b61c383f
      keishi@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=86363
      
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      Test: fast/events/event-attribute.html
      
      We are missing some event handler content attributes from HTMLElement that are defined in the spec.
      http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#event-handlers-on-elements,-document-objects,-and-window-objects
      
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::eventNameForAttributeName): Returns event name for a given attribute name by looking it up on a HashMap.
      (WebCore::HTMLElement::parseAttribute): Sets up event listeners for content attributes.
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::parseAttribute): Removed event listener content attributes that was added to HTMLElement.
      * html/HTMLFrameElementBase.cpp:
      (WebCore::HTMLFrameElementBase::parseAttribute): Ditto.
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::parseAttribute): Ditto.
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::parseAttribute): Ditto.
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::parseAttribute): Ditto.
      * html/HTMLScriptElement.cpp:
      (WebCore::HTMLScriptElement::parseAttribute): Ditto.
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::parseAttribute): Ditto.
      * html/HTMLStyleElement.cpp:
      (WebCore::HTMLStyleElement::parseAttribute): Ditto.
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::parseAttribute): Ditto.
      * html/HTMLTrackElement.cpp:
      (WebCore::HTMLTrackElement::parseAttribute): Ditto.
      
      LayoutTests:
      
      * fast/events/event-attribute-expected.txt: Added.
      * fast/events/event-attribute.html: Added. Tests that setting attribute creates event listeners.
      * fast/events/form-onchange-expected.txt: Added.
      * fast/events/form-onchange.html: Added. Test for Bug 24516.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b61c383f
  5. 19 Mar, 2013 1 commit
    • ggaren@apple.com's avatar
      Refactored script content removal in the fragment parser for clarity and speed · 3a37a142
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112734
      
      Reviewed by Enrica Casucci.
      
      Source/WebCore: 
      
      * WebCore.exp.in: Export!
      
      * dom/DocumentFragment.cpp:
      (WebCore::DocumentFragment::parseHTML):
      (WebCore::DocumentFragment::parseXML):
      * dom/DocumentFragment.h:
      (DocumentFragment): Updated for rename of FragmentScriptingPermission to
      ParserContentPolicy.
      
      * dom/Element.cpp:
      (WebCore::isEventHandlerAttribute):
      (WebCore::Element::isJavaScriptURLAttribute):
      (WebCore::Element::isJavaScriptAttribute): Fixed a FIXME by factoring
      out some helper functions that reuse isURLAttribute(). This makes our
      attribute removal slightly more precise, as reflected in test changes.
      
      (WebCore::Element::stripJavaScriptAttributes): Factored this function out
      of parserSetAttributes to clarify that the parser is responsible for
      fully removing scripts before inserting anything into the DOM.
      
      Now that this is a helper function, we can avoid doing any work in the
      common case, where script content is allowed. Also, when we do have to
      strip attributes, we use "two finger compaction" to avoid copying the
      vector, and to avoid O(N) vector removal operations when there is
      something to remove.
      
      (WebCore::Element::parserSetAttributes):
      * dom/Element.h:
      
      * dom/FragmentScriptingPermission.h:
      (WebCore::scriptingContentIsAllowed):
      (WebCore::disallowScriptingContent):
      (WebCore::pluginContentIsAllowed):
      (WebCore::allowPluginContent): Renamed for clarity, and added some helper
      functions for reading values out of this enum.
      
      * dom/ScriptableDocumentParser.cpp:
      (WebCore::ScriptableDocumentParser::ScriptableDocumentParser): Moved
      a settings check into the parser constructor so we're sure that all
      clients get the right behavior.
      
      * dom/ScriptableDocumentParser.h:
      (WebCore::ScriptableDocumentParser::parserContentPolicy):
      (ScriptableDocumentParser):
      * editing/markup.cpp:
      (WebCore::createFragmentFromMarkup):
      (WebCore::createFragmentFromMarkupWithContext):
      (WebCore::createFragmentForInnerOuterHTML):
      (WebCore::createContextualFragment):
      * editing/markup.h: Updated for renames.
      
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::isURLAttribute): Fixed a bug where
      isURLAttribute would ignore href attributes in other namespaces, like
      xlink:href.
      
      * html/HTMLBaseElement.cpp:
      (WebCore::HTMLBaseElement::isURLAttribute): Same bug.
      
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::isURLAttribute): Fixed a logic error where HTMLElement
      wouldn't call through to its base class.
      
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::isURLAttribute): Same isURLAttribute namespace
      bug as above.
      
      * html/parser/HTMLConstructionSite.cpp:
      (WebCore::setAttributes): Helper function for optionally stripping
      disallowed attributes before setting them on an element. This helps all
      clients get the right behavior without sprinkling checks everywhere.
      
      (WebCore::HTMLConstructionSite::HTMLConstructionSite):
      (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
      
      (WebCore::HTMLConstructionSite::insertScriptElement): Don't schedule the
      element for insertion into the document if the element is forbidden. This
      is slightly clearer than leaving an empty forbidden element in the document.
      
      (WebCore::HTMLConstructionSite::createElement):
      (WebCore::HTMLConstructionSite::createHTMLElement):
      * html/parser/HTMLConstructionSite.h:
      (HTMLConstructionSite):
      (WebCore::HTMLConstructionSite::parserContentPolicy):
      * html/parser/HTMLDocumentParser.cpp:
      (WebCore::HTMLDocumentParser::HTMLDocumentParser):
      (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder):
      (WebCore::HTMLDocumentParser::parseDocumentFragment):
      * html/parser/HTMLDocumentParser.h:
      (HTMLDocumentParser):
      (WebCore::HTMLDocumentParser::create):
      * html/parser/HTMLTreeBuilder.cpp:
      (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
      (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
      Updated for renames and interface changes above.
      
      (WebCore::HTMLTreeBuilder::processStartTagForInBody):
      (WebCore::HTMLTreeBuilder::processEndTag): Removed isParsingFragment()
      checks to make it possible to use ParserContentPolicy in more places.
      
      Removed call to removeChildren() because, if an element is forbidden,
      we fully remove the element now. This brings behavior for <script>
      elements in line with behavior for plug-in elements. It also brings
      behavior of the HTML parser in line with behavior of the XML parser.
      
      * html/parser/HTMLTreeBuilder.h:
      (WebCore::HTMLTreeBuilder::create):
      (FragmentParsingContext):
      (WebCore::HTMLTreeBuilder::FragmentParsingContext::contextElement):
      * platform/blackberry/PasteboardBlackBerry.cpp:
      (WebCore::Pasteboard::documentFragment):
      * platform/chromium/DragDataChromium.cpp:
      (WebCore::DragData::asFragment):
      * platform/chromium/PasteboardChromium.cpp:
      (WebCore::Pasteboard::documentFragment):
      * platform/gtk/PasteboardGtk.cpp:
      (WebCore::Pasteboard::documentFragment):
      * platform/mac/PasteboardMac.mm:
      (WebCore::Pasteboard::documentFragment):
      * platform/qt/DragDataQt.cpp:
      (WebCore::DragData::asFragment):
      * platform/qt/PasteboardQt.cpp:
      (WebCore::Pasteboard::documentFragment):
      * platform/win/ClipboardUtilitiesWin.cpp:
      (WebCore::fragmentFromCFHTML):
      (WebCore::fragmentFromHTML):
      * platform/wx/PasteboardWx.cpp:
      (WebCore::Pasteboard::documentFragment): Updated for renames and interface
      changes.
      
      * svg/SVGAElement.cpp:
      (WebCore::SVGAElement::isURLAttribute): Fixed a bug where SVG anchor
      elements didn't identify their URL attributes.
      
      * svg/SVGAElement.h:
      (SVGAElement):
      
      * xml/XMLErrors.cpp:
      (WebCore::createXHTMLParserErrorHeader):
      (WebCore::XMLErrors::insertErrorMessageBlock): No need to disallow
      scripting attributes here because we're creating the attributes 
      ourselves and we know they're not scripting attributes.
      
      * xml/parser/XMLDocumentParser.cpp:
      (WebCore::XMLDocumentParser::parseDocumentFragment):
      * xml/parser/XMLDocumentParser.h:
      (WebCore::XMLDocumentParser::create):
      (XMLDocumentParser): Updated for renames and interface changes above.
      
      Removed the 8 inline capacity in the attribute vector so we could share
      helper functions with the HTML parser, which didn't have it.
      
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      (WebCore::setAttributes):
      (WebCore):
      (WebCore::XMLDocumentParser::XMLDocumentParser):
      (WebCore::handleNamespaceAttributes):
      (WebCore::handleElementAttributes):
      (WebCore::XMLDocumentParser::startElementNs):
      (WebCore::XMLDocumentParser::endElementNs):
      * xml/parser/XMLDocumentParserQt.cpp:
      (WebCore::setAttributes):
      (WebCore):
      (WebCore::XMLDocumentParser::XMLDocumentParser):
      (WebCore::handleNamespaceAttributes):
      (WebCore::handleElementAttributes):
      (WebCore::XMLDocumentParser::parseStartElement):
      (WebCore::XMLDocumentParser::parseEndElement): Same changes as for the
      HTML parser.
      
      LayoutTests: 
      
      Updated tests to improve coverage and reflect behavior tweaks to improve
      clarity.
      
      * editing/pasteboard/paste-noscript-expected.txt: 
          - The "href", "source", and "action" attributes are fully removed now,
          instead of being set to the empty string, because for clarity we
          fully remove script attributes instead of setting their values to
          the empty string.
      
          - The "formaction" attribute on the form control is not removed because,
          even though it seems to contain javascript content, the formaction
          attribute doesn't map to anything on a form element, and won't ever
          run as script.
      
          - I added a button with a "formaction" attribute, to verify that it
          does get stripped, since this is the case where the "formaction"
          attribute can run as script.
      
      * editing/pasteboard/paste-noscript-svg-expected.txt:
          - The "xlink:href" attribute is fully removed now. See above.
      
      * editing/pasteboard/paste-noscript-xhtml-expected.txt:
      * editing/pasteboard/paste-noscript.html:
          - The "href", "source", and "action" attributes are fully removed now.
          See above.
      
          - The <script> element is fully removed now. See above.
      
          - The "formaction" attribute on the form control is not removed.
          See above.
      
          - I added a button with a "formaction" attribute. See above.
      
      
      * editing/pasteboard/paste-visible-script-expected.txt:
          - The <script> elements are fully removed now. See above.
      
      * editing/pasteboard/resources/paste-noscript-content.html:
          - The "formaction" attribute on the form control is not removed.
          See above.
      
          - I added a button with a "formaction" attribute. See above.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3a37a142
  6. 08 Dec, 2012 1 commit
    • gavinp@chromium.org's avatar
      Add status events on <link rel=prerender> elements. · c62cd107
      gavinp@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96474
      
      Reviewed by Adam Barth.
      
      The new PrerenderStatusEvent is sent to link elements when
      prerenders are started by the embedder, and also sent when they
      are stopped. Pages using this feature can now serialize launching
      prerenders, and track timing performance.
      
      Source/Platform:
      
      * chromium/public/WebPrerender.h:
      (WebKit::WebPrerender::WebPrerender):
      (WebKit::WebPrerender::operator=):
      (WebPrerender):
      
      Source/WebCore:
      
      Tested in a new WebKitUnitTest for the chromium port.
      
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/EventNames.h:
      (WebCore):
      * html/HTMLLinkElement.cpp:
      (WebCore):
      (WebCore::HTMLLinkElement::didStartLinkPrerender):
      (WebCore::HTMLLinkElement::didStopLinkPrerender):
      (WebCore::HTMLLinkElement::didSendLoadForLinkPrerender):
      (WebCore::HTMLLinkElement::didSendDOMContentLoadedForLinkPrerender):
      * html/HTMLLinkElement.h:
      (HTMLLinkElement):
      * loader/LinkLoader.cpp:
      (WebCore::LinkLoader::didStartPrerender):
      (WebCore):
      (WebCore::LinkLoader::didStopPrerender):
      (WebCore::LinkLoader::didSendLoadForPrerender):
      (WebCore::LinkLoader::didSendDOMContentLoadedForPrerender):
      (WebCore::LinkLoader::loadLink):
      * loader/LinkLoader.h:
      (LinkLoader):
      * loader/LinkLoaderClient.h:
      (LinkLoaderClient):
      * loader/Prerenderer.cpp:
      (WebCore::Prerenderer::render):
      * loader/Prerenderer.h:
      (WebCore):
      (Prerenderer):
      * platform/PrerenderClient.h: Copied from Source/WebCore/loader/LinkLoaderClient.h.
      (WebCore):
      (PrerenderClient):
      (WebCore::PrerenderClient::~PrerenderClient):
      * platform/PrerenderHandle.h:
      (WebCore):
      (PrerenderHandle):
      * platform/chromium/Prerender.cpp:
      (WebCore::Prerender::Prerender):
      (WebCore::Prerender::removeClient):
      (WebCore):
      (WebCore::Prerender::add):
      (WebCore::Prerender::cancel):
      (WebCore::Prerender::abandon):
      (WebCore::Prerender::didStartPrerender):
      (WebCore::Prerender::didStopPrerender):
      (WebCore::Prerender::didSendLoadForPrerender):
      (WebCore::Prerender::didSendDOMContentLoadedForPrerender):
      * platform/chromium/Prerender.h:
      (WebKit):
      (WebCore):
      (Prerender):
      * platform/chromium/PrerenderHandle.cpp:
      (WebCore::PrerenderHandle::create):
      (WebCore::PrerenderHandle::PrerenderHandle):
      (WebCore::PrerenderHandle::~PrerenderHandle):
      (WebCore::PrerenderHandle::removeClient):
      (WebCore):
      * platform/chromium/support/WebPrerender.cpp:
      (WebKit::WebPrerender::toPrerender):
      (WebKit):
      (WebKit::WebPrerender::assign):
      (WebKit::WebPrerender::isNull):
      (WebKit::WebPrerender::didStartPrerender):
      (WebKit::WebPrerender::didStopPrerender):
      (WebKit::WebPrerender::didSendLoadForPrerender):
      (WebKit::WebPrerender::didSendDOMContentLoadedForPrerender):
      
      Source/WebKit/chromium:
      
      * WebKit.gyp:
      * WebKit.gypi:
      * tests/FrameTestHelpers.cpp:
      (WebKit::FrameTestHelpers::createWebView):
      (FrameTestHelpers):
      (WebKit::FrameTestHelpers::createWebViewAndLoad):
      * tests/FrameTestHelpers.h:
      (FrameTestHelpers):
      * tests/PrerenderingTest.cpp: Added.
      * tests/data/prerender/multiple_prerenders.html: Added.
      * tests/data/prerender/single_prerender.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c62cd107
  7. 18 Nov, 2012 1 commit
    • akling@apple.com's avatar
      Element::parseAttribute() should take name & value as separate arguments. · 43e9d04c
      akling@apple.com authored
      <http://webkit.org/b/102608>
      
      Reviewed by Antti Koivisto.
      
      Update the signature of parseAttribute() to take a QualifiedName/AtomicString combo instead
      of an Attribute. This lets us pass avoid refcount churn in Element::attributeChanged() since
      creating a temporary Attribute is no longer necessary.
      
      This was surprisingly hot (~1%) on the DOM/CreateNodes performance test.
      
      * bindings/js/ScriptEventListener.cpp:
      (WebCore::createAttributeEventListener):
      * bindings/js/ScriptEventListener.h:
      (WebCore):
      * bindings/v8/ScriptEventListener.cpp:
      (WebCore::createAttributeEventListener):
      * bindings/v8/ScriptEventListener.h:
      (WebCore):
      * dom/Element.cpp:
      (WebCore::Element::attributeChanged):
      (WebCore::Element::parseAttribute):
      * dom/Element.h:
      (Element):
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::parseAttribute):
      * dom/StyledElement.h:
      (StyledElement):
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::parseAttribute):
      * html/HTMLAnchorElement.h:
      (HTMLAnchorElement):
      * html/HTMLAppletElement.cpp:
      (WebCore::HTMLAppletElement::parseAttribute):
      * html/HTMLAppletElement.h:
      (HTMLAppletElement):
      * html/HTMLAreaElement.cpp:
      (WebCore::HTMLAreaElement::parseAttribute):
      * html/HTMLAreaElement.h:
      (HTMLAreaElement):
      * html/HTMLBaseElement.cpp:
      (WebCore::HTMLBaseElement::parseAttribute):
      * html/HTMLBaseElement.h:
      (HTMLBaseElement):
      * html/HTMLBodyElement.cpp:
      (WebCore::HTMLBodyElement::parseAttribute):
      * html/HTMLBodyElement.h:
      (HTMLBodyElement):
      * html/HTMLButtonElement.cpp:
      (WebCore::HTMLButtonElement::parseAttribute):
      * html/HTMLButtonElement.h:
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::parseAttribute):
      * html/HTMLCanvasElement.h:
      (HTMLCanvasElement):
      * html/HTMLDetailsElement.cpp:
      (WebCore::HTMLDetailsElement::parseAttribute):
      * html/HTMLDetailsElement.h:
      (HTMLDetailsElement):
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::parseAttribute):
      (WebCore::HTMLElement::dirAttributeChanged):
      * html/HTMLElement.h:
      (HTMLElement):
      * html/HTMLEmbedElement.cpp:
      (WebCore::HTMLEmbedElement::parseAttribute):
      * html/HTMLEmbedElement.h:
      (HTMLEmbedElement):
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::parseAttribute):
      * html/HTMLFormControlElement.h:
      (HTMLFormControlElement):
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::parseAttribute):
      * html/HTMLFormElement.h:
      (HTMLFormElement):
      * html/HTMLFrameElement.cpp:
      (WebCore::HTMLFrameElement::parseAttribute):
      * html/HTMLFrameElement.h:
      (HTMLFrameElement):
      * html/HTMLFrameElementBase.cpp:
      (WebCore::HTMLFrameElementBase::parseAttribute):
      * html/HTMLFrameElementBase.h:
      (HTMLFrameElementBase):
      * html/HTMLFrameSetElement.cpp:
      (WebCore::HTMLFrameSetElement::parseAttribute):
      * html/HTMLFrameSetElement.h:
      (HTMLFrameSetElement):
      * html/HTMLIFrameElement.cpp:
      (WebCore::HTMLIFrameElement::parseAttribute):
      * html/HTMLIFrameElement.h:
      (HTMLIFrameElement):
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::parseAttribute):
      * html/HTMLImageElement.h:
      (HTMLImageElement):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::parseAttribute):
      (WebCore::HTMLInputElement::parseMaxLengthAttribute):
      * html/HTMLInputElement.h:
      (HTMLInputElement):
      * html/HTMLKeygenElement.cpp:
      (WebCore::HTMLKeygenElement::parseAttribute):
      * html/HTMLKeygenElement.h:
      (HTMLKeygenElement):
      * html/HTMLLIElement.cpp:
      (WebCore::HTMLLIElement::parseAttribute):
      * html/HTMLLIElement.h:
      (HTMLLIElement):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::parseAttribute):
      * html/HTMLLinkElement.h:
      (HTMLLinkElement):
      * html/HTMLMapElement.cpp:
      (WebCore::HTMLMapElement::parseAttribute):
      * html/HTMLMapElement.h:
      (HTMLMapElement):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::parseAttribute):
      * html/HTMLMediaElement.h:
      * html/HTMLMetaElement.cpp:
      (WebCore::HTMLMetaElement::parseAttribute):
      * html/HTMLMetaElement.h:
      (HTMLMetaElement):
      * html/HTMLMeterElement.cpp:
      (WebCore::HTMLMeterElement::parseAttribute):
      * html/HTMLMeterElement.h:
      (HTMLMeterElement):
      * html/HTMLOListElement.cpp:
      (WebCore::HTMLOListElement::parseAttribute):
      * html/HTMLOListElement.h:
      (HTMLOListElement):
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::parseAttribute):
      * html/HTMLObjectElement.h:
      (HTMLObjectElement):
      * html/HTMLOptGroupElement.cpp:
      (WebCore::HTMLOptGroupElement::parseAttribute):
      * html/HTMLOptGroupElement.h:
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::parseAttribute):
      * html/HTMLOptionElement.h:
      (HTMLOptionElement):
      * html/HTMLOutputElement.cpp:
      (WebCore::HTMLOutputElement::parseAttribute):
      * html/HTMLOutputElement.h:
      (HTMLOutputElement):
      * html/HTMLProgressElement.cpp:
      (WebCore::HTMLProgressElement::parseAttribute):
      * html/HTMLProgressElement.h:
      * html/HTMLScriptElement.cpp:
      (WebCore::HTMLScriptElement::parseAttribute):
      * html/HTMLScriptElement.h:
      (HTMLScriptElement):
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::parseAttribute):
      (WebCore::HTMLSelectElement::parseMultipleAttribute):
      * html/HTMLSelectElement.h:
      * html/HTMLStyleElement.cpp:
      (WebCore::HTMLStyleElement::parseAttribute):
      * html/HTMLStyleElement.h:
      (HTMLStyleElement):
      * html/HTMLTableCellElement.cpp:
      (WebCore::HTMLTableCellElement::parseAttribute):
      * html/HTMLTableCellElement.h:
      (HTMLTableCellElement):
      * html/HTMLTableColElement.cpp:
      (WebCore::HTMLTableColElement::parseAttribute):
      * html/HTMLTableColElement.h:
      (HTMLTableColElement):
      * html/HTMLTableElement.cpp:
      (WebCore::HTMLTableElement::parseAttribute):
      * html/HTMLTableElement.h:
      (HTMLTableElement):
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::parseAttribute):
      * html/HTMLTextAreaElement.h:
      (HTMLTextAreaElement):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::parseAttribute):
      * html/HTMLTextFormControlElement.h:
      (HTMLTextFormControlElement):
      * html/HTMLTrackElement.cpp:
      (WebCore::HTMLTrackElement::parseAttribute):
      * html/HTMLTrackElement.h:
      (HTMLTrackElement):
      * html/HTMLVideoElement.cpp:
      (WebCore::HTMLVideoElement::parseAttribute):
      * html/HTMLVideoElement.h:
      (HTMLVideoElement):
      * html/shadow/HTMLContentElement.cpp:
      (WebCore::HTMLContentElement::parseAttribute):
      * html/shadow/HTMLContentElement.h:
      (HTMLContentElement):
      * mathml/MathMLElement.cpp:
      (WebCore::MathMLElement::parseAttribute):
      * mathml/MathMLElement.h:
      (MathMLElement):
      * svg/SVGAElement.cpp:
      (WebCore::SVGAElement::parseAttribute):
      * svg/SVGAElement.h:
      (SVGAElement):
      * svg/SVGAnimateMotionElement.cpp:
      (WebCore::SVGAnimateMotionElement::parseAttribute):
      * svg/SVGAnimateMotionElement.h:
      (SVGAnimateMotionElement):
      * svg/SVGAnimateTransformElement.cpp:
      (WebCore::SVGAnimateTransformElement::parseAttribute):
      * svg/SVGAnimateTransformElement.h:
      (SVGAnimateTransformElement):
      * svg/SVGAnimationElement.cpp:
      (WebCore::SVGAnimationElement::parseAttribute):
      * svg/SVGAnimationElement.h:
      (SVGAnimationElement):
      * svg/SVGCircleElement.cpp:
      (WebCore::SVGCircleElement::parseAttribute):
      * svg/SVGCircleElement.h:
      (SVGCircleElement):
      * svg/SVGClipPathElement.cpp:
      (WebCore::SVGClipPathElement::parseAttribute):
      * svg/SVGClipPathElement.h:
      (SVGClipPathElement):
      * svg/SVGComponentTransferFunctionElement.cpp:
      (WebCore::SVGComponentTransferFunctionElement::parseAttribute):
      * svg/SVGComponentTransferFunctionElement.h:
      (SVGComponentTransferFunctionElement):
      * svg/SVGCursorElement.cpp:
      (WebCore::SVGCursorElement::parseAttribute):
      * svg/SVGCursorElement.h:
      (SVGCursorElement):
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::reportAttributeParsingError):
      (WebCore::SVGElement::parseAttribute):
      * svg/SVGElement.h:
      (SVGElement):
      * svg/SVGEllipseElement.cpp:
      (WebCore::SVGEllipseElement::parseAttribute):
      * svg/SVGEllipseElement.h:
      (SVGEllipseElement):
      * svg/SVGExternalResourcesRequired.cpp:
      (WebCore::SVGExternalResourcesRequired::parseAttribute):
      * svg/SVGExternalResourcesRequired.h:
      (SVGExternalResourcesRequired):
      * svg/SVGFEBlendElement.cpp:
      (WebCore::SVGFEBlendElement::parseAttribute):
      * svg/SVGFEBlendElement.h:
      (SVGFEBlendElement):
      * svg/SVGFEColorMatrixElement.cpp:
      (WebCore::SVGFEColorMatrixElement::parseAttribute):
      * svg/SVGFEColorMatrixElement.h:
      (SVGFEColorMatrixElement):
      * svg/SVGFEComponentTransferElement.cpp:
      (WebCore::SVGFEComponentTransferElement::parseAttribute):
      * svg/SVGFEComponentTransferElement.h:
      (SVGFEComponentTransferElement):
      * svg/SVGFECompositeElement.cpp:
      (WebCore::SVGFECompositeElement::parseAttribute):
      * svg/SVGFECompositeElement.h:
      (SVGFECompositeElement):
      * svg/SVGFEConvolveMatrixElement.cpp:
      (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
      * svg/SVGFEConvolveMatrixElement.h:
      (SVGFEConvolveMatrixElement):
      * svg/SVGFEDiffuseLightingElement.cpp:
      (WebCore::SVGFEDiffuseLightingElement::parseAttribute):
      * svg/SVGFEDiffuseLightingElement.h:
      (SVGFEDiffuseLightingElement):
      * svg/SVGFEDisplacementMapElement.cpp:
      (WebCore::SVGFEDisplacementMapElement::parseAttribute):
      * svg/SVGFEDisplacementMapElement.h:
      (SVGFEDisplacementMapElement):
      * svg/SVGFEDropShadowElement.cpp:
      (WebCore::SVGFEDropShadowElement::parseAttribute):
      * svg/SVGFEDropShadowElement.h:
      (SVGFEDropShadowElement):
      * svg/SVGFEGaussianBlurElement.cpp:
      (WebCore::SVGFEGaussianBlurElement::parseAttribute):
      * svg/SVGFEGaussianBlurElement.h:
      (SVGFEGaussianBlurElement):
      * svg/SVGFEImageElement.cpp:
      (WebCore::SVGFEImageElement::parseAttribute):
      * svg/SVGFEImageElement.h:
      (SVGFEImageElement):
      * svg/SVGFELightElement.cpp:
      (WebCore::SVGFELightElement::parseAttribute):
      * svg/SVGFELightElement.h:
      (SVGFELightElement):
      * svg/SVGFEMergeNodeElement.cpp:
      (WebCore::SVGFEMergeNodeElement::parseAttribute):
      * svg/SVGFEMergeNodeElement.h:
      (SVGFEMergeNodeElement):
      * svg/SVGFEMorphologyElement.cpp:
      (WebCore::SVGFEMorphologyElement::parseAttribute):
      * svg/SVGFEMorphologyElement.h:
      (SVGFEMorphologyElement):
      * svg/SVGFEOffsetElement.cpp:
      (WebCore::SVGFEOffsetElement::parseAttribute):
      * svg/SVGFEOffsetElement.h:
      (SVGFEOffsetElement):
      * svg/SVGFESpecularLightingElement.cpp:
      (WebCore::SVGFESpecularLightingElement::parseAttribute):
      * svg/SVGFESpecularLightingElement.h:
      (SVGFESpecularLightingElement):
      * svg/SVGFETileElement.cpp:
      (WebCore::SVGFETileElement::parseAttribute):
      * svg/SVGFETileElement.h:
      (SVGFETileElement):
      * svg/SVGFETurbulenceElement.cpp:
      (WebCore::SVGFETurbulenceElement::parseAttribute):
      * svg/SVGFETurbulenceElement.h:
      (SVGFETurbulenceElement):
      * svg/SVGFilterElement.cpp:
      (WebCore::SVGFilterElement::parseAttribute):
      * svg/SVGFilterElement.h:
      (SVGFilterElement):
      * svg/SVGFilterPrimitiveStandardAttributes.cpp:
      (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
      * svg/SVGFilterPrimitiveStandardAttributes.h:
      (SVGFilterPrimitiveStandardAttributes):
      * svg/SVGFitToViewBox.h:
      (WebCore::SVGFitToViewBox::parseAttribute):
      * svg/SVGFontFaceElement.cpp:
      (WebCore::SVGFontFaceElement::parseAttribute):
      * svg/SVGFontFaceElement.h:
      (SVGFontFaceElement):
      * svg/SVGFontFaceUriElement.cpp:
      (WebCore::SVGFontFaceUriElement::parseAttribute):
      * svg/SVGFontFaceUriElement.h:
      (SVGFontFaceUriElement):
      * svg/SVGForeignObjectElement.cpp:
      (WebCore::SVGForeignObjectElement::parseAttribute):
      * svg/SVGForeignObjectElement.h:
      (SVGForeignObjectElement):
      * svg/SVGGElement.cpp:
      (WebCore::SVGGElement::parseAttribute):
      * svg/SVGGElement.h:
      (SVGGElement):
      * svg/SVGGlyphElement.cpp:
      (WebCore::SVGGlyphElement::parseAttribute):
      * svg/SVGGlyphElement.h:
      (SVGGlyphElement):
      * svg/SVGGlyphRefElement.cpp:
      (WebCore::SVGGlyphRefElement::parseAttribute):
      * svg/SVGGlyphRefElement.h:
      * svg/SVGGradientElement.cpp:
      (WebCore::SVGGradientElement::parseAttribute):
      * svg/SVGGradientElement.h:
      * svg/SVGImageElement.cpp:
      (WebCore::SVGImageElement::parseAttribute):
      * svg/SVGImageElement.h:
      (SVGImageElement):
      * svg/SVGLangSpace.cpp:
      (WebCore::SVGLangSpace::parseAttribute):
      * svg/SVGLangSpace.h:
      (SVGLangSpace):
      * svg/SVGLineElement.cpp:
      (WebCore::SVGLineElement::parseAttribute):
      * svg/SVGLineElement.h:
      (SVGLineElement):
      * svg/SVGLinearGradientElement.cpp:
      (WebCore::SVGLinearGradientElement::parseAttribute):
      * svg/SVGLinearGradientElement.h:
      (SVGLinearGradientElement):
      * svg/SVGMPathElement.cpp:
      (WebCore::SVGMPathElement::parseAttribute):
      * svg/SVGMPathElement.h:
      (SVGMPathElement):
      * svg/SVGMarkerElement.cpp:
      (WebCore::SVGMarkerElement::parseAttribute):
      * svg/SVGMarkerElement.h:
      (SVGMarkerElement):
      * svg/SVGMaskElement.cpp:
      (WebCore::SVGMaskElement::parseAttribute):
      * svg/SVGMaskElement.h:
      (SVGMaskElement):
      * svg/SVGPathElement.cpp:
      (WebCore::SVGPathElement::parseAttribute):
      * svg/SVGPathElement.h:
      (SVGPathElement):
      * svg/SVGPatternElement.cpp:
      (WebCore::SVGPatternElement::parseAttribute):
      * svg/SVGPatternElement.h:
      (SVGPatternElement):
      * svg/SVGPolyElement.cpp:
      (WebCore::SVGPolyElement::parseAttribute):
      * svg/SVGPolyElement.h:
      (SVGPolyElement):
      * svg/SVGRadialGradientElement.cpp:
      (WebCore::SVGRadialGradientElement::parseAttribute):
      * svg/SVGRadialGradientElement.h:
      (SVGRadialGradientElement):
      * svg/SVGRectElement.cpp:
      (WebCore::SVGRectElement::parseAttribute):
      * svg/SVGRectElement.h:
      (SVGRectElement):
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::parseAttribute):
      * svg/SVGSVGElement.h:
      (SVGSVGElement):
      * svg/SVGScriptElement.cpp:
      (WebCore::SVGScriptElement::parseAttribute):
      * svg/SVGScriptElement.h:
      (SVGScriptElement):
      * svg/SVGStopElement.cpp:
      (WebCore::SVGStopElement::parseAttribute):
      * svg/SVGStopElement.h:
      (SVGStopElement):
      * svg/SVGStyleElement.cpp:
      (WebCore::SVGStyleElement::parseAttribute):
      * svg/SVGStyleElement.h:
      (SVGStyleElement):
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::parseAttribute):
      * svg/SVGStyledElement.h:
      (SVGStyledElement):
      * svg/SVGStyledTransformableElement.cpp:
      (WebCore::SVGStyledTransformableElement::parseAttribute):
      * svg/SVGStyledTransformableElement.h:
      (SVGStyledTransformableElement):
      * svg/SVGSymbolElement.cpp:
      (WebCore::SVGSymbolElement::parseAttribute):
      * svg/SVGSymbolElement.h:
      (SVGSymbolElement):
      * svg/SVGTRefElement.cpp:
      (WebCore::SVGTRefElement::parseAttribute):
      * svg/SVGTRefElement.h:
      (SVGTRefElement):
      * svg/SVGTests.cpp:
      (WebCore::SVGTests::parseAttribute):
      * svg/SVGTests.h:
      (SVGTests):
      * svg/SVGTextContentElement.cpp:
      (WebCore::SVGTextContentElement::parseAttribute):
      * svg/SVGTextContentElement.h:
      (SVGTextContentElement):
      * svg/SVGTextElement.cpp:
      (WebCore::SVGTextElement::parseAttribute):
      * svg/SVGTextElement.h:
      (SVGTextElement):
      * svg/SVGTextPathElement.cpp:
      (WebCore::SVGTextPathElement::parseAttribute):
      * svg/SVGTextPathElement.h:
      * svg/SVGTextPositioningElement.cpp:
      (WebCore::SVGTextPositioningElement::parseAttribute):
      * svg/SVGTextPositioningElement.h:
      (SVGTextPositioningElement):
      * svg/SVGURIReference.cpp:
      (WebCore::SVGURIReference::parseAttribute):
      * svg/SVGURIReference.h:
      (SVGURIReference):
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::parseAttribute):
      * svg/SVGUseElement.h:
      (SVGUseElement):
      * svg/SVGViewElement.cpp:
      (WebCore::SVGViewElement::parseAttribute):
      * svg/SVGViewElement.h:
      (SVGViewElement):
      * svg/SVGZoomAndPan.h:
      (WebCore::SVGZoomAndPan::parseAttribute):
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::SVGSMILElement::parseAttribute):
      * svg/animation/SVGSMILElement.h:
      (SVGSMILElement):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      43e9d04c
  8. 16 Nov, 2012 1 commit
    • commit-queue@webkit.org's avatar
      Add initiator to CachedResourceRequest. · 864dbdad
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=101935
      
      Patch by Marja Hölttä <marja@chromium.org> on 2012-11-16
      Reviewed by Adam Barth.
      
      Motivation: Chromium needs to know which elements request a
      resource (such as an image or a script) (bug 92761). In addition,
      for exposing resource timing information (bug 84883) we need to
      store the initiator, and this is the first step towards it.
      
      No new tests: No visible change in behavior.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSCursorImageValue.cpp:
      (WebCore::CSSCursorImageValue::cachedImage):
      * css/CSSFontFaceSrcValue.cpp:
      (WebCore::CSSFontFaceSrcValue::cachedFont):
      * css/CSSImageSetValue.cpp:
      (WebCore::CSSImageSetValue::cachedImageSet):
      * css/CSSImageValue.cpp:
      (WebCore::CSSImageValue::cachedImage):
      * css/CSSImageValue.h:
      (WebCore):
      (CSSImageValue):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::loadPendingImage):
      * css/StyleRuleImport.cpp:
      (WebCore::StyleRuleImport::requestStyleSheet):
      * css/WebKitCSSSVGDocumentValue.cpp:
      (WebCore::WebKitCSSSVGDocumentValue::load):
      * css/WebKitCSSShaderValue.cpp:
      (WebCore::WebKitCSSShaderValue::cachedShader):
      * dom/ScriptElement.cpp:
      (WebCore::ScriptElement::requestScript):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::process):
      * html/parser/CSSPreloadScanner.cpp:
      (WebCore::CSSPreloadScanner::emitRule):
      * html/parser/CSSPreloadScanner.h:
      (CSSPreloadScanner):
      * html/parser/HTMLPreloadScanner.cpp:
      (WebCore::PreloadTask::preload):
      * loader/ImageLoader.cpp:
      (WebCore::ImageLoader::updateFromElement):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::requestImage):
      (WebCore::CachedResourceLoader::requestResource):
      (WebCore::CachedResourceLoader::determineRevalidationPolicy):
      (WebCore):
      (WebCore::CachedResourceLoader::preload):
      * loader/cache/CachedResourceLoader.h:
      (WebCore):
      (CachedResourceLoader):
      * loader/cache/CachedResourceRequest.cpp:
      (WebCore::CachedResourceRequest::CachedResourceRequest):
      (WebCore):
      (WebCore::CachedResourceRequest::~CachedResourceRequest):
      (WebCore::CachedResourceRequest::setInitiator):
      (WebCore::CachedResourceRequest::initiatorName):
      (WebCore::CachedResourceRequest::initiatorDocument):
      (WebCore::CachedResourceRequest::initiatorElement):
      * loader/cache/CachedResourceRequest.h:
      (WebCore):
      (WebCore::CachedResourceRequest::setOptions):
      (WebCore::CachedResourceRequest::defer):
      (WebCore::CachedResourceRequest::setDefer):
      (CachedResourceRequest):
      * loader/cache/CachedResourceRequestInitiators.cpp: Copied from Source/WebCore/loader/cache/CachedResourceRequest.cpp.
      (WebCore):
      (WebCore::CachedResourceRequestInitiators::CachedResourceRequestInitiators):
      * loader/cache/CachedResourceRequestInitiators.h: Copied from Source/WebCore/loader/cache/CachedResourceRequest.cpp.
      (WebCore):
      (CachedResourceRequestInitiators):
      (WebCore::cachedResourceRequestInitiators):
      * loader/icon/IconLoader.cpp:
      (WebCore::IconLoader::startLoading):
      * platform/ThreadGlobalData.cpp:
      (WebCore::ThreadGlobalData::ThreadGlobalData):
      * platform/ThreadGlobalData.h:
      (WebCore):
      (WebCore::ThreadGlobalData::cachedResourceRequestInitiators):
      (ThreadGlobalData):
      * svg/SVGFEImageElement.cpp:
      (WebCore::SVGFEImageElement::requestImageResource):
      * svg/SVGFontFaceUriElement.cpp:
      (WebCore::SVGFontFaceUriElement::loadFont):
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::svgAttributeChanged):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      864dbdad
  9. 13 Nov, 2012 2 commits
    • abarth@webkit.org's avatar
      Unreviewed, rolling out r134442. · da441869
      abarth@webkit.org authored
      http://trac.webkit.org/changeset/134442
      https://bugs.webkit.org/show_bug.cgi?id=102111
      
      Does not compile on apple-mac (Requested by abarth on
      #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-13
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSCursorImageValue.cpp:
      (WebCore::CSSCursorImageValue::cachedImage):
      * css/CSSFontFaceSrcValue.cpp:
      (WebCore::CSSFontFaceSrcValue::cachedFont):
      * css/CSSImageSetValue.cpp:
      (WebCore::CSSImageSetValue::cachedImageSet):
      * css/CSSImageValue.cpp:
      (WebCore::CSSImageValue::cachedImage):
      * css/CSSImageValue.h:
      (WebCore):
      (CSSImageValue):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::loadPendingImage):
      * css/StyleRuleImport.cpp:
      (WebCore::StyleRuleImport::requestStyleSheet):
      * css/WebKitCSSSVGDocumentValue.cpp:
      (WebCore::WebKitCSSSVGDocumentValue::load):
      * css/WebKitCSSShaderValue.cpp:
      (WebCore::WebKitCSSShaderValue::cachedShader):
      * dom/ScriptElement.cpp:
      (WebCore::ScriptElement::requestScript):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::process):
      * html/parser/CSSPreloadScanner.cpp:
      (WebCore::CSSPreloadScanner::emitRule):
      * html/parser/CSSPreloadScanner.h:
      (CSSPreloadScanner):
      * html/parser/HTMLPreloadScanner.cpp:
      (WebCore::PreloadTask::preload):
      * loader/ImageLoader.cpp:
      (WebCore::ImageLoader::updateFromElement):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::requestImage):
      (WebCore::CachedResourceLoader::requestResource):
      (WebCore::CachedResourceLoader::determineRevalidationPolicy):
      (WebCore):
      (WebCore::CachedResourceLoader::preload):
      * loader/cache/CachedResourceLoader.h:
      (WebCore):
      (CachedResourceLoader):
      * loader/cache/CachedResourceRequest.cpp:
      (WebCore::CachedResourceRequest::CachedResourceRequest):
      * loader/cache/CachedResourceRequest.h:
      (CachedResourceRequest):
      (WebCore::CachedResourceRequest::defer):
      (WebCore::CachedResourceRequest::setDefer):
      * loader/cache/CachedResourceRequestInitiators.cpp: Removed.
      * loader/cache/CachedResourceRequestInitiators.h: Removed.
      * loader/icon/IconLoader.cpp:
      (WebCore::IconLoader::startLoading):
      * platform/ThreadGlobalData.cpp:
      (WebCore::ThreadGlobalData::ThreadGlobalData):
      * platform/ThreadGlobalData.h:
      (ThreadGlobalData):
      * svg/SVGFEImageElement.cpp:
      (WebCore::SVGFEImageElement::requestImageResource):
      * svg/SVGFontFaceUriElement.cpp:
      (WebCore::SVGFontFaceUriElement::loadFont):
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::svgAttributeChanged):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da441869
    • commit-queue@webkit.org's avatar
      Add initiator to CachedResourceRequest. · 8f37d180
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=101935
      
      Patch by Marja Hölttä <marja@chromium.org> on 2012-11-13
      Reviewed by Adam Barth.
      
      Motivation: Chromium needs to know which elements request a
      resource (such as an image or a script) (bug 92761). In addition,
      for exposing resource timing information (bug 84883) we need to
      store the initiator, and this is the first step towards it.
      
      No new tests: No visible change in behavior.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSCrossfadeValue.cpp:
      (WebCore::cachedImageForCSSValue):
      * css/CSSCursorImageValue.cpp:
      (WebCore::CSSCursorImageValue::cachedImage):
      * css/CSSFontFaceSrcValue.cpp:
      (WebCore::CSSFontFaceSrcValue::cachedFont):
      * css/CSSImageSetValue.cpp:
      (WebCore::CSSImageSetValue::cachedImageSet):
      * css/CSSImageValue.cpp:
      (WebCore::CSSImageValue::cachedImage):
      * css/CSSImageValue.h:
      (WebCore):
      (CSSImageValue):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::loadPendingImage):
      * css/StyleRuleImport.cpp:
      (WebCore::StyleRuleImport::requestStyleSheet):
      * css/WebKitCSSSVGDocumentValue.cpp:
      (WebCore::WebKitCSSSVGDocumentValue::load):
      * css/WebKitCSSShaderValue.cpp:
      (WebCore::WebKitCSSShaderValue::cachedShader):
      * dom/ScriptElement.cpp:
      (WebCore::ScriptElement::requestScript):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::process):
      * html/parser/CSSPreloadScanner.cpp:
      (WebCore::CSSPreloadScanner::emitRule):
      * html/parser/CSSPreloadScanner.h:
      (CSSPreloadScanner):
      * html/parser/HTMLPreloadScanner.cpp:
      (WebCore::PreloadTask::preload):
      * loader/ImageLoader.cpp:
      (WebCore::ImageLoader::updateFromElement):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::requestImage):
      (WebCore::CachedResourceLoader::requestResource):
      (WebCore::CachedResourceLoader::determineRevalidationPolicy):
      (WebCore):
      (WebCore::CachedResourceLoader::preload):
      * loader/cache/CachedResourceLoader.h:
      (WebCore):
      (CachedResourceLoader):
      * loader/cache/CachedResourceRequest.cpp:
      (WebCore::CachedResourceRequest::CachedResourceRequest):
      (WebCore):
      (WebCore::CachedResourceRequest::~CachedResourceRequest):
      (WebCore::CachedResourceRequest::setInitiator):
      (WebCore::CachedResourceRequest::initiatorName):
      (WebCore::CachedResourceRequest::initiatorDocument):
      (WebCore::CachedResourceRequest::initiatorElement):
      * loader/cache/CachedResourceRequest.h:
      (WebCore):
      (WebCore::CachedResourceRequest::setOptions):
      (WebCore::CachedResourceRequest::defer):
      (WebCore::CachedResourceRequest::setDefer):
      (CachedResourceRequest):
      * loader/cache/CachedResourceRequestInitiators.cpp: Copied from Source/WebCore/loader/cache/CachedResourceRequest.cpp.
      (WebCore):
      (WebCore::CachedResourceRequestInitiators::CachedResourceRequestInitiators):
      * loader/cache/CachedResourceRequestInitiators.h: Copied from Source/WebCore/loader/cache/CachedResourceRequest.cpp.
      (WebCore):
      (CachedResourceRequestInitiators):
      (WebCore::cachedResourceRequestInitiators):
      * loader/icon/IconLoader.cpp:
      (WebCore::IconLoader::startLoading):
      * platform/ThreadGlobalData.cpp:
      (WebCore::ThreadGlobalData::ThreadGlobalData):
      * platform/ThreadGlobalData.h:
      (WebCore):
      (WebCore::ThreadGlobalData::cachedResourceRequestInitiators):
      (ThreadGlobalData):
      * svg/SVGFEImageElement.cpp:
      (WebCore::SVGFEImageElement::requestImageResource):
      * svg/SVGFontFaceUriElement.cpp:
      (WebCore::SVGFontFaceUriElement::loadFont):
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::svgAttributeChanged):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8f37d180
  10. 22 Oct, 2012 1 commit
    • commit-queue@webkit.org's avatar
      Refactor CachedResourceLoader: add CachedResourceRequest · 5e7ea1bb
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99736
      
      Patch by Marja Hölttä <marja@chromium.org> on 2012-10-22
      Reviewed by Adam Barth.
      
      For fixing bugs 84883 and 92761,
      CachedResourceLoader::requestResource should take as parameter
      information about who initiated the request. But the parameter
      list was already long. This gathers all the parameters into a
      separate class, CachedResourceRequest. The next step is to add
      information about who initiated the request into
      CachedResourceRequest.
      
      No new tests because no changes in functionality, just moving code
      around.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSFontFaceSrcValue.cpp:
      (WebCore::CSSFontFaceSrcValue::cachedFont):
      * css/CSSImageSetValue.cpp:
      (WebCore::CSSImageSetValue::cachedImageSet):
      * css/CSSImageValue.cpp:
      (WebCore::CSSImageValue::cachedImage):
      * css/StyleRuleImport.cpp:
      (WebCore::StyleRuleImport::requestStyleSheet):
      * css/WebKitCSSSVGDocumentValue.cpp:
      (WebCore::WebKitCSSSVGDocumentValue::load):
      * css/WebKitCSSShaderValue.cpp:
      (WebCore::WebKitCSSShaderValue::cachedShader):
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::checkStyleSheet):
      * dom/ScriptElement.cpp:
      (WebCore::ScriptElement::requestScript):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::process):
      * loader/DocumentThreadableLoader.cpp:
      (WebCore::DocumentThreadableLoader::loadRequest):
      * loader/ImageLoader.cpp:
      (WebCore::ImageLoader::updateFromElement):
      * loader/LinkLoader.cpp:
      (WebCore::LinkLoader::loadLink):
      * loader/TextTrackLoader.cpp:
      (WebCore::TextTrackLoader::load):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::requestImage):
      (WebCore::CachedResourceLoader::requestFont):
      (WebCore::CachedResourceLoader::requestTextTrack):
      (WebCore::CachedResourceLoader::requestShader):
      (WebCore::CachedResourceLoader::requestCSSStyleSheet):
      (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
      (WebCore::CachedResourceLoader::requestScript):
      (WebCore::CachedResourceLoader::requestXSLStyleSheet):
      (WebCore::CachedResourceLoader::requestSVGDocument):
      (WebCore::CachedResourceLoader::requestLinkResource):
      (WebCore::CachedResourceLoader::requestRawResource):
      (WebCore::CachedResourceLoader::requestResource):
      (WebCore::CachedResourceLoader::requestPreload):
      (WebCore::CachedResourceLoader::defaultCachedResourceOptions):
      (WebCore):
      * loader/cache/CachedResourceLoader.h:
      (WebCore):
      (CachedResourceLoader):
      * loader/cache/CachedResourceRequest.cpp: Added.
      (WebCore):
      (WebCore::CachedResourceRequest::CachedResourceRequest):
      * loader/cache/CachedResourceRequest.h: Added.
      (WebCore):
      (CachedResourceRequest):
      (WebCore::CachedResourceRequest::mutableResourceRequest):
      (WebCore::CachedResourceRequest::resourceRequest):
      (WebCore::CachedResourceRequest::charset):
      (WebCore::CachedResourceRequest::setCharset):
      (WebCore::CachedResourceRequest::options):
      (WebCore::CachedResourceRequest::priority):
      (WebCore::CachedResourceRequest::forPreload):
      (WebCore::CachedResourceRequest::setForPreload):
      (WebCore::CachedResourceRequest::defer):
      (WebCore::CachedResourceRequest::setDefer):
      * loader/icon/IconLoader.cpp:
      (WebCore::IconLoader::startLoading):
      * svg/SVGFEImageElement.cpp:
      (WebCore::SVGFEImageElement::requestImageResource):
      * svg/SVGFontFaceUriElement.cpp:
      (WebCore::SVGFontFaceUriElement::loadFont):
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::svgAttributeChanged):
      * xml/XSLImportRule.cpp:
      (WebCore::XSLImportRule::loadSheet):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132157 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5e7ea1bb
  11. 24 Sep, 2012 1 commit
    • antti@apple.com's avatar
      Split stylesheet related code out from Document · e5a88a78
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97353
      
      Reviewed by Andreas Kling.
      
      Document is big and unwieldy. The code related to tracking active stylesheets can be factored out.
              
      The patch moves stylesheet upkeep, collection and invalidation code from Document to a separate
      DocumentStyleSheetCollection class. There are no functional changes.
              
      The usesLinkRules stylesheet feature bit and the related code is removed as no one was using it.
      
      * WebCore.xcodeproj/project.pbxproj:
      * css/SelectorChecker.cpp:
      (WebCore::SelectorChecker::checkOneSelector):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::StyleResolver):
      (WebCore::StyleResolver::Features::Features):
      (WebCore::StyleResolver::Features::add):
      (WebCore::StyleResolver::Features::clear):
      (WebCore::StyleResolver::collectMatchingRulesForList):
      * css/StyleResolver.h:
      (WebCore::StyleResolver::usesBeforeAfterRules):
      (Features):
      * dom/Document.cpp:
      (WebCore::Document::Document):
      (WebCore::Document::~Document):
      (WebCore::Document::setCompatibilityMode):
      (WebCore::Document::recalcStyle):
      (WebCore):
      (WebCore::Document::createStyleResolver):
      (WebCore::Document::seamlessParentUpdatedStylesheets):
      (WebCore::Document::didRemoveAllPendingStylesheet):
      (WebCore::Document::processHttpEquiv):
      (WebCore::Document::styleSheets):
      (WebCore::Document::preferredStylesheetSet):
      (WebCore::Document::selectedStylesheetSet):
      (WebCore::Document::setSelectedStylesheetSet):
      (WebCore::Document::styleResolverChanged):
      (WebCore::Document::reportMemoryUsage):
      (WebCore::Document::haveStylesheetsLoaded):
      * dom/Document.h:
      (WebCore):
      (Document):
      (WebCore::Document::styleSheetCollection):
      (WebCore::Document::hasNodesWithPlaceholderStyle):
      (WebCore::Document::setNeedsNotifyRemoveAllPendingStylesheet):
      (WebCore::Document::inStyleRecalc):
      * dom/DocumentStyleSheetCollection.cpp: Added.
      (WebCore):
      (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
      (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
      (WebCore::DocumentStyleSheetCollection::pageUserSheet):
      (WebCore::DocumentStyleSheetCollection::clearPageUserSheet):
      (WebCore::DocumentStyleSheetCollection::updatePageUserSheet):
      (WebCore::DocumentStyleSheetCollection::pageGroupUserSheets):
      (WebCore::DocumentStyleSheetCollection::clearPageGroupUserSheets):
      (WebCore::DocumentStyleSheetCollection::updatePageGroupUserSheets):
      (WebCore::DocumentStyleSheetCollection::addUserSheet):
      (WebCore::DocumentStyleSheetCollection::removePendingSheet):
      (WebCore::DocumentStyleSheetCollection::addStyleSheetCandidateNode):
      (WebCore::DocumentStyleSheetCollection::removeStyleSheetCandidateNode):
      (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
      (WebCore::DocumentStyleSheetCollection::testAddedStyleSheetRequiresStyleRecalc):
      (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
      (WebCore::styleSheetsUseRemUnits):
      (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
      (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
      (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
      (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
      * dom/DocumentStyleSheetCollection.h: Added.
      (WebCore):
      (DocumentStyleSheetCollection):
      (WebCore::DocumentStyleSheetCollection::authorStyleSheets):
      (WebCore::DocumentStyleSheetCollection::documentUserSheets):
      (WebCore::DocumentStyleSheetCollection::needsUpdateActiveStylesheetsOnStyleRecalc):
      (WebCore::DocumentStyleSheetCollection::preferredStylesheetSetName):
      (WebCore::DocumentStyleSheetCollection::selectedStylesheetSetName):
      (WebCore::DocumentStyleSheetCollection::setPreferredStylesheetSetName):
      (WebCore::DocumentStyleSheetCollection::setSelectedStylesheetSetName):
      (WebCore::DocumentStyleSheetCollection::addPendingSheet):
      (WebCore::DocumentStyleSheetCollection::hasPendingSheets):
      (WebCore::DocumentStyleSheetCollection::usesSiblingRules):
      (WebCore::DocumentStyleSheetCollection::setUsesSiblingRulesOverride):
      (WebCore::DocumentStyleSheetCollection::usesFirstLineRules):
      (WebCore::DocumentStyleSheetCollection::usesFirstLetterRules):
      (WebCore::DocumentStyleSheetCollection::setUsesFirstLetterRules):
      (WebCore::DocumentStyleSheetCollection::usesBeforeAfterRules):
      (WebCore::DocumentStyleSheetCollection::setUsesBeforeAfterRulesOverride):
      (WebCore::DocumentStyleSheetCollection::usesRemUnits):
      (WebCore::DocumentStyleSheetCollection::setUsesRemUnit):
      * dom/Element.cpp:
      (WebCore::Element::recalcStyle):
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::~ProcessingInstruction):
      (WebCore::ProcessingInstruction::checkStyleSheet):
      (WebCore::ProcessingInstruction::sheetLoaded):
      (WebCore::ProcessingInstruction::insertedInto):
      (WebCore::ProcessingInstruction::removedFrom):
      * dom/StyleElement.cpp:
      (WebCore::StyleElement::insertedIntoDocument):
      (WebCore::StyleElement::removedFromDocument):
      (WebCore::StyleElement::clearDocumentData):
      (WebCore::StyleElement::createSheet):
      (WebCore::StyleElement::sheetLoaded):
      (WebCore::StyleElement::startLoadingDynamicSheet):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::~HTMLLinkElement):
      (WebCore::HTMLLinkElement::insertedInto):
      (WebCore::HTMLLinkElement::removedFrom):
      (WebCore::HTMLLinkElement::addPendingSheet):
      (WebCore::HTMLLinkElement::removePendingSheet):
      * html/HTMLQuoteElement.cpp:
      (WebCore::HTMLQuoteElement::insertedInto):
      * html/HTMLViewSourceDocument.cpp:
      (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
      * mathml/MathMLMathElement.cpp:
      (WebCore::MathMLMathElement::insertedInto):
      * page/Page.cpp:
      (WebCore::Page::userStyleSheetLocationChanged):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::resetUserStyleCacheInAllFrames):
      * rendering/RenderBR.cpp:
      (WebCore::RenderBR::lineHeight):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::styleDidChange):
      (WebCore::RenderBlock::splitBlocks):
      (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
      (WebCore::RenderBlock::lineHeight):
      (WebCore::RenderBlock::updateFirstLetter):
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::styleDidChange):
      (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
      (WebCore::RenderInline::addChildIgnoringContinuation):
      (WebCore::RenderInline::splitInlines):
      (WebCore::RenderInline::lineHeight):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::uncachedFirstLineStyle):
      (WebCore::RenderObject::firstLineStyleSlowCase):
      * rendering/RenderObject.h:
      (WebCore::RenderObject::firstLineStyle):
      * rendering/RenderObjectChildList.cpp:
      (WebCore::RenderObjectChildList::updateBeforeAfterContent):
      * rendering/RenderTableRow.cpp:
      (WebCore::RenderTableRow::updateBeforeAndAfterContent):
      * rendering/RootInlineBox.cpp:
      (WebCore::RootInlineBox::verticalPositionForBox):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e5a88a78
  12. 14 Sep, 2012 1 commit
    • ap@apple.com's avatar
      REGRESSION(r126717): It made inspector/styles/media-queries.html fail/flakey · 763a19de
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=95070
      
              Roll out r126717, and another change that depends on it.
              r126717: Remove parent pointer from StyleSheetContents and StyleRuleImport
              r127123: Cache and share parsed imported stylesheets
      
              * css/CSSImportRule.cpp:
              * css/CSSImportRule.h:
              * css/CSSStyleSheet.cpp:
              (WebCore::CSSStyleSheet::willMutateRules):
              (WebCore::CSSStyleSheet::reattachChildRuleCSSOMWrappers):
              (WebCore::CSSStyleSheet::insertRule):
              (WebCore::CSSStyleSheet::ownerDocument):
              * css/CSSStyleSheet.h:
              (WebCore::CSSStyleSheet::clearOwnerRule):
              * css/StyleRuleImport.cpp:
              (WebCore::StyleRuleImport::StyleRuleImport):
              (WebCore::StyleRuleImport::~StyleRuleImport):
              (WebCore::StyleRuleImport::setCSSStyleSheet):
              (WebCore::StyleRuleImport::isLoading):
              (WebCore::StyleRuleImport::requestStyleSheet):
              * css/StyleRuleImport.h:
              (WebCore::StyleRuleImport::parentStyleSheet):
              (WebCore::StyleRuleImport::setParentStyleSheet):
              (WebCore::StyleRuleImport::clearParentStyleSheet):
              (ImportedStyleSheetClient):
              (WebCore::StyleRuleImport::ImportedStyleSheetClient::ImportedStyleSheetClient):
              (WebCore::StyleRuleImport::ImportedStyleSheetClient::~ImportedStyleSheetClient):
              (WebCore::StyleRuleImport::ImportedStyleSheetClient::setCSSStyleSheet):
              * css/StyleSheetContents.cpp:
              (WebCore::StyleSheetContents::StyleSheetContents):
              (WebCore::StyleSheetContents::isCacheable):
              (WebCore::StyleSheetContents::parserAppendRule):
              (WebCore::StyleSheetContents::clearRules):
              (WebCore::StyleSheetContents::wrapperInsertRule):
              (WebCore::StyleSheetContents::wrapperDeleteRule):
              (WebCore::StyleSheetContents::parseAuthorStyleSheet):
              (WebCore::StyleSheetContents::parseStringAtLine):
              (WebCore::StyleSheetContents::checkLoaded):
              (WebCore::StyleSheetContents::notifyLoadedSheet):
              (WebCore::StyleSheetContents::startLoadingDynamicSheet):
              (WebCore::StyleSheetContents::rootStyleSheet):
              (WebCore::StyleSheetContents::singleOwnerNode):
              (WebCore::StyleSheetContents::singleOwnerDocument):
              (WebCore::StyleSheetContents::parentStyleSheet):
              * css/StyleSheetContents.h:
              (WebCore::StyleSheetContents::create):
              (StyleSheetContents):
              (WebCore::StyleSheetContents::ownerRule):
              (WebCore::StyleSheetContents::clearOwnerRule):
              * dom/ProcessingInstruction.cpp:
              (WebCore::ProcessingInstruction::parseStyleSheet):
              * dom/StyleElement.cpp:
              (WebCore::StyleElement::createSheet):
              * html/HTMLLinkElement.cpp:
              (WebCore::HTMLLinkElement::setCSSStyleSheet):
              * loader/cache/CachedCSSStyleSheet.cpp:
              (WebCore::CachedCSSStyleSheet::saveParsedStyleSheet):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      763a19de
  13. 26 Aug, 2012 1 commit
    • antti@apple.com's avatar
      Remove parent pointer from StyleSheetContents and StyleRuleImport · acd3c8a7
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=94926
      
      Reviewed by Andreas Kling.
      
      To be able to cache and share @imported stylesheets in the future there must not be any parent
      pointers in the stylesheet tree.
      
      Parent pointers are used during loading to invoke load completion callbacks and for
      accessing document context information (like the security origin). They are not used after
      the sheet load is complete. Instead of keeping the parent pointers around indefinitely as part of the 
      stylesheet data structure we just keep a pointer to the root CSSStyleSheet for the duration of the load.
              
      This patch doesn't enable any new caching or generally change the behavior.
      
      * css/CSSStyleSheet.cpp:
      (WebCore::CSSStyleSheet::insertRule):
      (WebCore::CSSStyleSheet::rootStyleSheet):
      (WebCore):
      (WebCore::CSSStyleSheet::ownerDocument):
      * css/CSSStyleSheet.h:
      (CSSStyleSheet):
      * css/StyleRuleImport.cpp:
      (WebCore::StyleRuleImport::LoadContext::LoadContext):
              
          Simplify by making StyleRuleImport CachedStyleSheetClient directly. LoadContext contains
          fields that can be thrown away after load completes.
      
      (WebCore):
      (WebCore::StyleRuleImport::StyleRuleImport):
      (WebCore::StyleRuleImport::~StyleRuleImport):
      (WebCore::StyleRuleImport::setCSSStyleSheet):
      (WebCore::StyleRuleImport::isLoading):
      (WebCore::StyleRuleImport::hadLoadError):
      (WebCore::StyleRuleImport::requestStyleSheet):
      * css/StyleRuleImport.h:
      (StyleRuleImport):
      (LoadContext):
      * css/StyleSheetContents.cpp:
      (WebCore::StyleSheetContents::StyleSheetContents):
              
          Remove now unnecessary constructor. 
      
      (WebCore::StyleSheetContents::isCacheable):
      (WebCore::StyleSheetContents::parserAppendRule):
      (WebCore::StyleSheetContents::clearRules):
      (WebCore::StyleSheetContents::wrapperInsertRule):
      (WebCore::StyleSheetContents::wrapperDeleteRule):
      (WebCore::StyleSheetContents::requestImportedStyleSheets):
      (WebCore):
      (WebCore::StyleSheetContents::parseAuthorStyleSheet):
      (WebCore::StyleSheetContents::parseStringAtLine):
      (WebCore::StyleSheetContents::checkImportedSheetLoadCompleted):
      (WebCore::StyleSheetContents::checkLoadCompleted):
      (WebCore::StyleSheetContents::getAncestors):
      (WebCore::StyleSheetContents::hasImportCycle):
              
          Move the cycle checking to the root stylesheet so we don't need to pass the entire chain around.
          The extra work here is unlikely to cause problems, massive import trees don't really occur in
          practice.
      
      * css/StyleSheetContents.h:
      (WebCore::StyleSheetContents::create):
      (StyleSheetContents):
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::parseStyleSheet):
      * dom/StyleElement.cpp:
      (WebCore::StyleElement::createSheet):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::setCSSStyleSheet):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      acd3c8a7
  14. 19 Aug, 2012 1 commit
    • morrita@google.com's avatar
      DOM mutation against including <link> shouldn't trigger pending HTML parser. · cc735a7b
      morrita@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=93641
      
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      HTMLLinkElement::removedFrom() invoked Document::removePendingSheet(), which can trigger
      HTMLParser that can mutate DOM tree. DOM mutation reentrancy on like this is problematic and
      should be prohibited.
      
      This change add an variation of Document::removePendingSheet() which postpones the notification
      which triggers DOM mutation, and flush such pending notifications at the end of ongoing mutation.
      
      Test: http/tests/loading/remove-child-triggers-parser.html
      
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::ChildNodeRemovalNotifier::notify): Flushed pending notifications at the end.
      * dom/Document.cpp:
      (WebCore::Document::Document):
      (WebCore::Document::removePendingSheet): Added RemovePendingSheetNotificationType parameter.
      (WebCore):
      (WebCore::Document::didRemoveAllPendingStylesheet): Extracted from removePendingSheet()
      * dom/Document.h:
      (Document):
      (WebCore::Document::setNeedsNotifyRemoveAllPendingStylesheet): A flag setter.
      (WebCore::Document::notifyRemovePendingSheetIfNeeded):
      (WebCore):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::removedFrom): Switched to use "notification later" version of removePendingSheet()
      (WebCore::HTMLLinkElement::removePendingSheet): Added RemovePendingSheetNotificationType parameter.
      * html/HTMLLinkElement.h:
      
      LayoutTests:
      
      Note that the test content need to be such cryptic because HTML parser is involving the
      captured bug and adding explanations can affect the behavior then mask the bug.
      
      * http/tests/loading/remove-child-triggers-parser-expected.txt: Added.
      * http/tests/loading/remove-child-triggers-parser.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc735a7b
  15. 16 Aug, 2012 1 commit
    • antti@apple.com's avatar
      Remove StyleSheetContents::m_finalURL · 1a7112cb
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=94140
      
      Reviewed by Andreas Kling.
      
      It is equal (or empty in case of inline stylesheets) to the baseURL passed in CSSParserContext.
      Removing it simplifies the constructors and the related code.
      
      * css/CSSStyleSheet.cpp:
      (WebCore::CSSStyleSheet::createInline):
      (WebCore::CSSStyleSheet::canAccessRules):
      (WebCore::CSSStyleSheet::rules):
      (WebCore::CSSStyleSheet::cssRules):
      
          - factor access check to a function
          - allow document always access rules of its inline stylesheets
      
      * css/StyleRuleImport.cpp:
      (WebCore::StyleRuleImport::setCSSStyleSheet):
      (WebCore::StyleRuleImport::requestStyleSheet):
      * css/StyleSheetContents.cpp:
      (WebCore::StyleSheetContents::StyleSheetContents):
      (WebCore::StyleSheetContents::parseAuthorStyleSheet):
      * css/StyleSheetContents.h:
      (WebCore::StyleSheetContents::create):
      (WebCore::StyleSheetContents::originalURL):
      (StyleSheetContents):
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::setCSSStyleSheet):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::setCSSStyleSheet):
      * inspector/InspectorStyleSheet.cpp:
      (WebCore::fillMediaListChain):
      (WebCore::InspectorStyleSheet::styleSheetURL):
      * xml/XSLImportRule.cpp:
      (WebCore::XSLImportRule::loadSheet):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a7112cb
  16. 16 Jul, 2012 1 commit
    • commit-queue@webkit.org's avatar
      .: Expose an export for the iconUrl list so Internals can use it · 466dbd4b
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=88665
      
      Patch by Pete Williamson <petewil@google.com> on 2012-07-16
      Reviewed by Kent Tamura.
      
      * Source/autotools/symbols.filter: export iconURLs
      
      Source/WebCore: Changed the behavior of iconURLs to always recalculate the list.
      https://bugs.webkit.org/show_bug.cgi?id=88665
      
      Patch by Pete Williamson <petewil@google.com> on 2012-07-16
      Reviewed by Kent Tamura.
      
      As it turns out, it can contain stale URLs in the case that some script
      manipulates the DOM, which breaks scripts trying to reset the favicon
      URL. Also added a method in Internals to allow tests to get the list of
      icon
      
      Tests: fast/dom/icon-url-change.html
             fast/dom/icon-url-list.html
      
      * WebCore.exp.in: export Document::iconURLs on the mac for the Internals class
      * dom/Document.cpp:
      (WebCore::Document::iconURLs): Changed the method to recalculate the iconURL list every time
      (WebCore::Document::addIconURL): we no longer need to add to the internal list since we recalculate it
      (WebCore::Document::setUseSecureKeyboardEntryWhenActive): removed extra whitespace
      * dom/Document.h:
      (Document): removed the addIconURL method which is no longer used
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::iconType): exposed the icon type with an accessor
      (WebCore):
      (WebCore::HTMLLinkElement::iconSizes): exposed the icon sizes with an accessor
      * html/HTMLLinkElement.h:
      (HTMLLinkElement): declared the icon type and size accessors
      * testing/Internals.cpp:
      (WebCore::Internals::iconURLs): made a method to be used by unit tests for inspecting the icon URL list
      (WebCore):
      * testing/Internals.h:
      (Internals): declared the method for unit testing the icon URL list
      * testing/Internals.idl: exported the Document::iconURLs function
      
      Source/WebKit2: Export the iconURL list to make it available to the Internals class for testing
      https://bugs.webkit.org/show_bug.cgi?id=88665
      
      Patch by Pete Williamson <petewil@google.com> on 2012-07-16
      Reviewed by Kent Tamura.
      
      * win/WebKit2.def: export the DocumentL::iconURLs function
      
      LayoutTests: Add some new unit tests to test the favicon changing dynamically
      https://bugs.webkit.org/show_bug.cgi?id=88665
      
      Patch by Pete Williamson <petewil@google.com> on 2012-07-16
      Reviewed by Kent Tamura.
      
      * fast/dom/icon-url-change-expected.txt: Added.
      * fast/dom/icon-url-change.html: Added a new test for changing the favicon dynamically
      * fast/dom/icon-url-list-expected.txt: Added.
      * fast/dom/icon-url-list.html: Added a new test for multiple favicons in the HTML header
      * fast/dom/icon-url-property-expected.txt: update unit test expectations
      * fast/dom/icon-url-property.html: update and enable existing favicon test
      * platform/chromium/TestExpectations: reenable the url-property test
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      466dbd4b
  17. 10 Jul, 2012 1 commit
    • ossy@webkit.org's avatar
      Unreviewed, rolling out r122178. · 6aedce2f
      ossy@webkit.org authored
      http://trac.webkit.org/changeset/122178
      https://bugs.webkit.org/show_bug.cgi?id=90857
      
      browser tests, PrerenderBrowserTest.PrerenderFavicon and other
      tests, started to fail (Requested by hayato on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-07-10
      
      .:
      
      * Source/autotools/symbols.filter:
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * dom/Document.cpp:
      (WebCore::Document::iconURLs):
      (WebCore::Document::addIconURL):
      (WebCore::Document::setUseSecureKeyboardEntryWhenActive):
      * dom/Document.h:
      (Document):
      * html/HTMLLinkElement.cpp:
      * html/HTMLLinkElement.h:
      (HTMLLinkElement):
      * testing/Internals.cpp:
      * testing/Internals.h:
      (Internals):
      * testing/Internals.idl:
      
      Source/WebKit2:
      
      * win/WebKit2.def:
      
      LayoutTests:
      
      * fast/dom/icon-url-change-expected.txt: Removed.
      * fast/dom/icon-url-change.html: Removed.
      * fast/dom/icon-url-list-expected.txt: Removed.
      * fast/dom/icon-url-list.html: Removed.
      * fast/dom/icon-url-property-expected.txt:
      * fast/dom/icon-url-property.html:
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6aedce2f
  18. 09 Jul, 2012 1 commit
    • commit-queue@webkit.org's avatar
      .: Expose an export for the iconUrl list so Internals can use it · 546c67d5
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=88665
      
      Patch by Pete Williamson <petewil@google.com> on 2012-07-09
      Reviewed by Kent Tamura.
      
      * Source/autotools/symbols.filter: export iconURLs
      
      Source/WebCore: Changed the behavior of iconURLs to always recalculate the list.
      https://bugs.webkit.org/show_bug.cgi?id=88665
      
      Patch by Pete Williamson <petewil@google.com> on 2012-07-09
      Reviewed by Kent Tamura..
      
      As it turns out, it can contain stale URLs in the case that some script
      manipulates the DOM, which breaks scripts trying to reset the favicon
      URL. Also added a method in Internals to allow tests to get the list of
      icon
      
      Tests: fast/dom/icon-url-change.html
             fast/dom/icon-url-list.html
      
      * WebCore.exp.in: export Document::iconURLs on the mac for the Internals class
      * dom/Document.cpp:
      (WebCore::Document::iconURLs): Changed the method to recalculate the iconURL list every time
      (WebCore::Document::addIconURL): we no longer need to add to the internal list since we recalculate it
      (WebCore::Document::setUseSecureKeyboardEntryWhenActive): removed extra whitespace
      * dom/Document.h:
      (Document): removed the addIconURL method which is no longer used
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::iconType): exposed the icon type with an accessor
      (WebCore):
      (WebCore::HTMLLinkElement::iconSizes): exposed the icon sizes with an accessor
      * html/HTMLLinkElement.h:
      (HTMLLinkElement): declared the icon type and size accessors
      * testing/Internals.cpp:
      (WebCore::Internals::iconURLs): made a method to be used by unit tests for inspecting the icon URL list
      (WebCore):
      * testing/Internals.h:
      (Internals): declared the method for unit testing the icon URL list
      * testing/Internals.idl: exported the Document::iconURLs function
      
      Source/WebKit2: Export the iconURL list to make it available to the Internals class for testing
      https://bugs.webkit.org/show_bug.cgi?id=88665
      
      Patch by Pete Williamson <petewil@google.com> on 2012-07-09
      Reviewed by Kent Tamura.
      
      * win/WebKit2.def: export the DocumentL::iconURLs function
      
      LayoutTests: Add some new unit tests to test the favicon changing dynamically
      https://bugs.webkit.org/show_bug.cgi?id=88665
      
      Patch by Pete Williamson <petewil@google.com> on 2012-07-09
      Reviewed by Kent Tamura.
      
      * fast/dom/icon-url-change-expected.txt: Added.
      * fast/dom/icon-url-change.html: Added a new test for changing the favicon dynamically
      * fast/dom/icon-url-list-expected.txt: Added.
      * fast/dom/icon-url-list.html: Added a new test for multiple favicons in the HTML header
      * fast/dom/icon-url-property-expected.txt: update unit test expectations
      * fast/dom/icon-url-property.html: update and enable existing favicon test
      * platform/chromium/TestExpectations: reenable the url-property test
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      546c67d5
  19. 30 May, 2012 2 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r118913. · bd9bc9a9
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/118913
      https://bugs.webkit.org/show_bug.cgi?id=87891
      
      patch is incorrect (see comments in
      https://bugs.webkit.org/show_bug.cgi?id=87889) (Requested by
      thorton on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-05-30
      
      * css/CSSFontFaceSrcValue.cpp:
      (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs):
      * css/CSSFontFaceSrcValue.h:
      (CSSFontFaceSrcValue):
      * css/CSSPrimitiveValue.cpp:
      (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs):
      * css/CSSPrimitiveValue.h:
      (CSSPrimitiveValue):
      * css/CSSReflectValue.cpp:
      (WebCore::CSSReflectValue::addSubresourceStyleURLs):
      * css/CSSReflectValue.h:
      (CSSReflectValue):
      * css/CSSValue.cpp:
      (WebCore::CSSValue::addSubresourceStyleURLs):
      * css/CSSValue.h:
      (CSSValue):
      * css/CSSValueList.cpp:
      (WebCore::CSSValueList::addSubresourceStyleURLs):
      * css/CSSValueList.h:
      (CSSValueList):
      * css/StylePropertySet.cpp:
      (WebCore::StylePropertySet::addSubresourceStyleURLs):
      * css/StylePropertySet.h:
      (StylePropertySet):
      * css/StyleSheetContents.cpp:
      (WebCore::StyleSheetContents::addSubresourceStyleURLs):
      * css/StyleSheetContents.h:
      (StyleSheetContents):
      * dom/Element.h:
      * dom/Node.cpp:
      (WebCore::Node::getSubresourceURLs):
      * dom/Node.h:
      (WebCore::Node::addSubresourceAttributeURLs):
      (WebCore):
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::addSubresourceAttributeURLs):
      * dom/ProcessingInstruction.h:
      (ProcessingInstruction):
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::addSubresourceAttributeURLs):
      * dom/StyledElement.h:
      (StyledElement):
      * html/HTMLBodyElement.cpp:
      (WebCore::HTMLBodyElement::addSubresourceAttributeURLs):
      * html/HTMLBodyElement.h:
      (HTMLBodyElement):
      * html/HTMLEmbedElement.cpp:
      (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs):
      * html/HTMLEmbedElement.h:
      (HTMLEmbedElement):
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::addSubresourceAttributeURLs):
      * html/HTMLImageElement.h:
      (HTMLImageElement):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::addSubresourceAttributeURLs):
      * html/HTMLInputElement.h:
      (HTMLInputElement):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::addSubresourceAttributeURLs):
      * html/HTMLLinkElement.h:
      (HTMLLinkElement):
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::addSubresourceAttributeURLs):
      * html/HTMLObjectElement.h:
      (HTMLObjectElement):
      * html/HTMLParamElement.cpp:
      (WebCore::HTMLParamElement::addSubresourceAttributeURLs):
      * html/HTMLParamElement.h:
      (HTMLParamElement):
      * html/HTMLScriptElement.cpp:
      (WebCore::HTMLScriptElement::addSubresourceAttributeURLs):
      * html/HTMLScriptElement.h:
      (HTMLScriptElement):
      * html/HTMLStyleElement.cpp:
      (WebCore::HTMLStyleElement::addSubresourceAttributeURLs):
      * html/HTMLStyleElement.h:
      (HTMLStyleElement):
      * html/HTMLTableCellElement.cpp:
      (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs):
      * html/HTMLTableCellElement.h:
      (HTMLTableCellElement):
      * html/HTMLTableElement.cpp:
      (WebCore::HTMLTableElement::addSubresourceAttributeURLs):
      * html/HTMLTableElement.h:
      (HTMLTableElement):
      * svg/SVGCursorElement.cpp:
      (WebCore::SVGCursorElement::addSubresourceAttributeURLs):
      * svg/SVGCursorElement.h:
      (SVGCursorElement):
      * svg/SVGFEImageElement.cpp:
      (WebCore::SVGFEImageElement::addSubresourceAttributeURLs):
      * svg/SVGFEImageElement.h:
      (SVGFEImageElement):
      * svg/SVGImageElement.cpp:
      (WebCore::SVGImageElement::addSubresourceAttributeURLs):
      * svg/SVGImageElement.h:
      (SVGImageElement):
      * svg/SVGScriptElement.cpp:
      (WebCore::SVGScriptElement::addSubresourceAttributeURLs):
      * svg/SVGScriptElement.h:
      (SVGScriptElement):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bd9bc9a9
    • antti@apple.com's avatar
      Rename Foo::addSubresourceStyleURLs and Node::addSubresourceAttributeURLs · a5d8bdc9
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=87739
      
      Rubber-stamped by Andreas Kling.
      
      Rename them to collectSubresourceURLs and collectSubresourceURLsFromAttributes to match
      the naming conventions.
              
      Move collectSubresourceURLsFromAttributes from Node to Element as only elements have attributes.
      
      * css/CSSFontFaceSrcValue.cpp:
      (WebCore::CSSFontFaceSrcValue::collectSubresourceURLs):
      * css/CSSFontFaceSrcValue.h:
      (CSSFontFaceSrcValue):
      * css/CSSPrimitiveValue.cpp:
      (WebCore::CSSPrimitiveValue::collectSubresourceURLs):
      * css/CSSPrimitiveValue.h:
      (CSSPrimitiveValue):
      * css/CSSReflectValue.cpp:
      (WebCore::CSSReflectValue::collectSubresourceURLs):
      * css/CSSReflectValue.h:
      (CSSReflectValue):
      * css/CSSValue.cpp:
      (WebCore::CSSValue::collectSubresourceURLs):
      * css/CSSValue.h:
      (CSSValue):
      * css/CSSValueList.cpp:
      (WebCore::CSSValueList::collectSubresourceURLs):
      * css/CSSValueList.h:
      (CSSValueList):
      * css/StylePropertySet.cpp:
      (WebCore::StylePropertySet::collectSubresourceURLs):
      * css/StylePropertySet.h:
      (StylePropertySet):
      * css/StyleSheetContents.cpp:
      (WebCore::StyleSheetContents::collectSubresourceURLs):
      * css/StyleSheetContents.h:
      (StyleSheetContents):
      * dom/Element.h:
      (WebCore::Element::collectSubresourceURLsFromAttributes):
      (Element):
      * dom/Node.cpp:
      (WebCore::Node::getSubresourceURLs):
      * dom/Node.h:
      (WebCore):
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::collectSubresourceURLsFromAttributes):
      * dom/ProcessingInstruction.h:
      (ProcessingInstruction):
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::collectSubresourceURLsFromAttributes):
      * dom/StyledElement.h:
      (StyledElement):
      * html/HTMLBodyElement.cpp:
      (WebCore::HTMLBodyElement::collectSubresourceURLsFromAttributes):
      * html/HTMLBodyElement.h:
      (HTMLBodyElement):
      * html/HTMLEmbedElement.cpp:
      (WebCore::HTMLEmbedElement::collectSubresourceURLsFromAttributes):
      * html/HTMLEmbedElement.h:
      (HTMLEmbedElement):
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::collectSubresourceURLsFromAttributes):
      * html/HTMLImageElement.h:
      (HTMLImageElement):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::collectSubresourceURLsFromAttributes):
      * html/HTMLInputElement.h:
      (HTMLInputElement):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::collectSubresourceURLsFromAttributes):
      * html/HTMLLinkElement.h:
      (HTMLLinkElement):
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::collectSubresourceURLsFromAttributes):
      * html/HTMLObjectElement.h:
      (HTMLObjectElement):
      * html/HTMLParamElement.cpp:
      (WebCore::HTMLParamElement::collectSubresourceURLsFromAttributes):
      * html/HTMLParamElement.h:
      (HTMLParamElement):
      * html/HTMLScriptElement.cpp:
      (WebCore::HTMLScriptElement::collectSubresourceURLsFromAttributes):
      * html/HTMLScriptElement.h:
      (HTMLScriptElement):
      * html/HTMLStyleElement.cpp:
      (WebCore::HTMLStyleElement::collectSubresourceURLsFromAttributes):
      * html/HTMLStyleElement.h:
      (HTMLStyleElement):
      * html/HTMLTableCellElement.cpp:
      (WebCore::HTMLTableCellElement::collectSubresourceURLsFromAttributes):
      * html/HTMLTableCellElement.h:
      (HTMLTableCellElement):
      * html/HTMLTableElement.cpp:
      (WebCore::HTMLTableElement::collectSubresourceURLsFromAttributes):
      * html/HTMLTableElement.h:
      (HTMLTableElement):
      * svg/SVGCursorElement.cpp:
      (WebCore::SVGCursorElement::collectSubresourceURLsFromAttributes):
      * svg/SVGCursorElement.h:
      (SVGCursorElement):
      * svg/SVGFEImageElement.cpp:
      (WebCore::SVGFEImageElement::collectSubresourceURLsFromAttributes):
      * svg/SVGFEImageElement.h:
      (SVGFEImageElement):
      * svg/SVGImageElement.cpp:
      (WebCore::SVGImageElement::collectSubresourceURLsFromAttributes):
      * svg/SVGImageElement.h:
      (SVGImageElement):
      * svg/SVGScriptElement.cpp:
      (WebCore::SVGScriptElement::collectSubresourceURLsFromAttributes):
      * svg/SVGScriptElement.h:
      (SVGScriptElement):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5d8bdc9
  20. 24 May, 2012 1 commit
    • antti@apple.com's avatar
      Move StyleSheetContents to a separate file · 069713a6
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=87354
      
      Reviewed by Eric Seidel.
      
      Move StyleSheetContents class to StyleSheetContents.h/cpp.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSFontFaceSrcValue.cpp:
      * css/CSSGrammar.y:
      * css/CSSImportRule.cpp:
      * css/CSSParser.cpp:
      * css/CSSPrimitiveValue.cpp:
      * css/CSSRule.cpp:
      * css/CSSStyleSheet.cpp:
      (WebCore::CSSStyleSheet::create):
      (WebCore::CSSStyleSheet::href):
      (WebCore):
      (WebCore::CSSStyleSheet::baseURL):
      (WebCore::CSSStyleSheet::isLoading):
      * css/CSSStyleSheet.h:
      (WebCore):
      (CSSStyleSheet):
      * css/StylePropertySet.cpp:
      * css/StyleResolver.cpp:
      * css/StyleSheetContents.cpp: Copied from css/CSSStyleSheet.cpp.
      (WebCore):
      * css/StyleSheetContents.h: Copied from css/CSSStyleSheet.h.
      (WebCore):
      * dom/DOMImplementation.cpp:
      (WebCore::XMLMIMETypeRegExp::XMLMIMETypeRegExp):
      * dom/Document.cpp:
      * dom/ProcessingInstruction.cpp:
      * dom/StyleElement.cpp:
      * html/HTMLLinkElement.cpp:
      * html/HTMLStyleElement.cpp:
      * inspector/InspectorStyleSheet.cpp:
      * loader/cache/CachedCSSStyleSheet.cpp:
      * page/PageSerializer.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      069713a6
  21. 23 May, 2012 2 commits
    • antti@apple.com's avatar
      Rename StyleSheetInternal to StyleSheetContents · 384e66f1
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=87272
      
      Reviewed by Andreas Kling.
      
      The name is more descriptive and the code reads better.
              
      Plain "StyleSheet" would be good too but that is a CSSOM type and the name can't be used without
      changing idl code generation and resolving bunch of other issues.
      
      * css/CSSFontFaceSrcValue.cpp:
      (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs):
      * css/CSSFontFaceSrcValue.h:
      (CSSFontFaceSrcValue):
      * css/CSSImportRule.cpp:
      (WebCore::StyleRuleImport::setCSSStyleSheet):
      (WebCore::StyleRuleImport::requestStyleSheet):
      * css/CSSImportRule.h:
      (WebCore):
      (WebCore::StyleRuleImport::parentStyleSheet):
      (WebCore::StyleRuleImport::setParentStyleSheet):
      (WebCore::StyleRuleImport::styleSheet):
      (StyleRuleImport):
      * css/CSSMediaRule.cpp:
      (WebCore::CSSMediaRule::insertRule):
      * css/CSSParser.cpp:
      (WebCore::CSSParser::parseSheet):
      (WebCore::CSSParser::parseRule):
      (WebCore::CSSParser::parseKeyframeRule):
      (WebCore::CSSParser::parseValue):
      (WebCore::CSSParser::parseSelector):
      (WebCore::CSSParser::parseDeclaration):
      (WebCore::CSSParser::setStyleSheet):
      (WebCore::CSSParser::parseFlowThread):
      * css/CSSParser.h:
      (WebCore):
      (CSSParser):
      * css/CSSPrimitiveValue.cpp:
      (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs):
      * css/CSSPrimitiveValue.h:
      (CSSPrimitiveValue):
      * css/CSSReflectValue.cpp:
      (WebCore::CSSReflectValue::addSubresourceStyleURLs):
      * css/CSSReflectValue.h:
      (CSSReflectValue):
      * css/CSSRule.cpp:
      (WebCore::CSSRule::parserContext):
      * css/CSSStyleSheet.cpp:
      (WebCore::StyleSheetContents::estimatedSizeInBytes):
      (WebCore::StyleSheetContents::StyleSheetContents):
      (WebCore::StyleSheetContents::~StyleSheetContents):
      (WebCore::StyleSheetContents::isCacheable):
      (WebCore::StyleSheetContents::parserAppendRule):
      (WebCore::StyleSheetContents::ruleAt):
      (WebCore::StyleSheetContents::ruleCount):
      (WebCore::StyleSheetContents::clearCharsetRule):
      (WebCore::StyleSheetContents::clearRules):
      (WebCore::StyleSheetContents::parserSetEncodingFromCharsetRule):
      (WebCore::StyleSheetContents::wrapperInsertRule):
      (WebCore::StyleSheetContents::wrapperDeleteRule):
      (WebCore::StyleSheetContents::parserAddNamespace):
      (WebCore::StyleSheetContents::determineNamespace):
      (WebCore::StyleSheetContents::parseAuthorStyleSheet):
      (WebCore::StyleSheetContents::parseString):
      (WebCore::StyleSheetContents::parseStringAtLine):
      (WebCore::StyleSheetContents::isLoading):
      (WebCore::StyleSheetContents::checkLoaded):
      (WebCore::StyleSheetContents::notifyLoadedSheet):
      (WebCore::StyleSheetContents::startLoadingDynamicSheet):
      (WebCore::StyleSheetContents::rootStyleSheet):
      (WebCore::StyleSheetContents::singleOwnerNode):
      (WebCore::StyleSheetContents::singleOwnerDocument):
      (WebCore::StyleSheetContents::completeURL):
      (WebCore::StyleSheetContents::addSubresourceStyleURLs):
      (WebCore::StyleSheetContents::parentStyleSheet):
      (WebCore::StyleSheetContents::registerClient):
      (WebCore::StyleSheetContents::unregisterClient):
      (WebCore::StyleSheetContents::addedToMemoryCache):
      (WebCore::StyleSheetContents::removedFromMemoryCache):
      (WebCore::CSSStyleSheet::createInline):
      (WebCore::CSSStyleSheet::CSSStyleSheet):
      (WebCore::CSSStyleSheet::~CSSStyleSheet):
      (WebCore::CSSStyleSheet::willMutateRules):
      (WebCore::CSSStyleSheet::didMutateRules):
      (WebCore::CSSStyleSheet::reattachChildRuleCSSOMWrappers):
      (WebCore::CSSStyleSheet::length):
      (WebCore::CSSStyleSheet::item):
      (WebCore::CSSStyleSheet::rules):
      (WebCore::CSSStyleSheet::insertRule):
      (WebCore::CSSStyleSheet::deleteRule):
      (WebCore::CSSStyleSheet::cssRules):
      * css/CSSStyleSheet.h:
      (WebCore::StyleSheetContents::create):
      (StyleSheetContents):
      (WebCore::StyleSheetContents::copy):
      (WebCore::CSSStyleSheet::create):
      (WebCore::CSSStyleSheet::contents):
      (CSSStyleSheet):
      * css/CSSValue.cpp:
      (WebCore::CSSValue::addSubresourceStyleURLs):
      * css/CSSValue.h:
      (WebCore):
      (CSSValue):
      * css/CSSValueList.cpp:
      (WebCore::CSSValueList::addSubresourceStyleURLs):
      * css/CSSValueList.h:
      (CSSValueList):
      * css/PropertySetCSSStyleDeclaration.cpp:
      (WebCore::PropertySetCSSStyleDeclaration::contextStyleSheet):
      * css/PropertySetCSSStyleDeclaration.h:
      (WebCore):
      (PropertySetCSSStyleDeclaration):
      * css/StylePropertySet.cpp:
      (WebCore::StylePropertySet::setProperty):
      (WebCore::StylePropertySet::parseDeclaration):
      (WebCore::StylePropertySet::addSubresourceStyleURLs):
      * css/StylePropertySet.h:
      (WebCore):
      (StylePropertySet):
      * css/StyleResolver.cpp:
      (RuleSet):
      (WebCore):
      (WebCore::StyleResolver::StyleResolver):
      (WebCore::StyleResolver::addAuthorRulesAndCollectUserRulesFromSheets):
      (WebCore::StyleResolver::appendAuthorStylesheets):
      (WebCore::parseUASheet):
      (WebCore::StyleResolver::collectMatchingRulesForList):
      * css/StyleResolver.h:
      (StyleResolver):
      * css/WebKitCSSKeyframesRule.cpp:
      (WebCore::WebKitCSSKeyframesRule::insertRule):
      * dom/DOMImplementation.cpp:
      (WebCore::DOMImplementation::createCSSStyleSheet):
      * dom/Document.cpp:
      (WebCore::Document::recalcStyle):
      (WebCore::Document::updateBaseURL):
      (WebCore::Document::pageUserSheet):
      (WebCore::Document::pageGroupUserSheets):
      (WebCore::Document::addUserSheet):
      (WebCore::Document::testAddedStylesheetRequiresStyleRecalc):
      (WebCore::Document::analyzeStylesheetChange):
      (WebCore::styleSheetsUseRemUnits):
      * dom/Document.h:
      (WebCore):
      (Document):
      * dom/ElementAttributeData.cpp:
      (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::setCSSStyleSheet):
      (WebCore::ProcessingInstruction::parseStyleSheet):
      * dom/StyleElement.cpp:
      (WebCore::StyleElement::createSheet):
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::setInlineStyleProperty):
      (WebCore::StyledElement::addSubresourceAttributeURLs):
      (WebCore::StyledElement::addPropertyToAttributeStyle):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::setCSSStyleSheet):
      (WebCore::HTMLLinkElement::styleSheetIsLoading):
      (WebCore::HTMLLinkElement::addSubresourceAttributeURLs):
      * html/HTMLStyleElement.cpp:
      (WebCore::HTMLStyleElement::addSubresourceAttributeURLs):
      * inspector/InspectorStyleSheet.cpp:
      (WebCore::fillMediaListChain):
      (WebCore::InspectorStyle::setPropertyText):
      (WebCore::InspectorStyleSheet::styleSheetURL):
      (WebCore::InspectorStyleSheet::reparseStyleSheet):
      (WebCore::InspectorStyleSheet::ensureSourceData):
      (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
      * loader/cache/CachedCSSStyleSheet.cpp:
      (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
      (WebCore::CachedCSSStyleSheet::saveParsedStyleSheet):
      * loader/cache/CachedCSSStyleSheet.h:
      (WebCore):
      (CachedCSSStyleSheet):
      * page/PageSerializer.cpp:
      (WebCore::PageSerializer::serializeCSSStyleSheet):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      384e66f1
    • darin@apple.com's avatar
      Use ContainerNode instead of Node where possible · 183547be
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=87220
      
      Reviewed by Geoffrey Garen.
      
      It's better to use a more specific type; in some cases we even generate
      more efficient code if we have a more specific type. Also, we want any
      type casts to be as close as possible to the corresponding type checks,
      so eliminating these uses of toContainerNode is a plus, also.
      
      * dom/ContainerNodeAlgorithms.h: Changed insertionPoint to be a ContainerNode
      instead of a Node. Fixed spelling error "inseretions". Changed
      (WebCore::ChildFrameDisconnector::Target::Target): Changed type of frame owner
      element to HTMLFrameOwnerElement from Node.
      
      * dom/DocumentType.cpp:
      (WebCore::DocumentType::insertedInto):
      (WebCore::DocumentType::removedFrom):
      * dom/DocumentType.h:
      * dom/Element.cpp:
      (WebCore::Element::insertedInto):
      (WebCore::Element::removedFrom):
      * dom/Element.h:
      * dom/Node.cpp:
      (WebCore::Node::insertedInto):
      (WebCore::Node::removedFrom):
      * dom/Node.h:
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::insertedInto):
      (WebCore::ProcessingInstruction::removedFrom):
      * dom/ProcessingInstruction.h:
      * dom/ScriptElement.cpp:
      (WebCore::ScriptElement::insertedInto):
      * dom/ScriptElement.h:
      * html/FormAssociatedElement.cpp:
      (WebCore::FormAssociatedElement::insertedInto):
      (WebCore::FormAssociatedElement::removedFrom):
      * html/FormAssociatedElement.h:
      * html/HTMLBaseElement.cpp:
      (WebCore::HTMLBaseElement::insertedInto):
      (WebCore::HTMLBaseElement::removedFrom):
      * html/HTMLBaseElement.h:
      * html/HTMLBodyElement.cpp:
      (WebCore::HTMLBodyElement::insertedInto):
      (WebCore::HTMLBodyElement::didNotifyDescendantInsertions):
      * html/HTMLBodyElement.h:
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::insertedInto):
      (WebCore::HTMLFormControlElement::removedFrom):
      * html/HTMLFormControlElement.h:
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::insertedInto):
      (WebCore::HTMLFormElement::didNotifyDescendantInsertions):
      (WebCore::HTMLFormElement::removedFrom):
      * html/HTMLFormElement.h:
      * html/HTMLFrameElementBase.cpp:
      (WebCore::HTMLFrameElementBase::insertedInto):
      (WebCore::HTMLFrameElementBase::didNotifyDescendantInsertions):
      * html/HTMLFrameElementBase.h:
      * html/HTMLFrameSetElement.cpp:
      (WebCore::HTMLFrameSetElement::insertedInto):
      (WebCore::HTMLFrameSetElement::removedFrom):
      * html/HTMLFrameSetElement.h:
      * html/HTMLIFrameElement.cpp:
      (WebCore::HTMLIFrameElement::insertedInto):
      (WebCore::HTMLIFrameElement::removedFrom):
      * html/HTMLIFrameElement.h:
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::insertedInto):
      (WebCore::HTMLImageElement::removedFrom):
      * html/HTMLImageElement.h:
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::insertedInto):
      (WebCore::HTMLInputElement::removedFrom):
      * html/HTMLInputElement.h:
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::insertedInto):
      (WebCore::HTMLLinkElement::removedFrom):
      * html/HTMLLinkElement.h:
      * html/HTMLMapElement.cpp:
      (WebCore::HTMLMapElement::insertedInto):
      (WebCore::HTMLMapElement::removedFrom):
      * html/HTMLMapElement.h:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::insertedInto):
      (WebCore::HTMLMediaElement::removedFrom):
      * html/HTMLMediaElement.h:
      * html/HTMLMetaElement.cpp:
      (WebCore::HTMLMetaElement::insertedInto):
      * html/HTMLMetaElement.h:
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::insertedInto):
      (WebCore::HTMLObjectElement::removedFrom):
      * html/HTMLObjectElement.h:
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::insertedInto):
      * html/HTMLOptionElement.h:
      * html/HTMLQuoteElement.cpp:
      (WebCore::HTMLQuoteElement::insertedInto):
      * html/HTMLQuoteElement.h:
      * html/HTMLScriptElement.cpp:
      (WebCore::HTMLScriptElement::insertedInto):
      * html/HTMLScriptElement.h:
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::insertedInto):
      * html/HTMLSelectElement.h:
      * html/HTMLSourceElement.cpp:
      (WebCore::HTMLSourceElement::insertedInto):
      (WebCore::HTMLSourceElement::removedFrom):
      * html/HTMLSourceElement.h:
      * html/HTMLStyleElement.cpp:
      (WebCore::HTMLStyleElement::insertedInto):
      (WebCore::HTMLStyleElement::removedFrom):
      * html/HTMLStyleElement.h:
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::insertedInto):
      * html/HTMLTextFormControlElement.h:
      * html/HTMLTitleElement.cpp:
      (WebCore::HTMLTitleElement::insertedInto):
      (WebCore::HTMLTitleElement::removedFrom):
      * html/HTMLTitleElement.h:
      * html/HTMLTrackElement.cpp:
      (WebCore::HTMLTrackElement::insertedInto):
      (WebCore::HTMLTrackElement::removedFrom):
      * html/HTMLTrackElement.h:
      * mathml/MathMLMathElement.cpp:
      (WebCore::MathMLMathElement::insertedInto):
      * mathml/MathMLMathElement.h:
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::removedFrom):
      * svg/SVGElement.h:
      * svg/SVGFEImageElement.cpp:
      (WebCore::SVGFEImageElement::insertedInto):
      (WebCore::SVGFEImageElement::removedFrom):
      * svg/SVGFEImageElement.h:
      * svg/SVGFontFaceElement.cpp:
      (WebCore::SVGFontFaceElement::insertedInto):
      (WebCore::SVGFontFaceElement::removedFrom):
      * svg/SVGFontFaceElement.h:
      * svg/SVGFontFaceUriElement.cpp:
      (WebCore::SVGFontFaceUriElement::insertedInto):
      * svg/SVGFontFaceUriElement.h:
      * svg/SVGGlyphElement.cpp:
      (WebCore::SVGGlyphElement::insertedInto):
      (WebCore::SVGGlyphElement::removedFrom):
      * svg/SVGGlyphElement.h:
      * svg/SVGHKernElement.cpp:
      (WebCore::SVGHKernElement::insertedInto):
      (WebCore::SVGHKernElement::removedFrom):
      * svg/SVGHKernElement.h:
      * svg/SVGImageElement.cpp:
      (WebCore::SVGImageElement::insertedInto):
      * svg/SVGImageElement.h:
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::insertedInto):
      (WebCore::SVGSVGElement::removedFrom):
      * svg/SVGSVGElement.h:
      * svg/SVGScriptElement.cpp:
      (WebCore::SVGScriptElement::insertedInto):
      * svg/SVGScriptElement.h:
      * svg/SVGStyleElement.cpp:
      (WebCore::SVGStyleElement::insertedInto):
      (WebCore::SVGStyleElement::removedFrom):
      * svg/SVGStyleElement.h:
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::insertedInto):
      (WebCore::SVGStyledElement::removedFrom):
      * svg/SVGStyledElement.h:
      * svg/SVGTRefElement.cpp:
      (WebCore::SVGTRefElement::insertedInto):
      (WebCore::SVGTRefElement::removedFrom):
      * svg/SVGTRefElement.h:
      * svg/SVGTextPathElement.cpp:
      (WebCore::SVGTextPathElement::insertedInto):
      * svg/SVGTextPathElement.h:
      * svg/SVGTitleElement.cpp:
      (WebCore::SVGTitleElement::insertedInto):
      (WebCore::SVGTitleElement::removedFrom):
      * svg/SVGTitleElement.h:
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::insertedInto):
      (WebCore::SVGUseElement::removedFrom):
      * svg/SVGUseElement.h:
      * svg/SVGVKernElement.cpp:
      (WebCore::SVGVKernElement::insertedInto):
      (WebCore::SVGVKernElement::removedFrom):
      * svg/SVGVKernElement.h:
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::SVGSMILElement::insertedInto):
      (WebCore::SVGSMILElement::removedFrom):
      * svg/animation/SVGSMILElement.h:
      Changed arguments of insertedInto and removedFrom to ContainerNode instead of Node.
      Did the same with didNotifyDescendantInsertions, while fixing the typo in its name.
      
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::ReplaceSelectionCommand::doApply): Put a typecast toHTMLElement here.
      The check for isListElement and isLegacyAppleStyleSpan takes care of the type checking.
      (WebCore::ReplaceSelectionCommand::insertAsListItems): Changed this function to take
      an HTMLElement instead of a Node, then we can drop use of the toContainerNode function.
      * editing/ReplaceSelectionCommand.h:
      
      * editing/TextIterator.cpp: Fixed a typo in a comment.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      183547be
  22. 15 May, 2012 1 commit
    • kling@webkit.org's avatar
      Pass Attribute by const reference as much as possible. · 260fca8b
      kling@webkit.org authored
      <http://webkit.org/b/86487>
      
      Reviewed by Darin Adler.
      
      Switch to passing around "const Attribute&" instead of "Attribute*" wherever possible.
      This helps enforce the constness and non-nullity of these arguments at compile time.
      
      Also renamed 'attr' to 'attribute' in the touched code. Attr and Attribute are two
      different classes, so having "Attribute attr" just looks wrong.
      
      * bindings/js/ScriptEventListener.cpp:
      (WebCore::createAttributeEventListener):
      * bindings/js/ScriptEventListener.h:
      * bindings/v8/ScriptEventListener.cpp:
      (WebCore::createAttributeEventListener):
      * bindings/v8/ScriptEventListener.h:
      * dom/Attr.cpp:
      (WebCore::Attr::setPrefix):
      (WebCore::Attr::setValue):
      (WebCore::Attr::childrenChanged):
      (WebCore::Attr::style):
      (WebCore::Attr::elementAttribute):
      * dom/Attr.h:
      * dom/Element.cpp:
      (WebCore::Element::setAttributeInternal):
      (WebCore::Element::attributeChanged):
      (WebCore::Element::parserSetAttributes):
      (WebCore::Element::didAddAttribute):
      (WebCore::Element::didModifyAttribute):
      (WebCore::Element::didRemoveAttribute):
      * dom/Element.h:
      * dom/ElementAttributeData.cpp:
      (WebCore::ElementAttributeData::addAttribute):
      (WebCore::ElementAttributeData::setAttributes):
      (WebCore::ElementAttributeData::replaceAttribute):
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::attributeChanged):
      (WebCore::StyledElement::parseAttribute):
      (WebCore::StyledElement::updateAttributeStyle):
      * dom/StyledElement.h:
      (WebCore::StyledElement::collectStyleForAttribute):
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::parseAttribute):
      * html/HTMLAnchorElement.h:
      * html/HTMLAppletElement.cpp:
      (WebCore::HTMLAppletElement::parseAttribute):
      * html/HTMLAppletElement.h:
      * html/HTMLAreaElement.cpp:
      (WebCore::HTMLAreaElement::parseAttribute):
      * html/HTMLAreaElement.h:
      * html/HTMLBRElement.cpp:
      (WebCore::HTMLBRElement::collectStyleForAttribute):
      * html/HTMLBRElement.h:
      * html/HTMLBaseElement.cpp:
      (WebCore::HTMLBaseElement::parseAttribute):
      * html/HTMLBaseElement.h:
      * html/HTMLBodyElement.cpp:
      (WebCore::HTMLBodyElement::collectStyleForAttribute):
      (WebCore::HTMLBodyElement::parseAttribute):
      * html/HTMLBodyElement.h:
      * html/HTMLButtonElement.cpp:
      (WebCore::HTMLButtonElement::parseAttribute):
      * html/HTMLButtonElement.h:
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::parseAttribute):
      * html/HTMLCanvasElement.h:
      * html/HTMLDetailsElement.cpp:
      (WebCore::HTMLDetailsElement::parseAttribute):
      * html/HTMLDetailsElement.h:
      * html/HTMLDivElement.cpp:
      (WebCore::HTMLDivElement::collectStyleForAttribute):
      * html/HTMLDivElement.h:
      * html/HTMLElement.cpp:
      (WebCore::parseBorderWidthAttribute):
      (WebCore::HTMLElement::applyBorderAttributeToStyle):
      (WebCore::HTMLElement::mapLanguageAttributeToLocale):
      (WebCore::HTMLElement::collectStyleForAttribute):
      (WebCore::HTMLElement::parseAttribute):
      (WebCore::HTMLElement::applyAlignmentAttributeToStyle):
      (WebCore::HTMLElement::dirAttributeChanged):
      * html/HTMLElement.h:
      * html/HTMLEmbedElement.cpp:
      (WebCore::HTMLEmbedElement::collectStyleForAttribute):
      (WebCore::HTMLEmbedElement::parseAttribute):
      * html/HTMLEmbedElement.h:
      * html/HTMLFontElement.cpp:
      (WebCore::HTMLFontElement::collectStyleForAttribute):
      * html/HTMLFontElement.h:
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::parseAttribute):
      * html/HTMLFormControlElement.h:
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::parseAttribute):
      * html/HTMLFormElement.h:
      * html/HTMLFrameElement.cpp:
      (WebCore::HTMLFrameElement::parseAttribute):
      * html/HTMLFrameElement.h:
      * html/HTMLFrameElementBase.cpp:
      (WebCore::HTMLFrameElementBase::parseAttribute):
      * html/HTMLFrameElementBase.h:
      (HTMLFrameElementBase):
      * html/HTMLFrameSetElement.cpp:
      (WebCore::HTMLFrameSetElement::collectStyleForAttribute):
      (WebCore::HTMLFrameSetElement::parseAttribute):
      * html/HTMLFrameSetElement.h:
      * html/HTMLHRElement.cpp:
      (WebCore::HTMLHRElement::collectStyleForAttribute):
      * html/HTMLHRElement.h:
      * html/HTMLIFrameElement.cpp:
      (WebCore::HTMLIFrameElement::collectStyleForAttribute):
      (WebCore::HTMLIFrameElement::parseAttribute):
      * html/HTMLIFrameElement.h:
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::collectStyleForAttribute):
      (WebCore::HTMLImageElement::parseAttribute):
      * html/HTMLImageElement.h:
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::updateType):
      (WebCore::HTMLInputElement::collectStyleForAttribute):
      (WebCore::HTMLInputElement::parseAttribute):
      (WebCore::HTMLInputElement::parseMaxLengthAttribute):
      * html/HTMLInputElement.h:
      * html/HTMLKeygenElement.cpp:
      (WebCore::HTMLKeygenElement::parseAttribute):
      * html/HTMLKeygenElement.h:
      * html/HTMLLIElement.cpp:
      (WebCore::HTMLLIElement::collectStyleForAttribute):
      (WebCore::HTMLLIElement::parseAttribute):
      * html/HTMLLIElement.h:
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::parseAttribute):
      * html/HTMLLinkElement.h:
      * html/HTMLMapElement.cpp:
      (WebCore::HTMLMapElement::parseAttribute):
      * html/HTMLMapElement.h:
      * html/HTMLMarqueeElement.cpp:
      (WebCore::HTMLMarqueeElement::collectStyleForAttribute):
      * html/HTMLMarqueeElement.h:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::parseAttribute):
      * html/HTMLMediaElement.h:
      * html/HTMLMetaElement.cpp:
      (WebCore::HTMLMetaElement::parseAttribute):
      * html/HTMLMetaElement.h:
      * html/HTMLMeterElement.cpp:
      (WebCore::HTMLMeterElement::parseAttribute):
      * html/HTMLMeterElement.h:
      * html/HTMLOListElement.cpp:
      (WebCore::HTMLOListElement::collectStyleForAttribute):
      (WebCore::HTMLOListElement::parseAttribute):
      * html/HTMLOListElement.h:
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::collectStyleForAttribute):
      (WebCore::HTMLObjectElement::parseAttribute):
      * html/HTMLObjectElement.h:
      * html/HTMLOptGroupElement.cpp:
      (WebCore::HTMLOptGroupElement::parseAttribute):
      * html/HTMLOptGroupElement.h:
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::parseAttribute):
      * html/HTMLOptionElement.h:
      * html/HTMLOutputElement.cpp:
      (WebCore::HTMLOutputElement::parseAttribute):
      * html/HTMLOutputElement.h:
      * html/HTMLParagraphElement.cpp:
      (WebCore::HTMLParagraphElement::collectStyleForAttribute):
      * html/HTMLParagraphElement.h:
      * html/HTMLPlugInElement.cpp:
      (WebCore::HTMLPlugInElement::collectStyleForAttribute):
      * html/HTMLPlugInElement.h:
      * html/HTMLPreElement.cpp:
      (WebCore::HTMLPreElement::collectStyleForAttribute):
      * html/HTMLPreElement.h:
      * html/HTMLProgressElement.cpp:
      (WebCore::HTMLProgressElement::parseAttribute):
      * html/HTMLProgressElement.h:
      * html/HTMLScriptElement.cpp:
      (WebCore::HTMLScriptElement::parseAttribute):
      * html/HTMLScriptElement.h:
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::parseAttribute):
      (WebCore::HTMLSelectElement::parseMultipleAttribute):
      * html/HTMLSelectElement.h:
      * html/HTMLStyleElement.cpp:
      (WebCore::HTMLStyleElement::parseAttribute):
      * html/HTMLStyleElement.h:
      * html/HTMLTableCaptionElement.cpp:
      (WebCore::HTMLTableCaptionElement::collectStyleForAttribute):
      * html/HTMLTableCaptionElement.h:
      * html/HTMLTableCellElement.cpp:
      (WebCore::HTMLTableCellElement::collectStyleForAttribute):
      (WebCore::HTMLTableCellElement::parseAttribute):
      * html/HTMLTableCellElement.h:
      * html/HTMLTableColElement.cpp:
      (WebCore::HTMLTableColElement::collectStyleForAttribute):
      (WebCore::HTMLTableColElement::parseAttribute):
      * html/HTMLTableColElement.h:
      * html/HTMLTableElement.cpp:
      (WebCore::HTMLTableElement::collectStyleForAttribute):
      (WebCore::HTMLTableElement::parseAttribute):
      * html/HTMLTableElement.h:
      * html/HTMLTablePartElement.cpp:
      (WebCore::HTMLTablePartElement::collectStyleForAttribute):
      * html/HTMLTablePartElement.h:
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::collectStyleForAttribute):
      (WebCore::HTMLTextAreaElement::parseAttribute):
      * html/HTMLTextAreaElement.h:
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::parseAttribute):
      * html/HTMLTextFormControlElement.h:
      * html/HTMLTrackElement.cpp:
      (WebCore::HTMLTrackElement::parseAttribute):
      * html/HTMLTrackElement.h:
      * html/HTMLUListElement.cpp:
      (WebCore::HTMLUListElement::collectStyleForAttribute):
      * html/HTMLUListElement.h:
      * html/HTMLVideoElement.cpp:
      (WebCore::HTMLVideoElement::collectStyleForAttribute):
      (WebCore::HTMLVideoElement::parseAttribute):
      * html/HTMLVideoElement.h:
      * html/shadow/HTMLContentElement.cpp:
      (WebCore::HTMLContentElement::parseAttribute):
      * html/shadow/HTMLContentElement.h:
      * mathml/MathMLElement.cpp:
      (WebCore::MathMLElement::collectStyleForAttribute):
      * mathml/MathMLElement.h:
      * svg/SVGAElement.cpp:
      (WebCore::SVGAElement::parseAttribute):
      * svg/SVGAElement.h:
      * svg/SVGAnimateMotionElement.cpp:
      (WebCore::SVGAnimateMotionElement::parseAttribute):
      * svg/SVGAnimateMotionElement.h:
      * svg/SVGAnimateTransformElement.cpp:
      (WebCore::SVGAnimateTransformElement::parseAttribute):
      * svg/SVGAnimateTransformElement.h:
      * svg/SVGAnimationElement.cpp:
      (WebCore::SVGAnimationElement::parseAttribute):
      * svg/SVGAnimationElement.h:
      * svg/SVGCircleElement.cpp:
      (WebCore::SVGCircleElement::parseAttribute):
      * svg/SVGCircleElement.h:
      * svg/SVGClipPathElement.cpp:
      (WebCore::SVGClipPathElement::parseAttribute):
      * svg/SVGClipPathElement.h:
      * svg/SVGComponentTransferFunctionElement.cpp:
      (WebCore::SVGComponentTransferFunctionElement::parseAttribute):
      * svg/SVGComponentTransferFunctionElement.h:
      * svg/SVGCursorElement.cpp:
      (WebCore::SVGCursorElement::parseAttribute):
      * svg/SVGCursorElement.h:
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::reportAttributeParsingError):
      (WebCore::SVGElement::parseAttribute):
      (WebCore::SVGElement::attributeChanged):
      * svg/SVGElement.h:
      * svg/SVGEllipseElement.cpp:
      (WebCore::SVGEllipseElement::parseAttribute):
      * svg/SVGEllipseElement.h:
      * svg/SVGExternalResourcesRequired.cpp:
      (WebCore::SVGExternalResourcesRequired::parseAttribute):
      * svg/SVGExternalResourcesRequired.h:
      (SVGExternalResourcesRequired):
      * svg/SVGFEBlendElement.cpp:
      (WebCore::SVGFEBlendElement::parseAttribute):
      * svg/SVGFEBlendElement.h:
      * svg/SVGFEColorMatrixElement.cpp:
      (WebCore::SVGFEColorMatrixElement::parseAttribute):
      * svg/SVGFEColorMatrixElement.h:
      * svg/SVGFEComponentTransferElement.cpp:
      (WebCore::SVGFEComponentTransferElement::parseAttribute):
      * svg/SVGFEComponentTransferElement.h:
      * svg/SVGFECompositeElement.cpp:
      (WebCore::SVGFECompositeElement::parseAttribute):
      * svg/SVGFECompositeElement.h:
      * svg/SVGFEConvolveMatrixElement.cpp:
      (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
      * svg/SVGFEConvolveMatrixElement.h:
      * svg/SVGFEDiffuseLightingElement.cpp:
      (WebCore::SVGFEDiffuseLightingElement::parseAttribute):
      * svg/SVGFEDiffuseLightingElement.h:
      * svg/SVGFEDisplacementMapElement.cpp:
      (WebCore::SVGFEDisplacementMapElement::parseAttribute):
      * svg/SVGFEDisplacementMapElement.h:
      * svg/SVGFEDropShadowElement.cpp:
      (WebCore::SVGFEDropShadowElement::parseAttribute):
      * svg/SVGFEDropShadowElement.h:
      * svg/SVGFEGaussianBlurElement.cpp:
      (WebCore::SVGFEGaussianBlurElement::parseAttribute):
      * svg/SVGFEGaussianBlurElement.h:
      * svg/SVGFEImageElement.cpp:
      (WebCore::SVGFEImageElement::parseAttribute):
      * svg/SVGFEImageElement.h:
      * svg/SVGFELightElement.cpp:
      (WebCore::SVGFELightElement::parseAttribute):
      * svg/SVGFELightElement.h:
      * svg/SVGFEMergeNodeElement.cpp:
      (WebCore::SVGFEMergeNodeElement::parseAttribute):
      * svg/SVGFEMergeNodeElement.h:
      * svg/SVGFEMorphologyElement.cpp:
      (WebCore::SVGFEMorphologyElement::parseAttribute):
      * svg/SVGFEMorphologyElement.h:
      * svg/SVGFEOffsetElement.cpp:
      (WebCore::SVGFEOffsetElement::parseAttribute):
      * svg/SVGFEOffsetElement.h:
      * svg/SVGFESpecularLightingElement.cpp:
      (WebCore::SVGFESpecularLightingElement::parseAttribute):
      * svg/SVGFESpecularLightingElement.h:
      * svg/SVGFETileElement.cpp:
      (WebCore::SVGFETileElement::parseAttribute):
      * svg/SVGFETileElement.h:
      * svg/SVGFETurbulenceElement.cpp:
      (WebCore::SVGFETurbulenceElement::parseAttribute):
      * svg/SVGFETurbulenceElement.h:
      * svg/SVGFilterElement.cpp:
      (WebCore::SVGFilterElement::parseAttribute):
      * svg/SVGFilterElement.h:
      * svg/SVGFilterPrimitiveStandardAttributes.cpp:
      (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
      * svg/SVGFilterPrimitiveStandardAttributes.h:
      (SVGFilterPrimitiveStandardAttributes):
      * svg/SVGFitToViewBox.cpp:
      (WebCore::SVGFitToViewBox::parseAttribute):
      * svg/SVGFitToViewBox.h:
      (SVGFitToViewBox):
      * svg/SVGFontFaceElement.cpp:
      (WebCore::SVGFontFaceElement::parseAttribute):
      * svg/SVGFontFaceElement.h:
      * svg/SVGFontFaceUriElement.cpp:
      (WebCore::SVGFontFaceUriElement::parseAttribute):
      * svg/SVGFontFaceUriElement.h:
      * svg/SVGForeignObjectElement.cpp:
      (WebCore::SVGForeignObjectElement::parseAttribute):
      * svg/SVGForeignObjectElement.h:
      * svg/SVGGElement.cpp:
      (WebCore::SVGGElement::parseAttribute):
      * svg/SVGGElement.h:
      * svg/SVGGlyphElement.cpp:
      (WebCore::SVGGlyphElement::parseAttribute):
      * svg/SVGGlyphElement.h:
      * svg/SVGGlyphRefElement.cpp:
      (WebCore::SVGGlyphRefElement::parseAttribute):
      * svg/SVGGlyphRefElement.h:
      * svg/SVGGradientElement.cpp:
      (WebCore::SVGGradientElement::parseAttribute):
      * svg/SVGGradientElement.h:
      * svg/SVGImageElement.cpp:
      (WebCore::SVGImageElement::collectStyleForAttribute):
      (WebCore::SVGImageElement::parseAttribute):
      * svg/SVGImageElement.h:
      * svg/SVGImageLoader.cpp:
      (WebCore::SVGImageLoader::sourceURI):
      * svg/SVGLangSpace.cpp:
      (WebCore::SVGLangSpace::parseAttribute):
      * svg/SVGLangSpace.h:
      (SVGLangSpace):
      * svg/SVGLineElement.cpp:
      (WebCore::SVGLineElement::parseAttribute):
      * svg/SVGLineElement.h:
      * svg/SVGLinearGradientElement.cpp:
      (WebCore::SVGLinearGradientElement::parseAttribute):
      * svg/SVGLinearGradientElement.h:
      * svg/SVGMPathElement.cpp:
      (WebCore::SVGMPathElement::parseAttribute):
      * svg/SVGMPathElement.h:
      * svg/SVGMarkerElement.cpp:
      (WebCore::SVGMarkerElement::parseAttribute):
      * svg/SVGMarkerElement.h:
      * svg/SVGMaskElement.cpp:
      (WebCore::SVGMaskElement::parseAttribute):
      * svg/SVGMaskElement.h:
      * svg/SVGPathElement.cpp:
      (WebCore::SVGPathElement::parseAttribute):
      * svg/SVGPathElement.h:
      * svg/SVGPatternElement.cpp:
      (WebCore::SVGPatternElement::parseAttribute):
      * svg/SVGPatternElement.h:
      * svg/SVGPolyElement.cpp:
      (WebCore::SVGPolyElement::parseAttribute):
      * svg/SVGPolyElement.h:
      * svg/SVGRadialGradientElement.cpp:
      (WebCore::SVGRadialGradientElement::parseAttribute):
      * svg/SVGRadialGradientElement.h:
      * svg/SVGRectElement.cpp:
      (WebCore::SVGRectElement::parseAttribute):
      * svg/SVGRectElement.h:
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::parseAttribute):
      * svg/SVGSVGElement.h:
      * svg/SVGScriptElement.cpp:
      (WebCore::SVGScriptElement::parseAttribute):
      * svg/SVGScriptElement.h:
      * svg/SVGStopElement.cpp:
      (WebCore::SVGStopElement::parseAttribute):
      * svg/SVGStopElement.h:
      * svg/SVGStyleElement.cpp:
      (WebCore::SVGStyleElement::parseAttribute):
      * svg/SVGStyleElement.h:
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::collectStyleForAttribute):
      (WebCore::SVGStyledElement::parseAttribute):
      * svg/SVGStyledElement.h:
      * svg/SVGStyledTransformableElement.cpp:
      (WebCore::SVGStyledTransformableElement::parseAttribute):
      * svg/SVGStyledTransformableElement.h:
      * svg/SVGSymbolElement.cpp:
      (WebCore::SVGSymbolElement::parseAttribute):
      * svg/SVGSymbolElement.h:
      * svg/SVGTRefElement.cpp:
      (WebCore::SVGTRefElement::parseAttribute):
      * svg/SVGTRefElement.h:
      * svg/SVGTests.cpp:
      (WebCore::SVGTests::parseAttribute):
      * svg/SVGTests.h:
      (SVGTests):
      * svg/SVGTextContentElement.cpp:
      (WebCore::SVGTextContentElement::collectStyleForAttribute):
      (WebCore::SVGTextContentElement::parseAttribute):
      * svg/SVGTextContentElement.h:
      * svg/SVGTextElement.cpp:
      (WebCore::SVGTextElement::parseAttribute):
      * svg/SVGTextElement.h:
      * svg/SVGTextPathElement.cpp:
      (WebCore::SVGTextPathElement::parseAttribute):
      * svg/SVGTextPathElement.h:
      * svg/SVGTextPositioningElement.cpp:
      (WebCore::SVGTextPositioningElement::parseAttribute):
      * svg/SVGTextPositioningElement.h:
      * svg/SVGURIReference.cpp:
      (WebCore::SVGURIReference::parseAttribute):
      * svg/SVGURIReference.h:
      (SVGURIReference):
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::parseAttribute):
      * svg/SVGUseElement.h:
      * svg/SVGViewElement.cpp:
      (WebCore::SVGViewElement::parseAttribute):
      * svg/SVGViewElement.h:
      * svg/SVGZoomAndPan.cpp:
      (WebCore::SVGZoomAndPan::parseAttribute):
      * svg/SVGZoomAndPan.h:
      (SVGZoomAndPan):
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::SVGSMILElement::parseAttribute):
      * svg/animation/SVGSMILElement.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      260fca8b
  23. 14 May, 2012 1 commit
    • gavinp@chromium.org's avatar
      Add Prerenderer, PrerenderHandle and a chromium interface for Prerendering. · af445b98
      gavinp@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=85005
      
      Reviewed by Adam Barth.
      
      Source/Platform:
      
      * Platform.gypi:
      * chromium/public/WebPrerender.h:
      (WebKit::WebPrerender::referrer):
      (WebCore):
      (WebPrerender):
      * chromium/public/WebPrerenderingSupport.h:
      (WebKit):
      (WebPrerenderingSupport):
      * chromium/public/WebURLRequest.h:
      * chromium/src/WebPrerenderingSupport.cpp: Added.
      (WebKit):
      (WebKit::WebPrerenderingSupport::initialize):
      (WebKit::WebPrerenderingSupport::shutdown):
      (WebKit::WebPrerenderingSupport::current):
      
      Source/WebCore:
      
      The prerender case isn't quite a resource load, and using resource loading to
      retrieve them has constrained the API, and unnecessarily complicated the loader.
      
      The new Prerenderer and PrerenderHandle let <link rel=prerender...> elements signal
      removal and unload to their platform.
      
      No new tests, as this interface requires a full platform to work, and doesn't affect layout.  Test
      it with your platform when implemented for it.
      
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/Document.cpp:
      (WebCore::Document::Document):
      * dom/Document.h:
      (WebCore):
      (Document):
      (WebCore::Document::prerenderer):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::removedFrom):
      * html/LinkRelAttribute.cpp:
      (WebCore::LinkRelAttribute::LinkRelAttribute):
      * html/LinkRelAttribute.h:
      (LinkRelAttribute):
      * loader/LinkLoader.cpp:
      (WebCore::LinkLoader::loadLink):
      (WebCore::LinkLoader::released):
      * loader/LinkLoader.h:
      (WebCore):
      (LinkLoader):
      * loader/Prerenderer.cpp: Added.
      (WebCore):
      (WebCore::Prerenderer::create):
      (WebCore::Prerenderer::Prerenderer):
      (WebCore::Prerenderer::~Prerenderer):
      (WebCore::Prerenderer::render):
      (WebCore::Prerenderer::stop):
      (WebCore::Prerenderer::suspend):
      (WebCore::Prerenderer::resume):
      (WebCore::Prerenderer::document):
      (WebCore::Prerenderer::client):
      * loader/Prerenderer.h: Copied from Source/Platform/chromium/public/WebPrerender.h.
      (WebCore):
      (Prerenderer):
      * loader/PrerendererClient.cpp: Copied from Source/WebCore/html/LinkRelAttribute.h.
      (WebCore):
      (WebCore::PrerendererClient::supplementName):
      (WebCore::PrerendererClient::from):
      (WebCore::providePrerendererClientTo):
      * loader/PrerendererClient.h: Copied from Source/WebCore/html/LinkRelAttribute.h.
      (WebCore):
      (PrerendererClient):
      (WebCore::PrerendererClient::~PrerendererClient):
      (WebCore::PrerendererClient::PrerendererClient):
      * loader/cache/CachedResource.cpp:
      (WebCore::defaultPriorityForResourceType):
      (WebCore::cachedResourceTypeToTargetType):
      (WebCore::CachedResource::load):
      * loader/cache/CachedResource.h:
      (WebCore::CachedResource::ignoreForRequestCount):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::createResource):
      (WebCore::CachedResourceLoader::requestLinkResource):
      (WebCore::CachedResourceLoader::checkInsecureContent):
      (WebCore::CachedResourceLoader::canRequest):
      * platform/PrerenderHandle.h: Copied from Source/Platform/chromium/public/WebPrerender.h.
      (WebCore):
      (PrerenderHandle):
      * platform/chromium/Prerender.cpp: Added.
      (WebCore):
      (WebCore::Prerender::Prerender):
      (WebCore::Prerender::~Prerender):
      (WebCore::Prerender::setState):
      (WebCore::Prerender::add):
      (WebCore::Prerender::cancel):
      (WebCore::Prerender::abandon):
      (WebCore::Prerender::suspend):
      (WebCore::Prerender::resume):
      * platform/chromium/Prerender.h: Copied from Source/Platform/chromium/public/WebPrerender.h.
      (WebCore):
      (Prerender):
      (ExtraData):
      (WebCore::Prerender::ExtraData::~ExtraData):
      (WebCore::Prerender::url):
      (WebCore::Prerender::referrer):
      (WebCore::Prerender::referrerPolicy):
      (WebCore::Prerender::setExtraData):
      (WebCore::Prerender::extraData):
      * platform/chromium/PrerenderHandle.cpp: Copied from Source/Platform/chromium/public/WebPrerender.h.
      (WebCore):
      (WebCore::PrerenderHandle::create):
      (WebCore::PrerenderHandle::PrerenderHandle):
      (WebCore::PrerenderHandle::~PrerenderHandle):
      (WebCore::PrerenderHandle::prerender):
      (WebCore::PrerenderHandle::add):
      (WebCore::PrerenderHandle::cancel):
      (WebCore::PrerenderHandle::abandon):
      (WebCore::PrerenderHandle::suspend):
      (WebCore::PrerenderHandle::resume):
      (WebCore::PrerenderHandle::url):
      (WebCore::PrerenderHandle::referrer):
      (WebCore::PrerenderHandle::referrerPolicy):
      * platform/chromium/support/WebPrerender.cpp: Copied from Source/Platform/chromium/public/WebPrerender.h.
      (WebKit::WebPrerender::WebPrerender):
      (WebKit):
      (WebKit::WebPrerender::~WebPrerender):
      (WebKit::WebPrerender::url):
      (WebKit::WebPrerender::referrer):
      (WebKit::WebPrerender::referrerPolicy):
      (WebKit::WebPrerender::setExtraData):
      (WebKit::WebPrerender::extraData):
      * platform/network/blackberry/ResourceRequest.h:
      * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
      (WebCore::platformTargetTypeForRequest):
      * platform/network/chromium/ResourceRequest.h:
      
      Source/WebKit/chromium:
      
      The prerender case isn't quite a resource load, and using resource loading to
      retrieve them has constrained the API, and unnecessarily complicated the loader.
      
      The new Prerenderer and PrerenderHandle let <link rel=prerender...> elements signal
      removal and unload to their platform.
      
      * WebKit.gyp:
      * public/WebView.h:
      * src/PrerendererClientImpl.cpp: Copied from Source/WebCore/html/LinkRelAttribute.h.
      (WebKit):
      (WebKit::PrerendererClientImpl::PrerendererClientImpl):
      (WebKit::PrerendererClientImpl::willAddPrerender):
      * src/PrerendererClientImpl.h: Copied from Source/WebCore/html/LinkRelAttribute.h.
      (WebCore):
      (WebKit):
      (PrerendererClientImpl):
      * src/WebKit.cpp:
      (WebKit::shutdown):
      * src/WebViewImpl.cpp:
      (WebKit::WebViewImpl::setPrerendererClient):
      (WebKit):
      * src/WebViewImpl.h:
      (WebKit):
      (WebViewImpl):
      
      LayoutTests:
      
      The prerender case isn't quite a resource load, and using resource loading to
      retrieve them has constrained the API, and unnecessarily complicated the loader.
      
      The new Prerenderer and PrerenderHandle let <link rel=prerender...> elements signal
      removal and unload to their platform.
      
      These tests are being removed, and expectations updated, because the old phantom-load
      prerendering interface was susceptible to layout testing, and the new interface requires
      a full platform to test, so it can't really be a layout test.
      
      * fast/dom/HTMLLinkElement/prerender-expected.txt: Removed.
      * fast/dom/HTMLLinkElement/prerender.html: Removed.
      * platform/gtk/test_expectations.txt:
      * platform/mac/Skipped:
      * platform/qt/Skipped:
      * platform/win/Skipped:
      * platform/wincairo/Skipped:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      af445b98
  24. 08 May, 2012 1 commit
    • kling@webkit.org's avatar
      Element: isURLAttribute() should take a const Attribute&. · d8a6d153
      kling@webkit.org authored
      <http://webkit.org/b/85890>
      
      Reviewed by Anders Carlsson.
      
      Change isURLAttribute(Attribute*) to isURLAttribute(const Attribute&) to enforce
      the fact that the Attribute can't be null, and shouldn't be mutated, at compile-time.
      Also sprinkle OVERRIDE while we're at it.
      
      * dom/Element.cpp:
      (WebCore::Element::getURLAttribute):
      (WebCore::Element::getNonEmptyURLAttribute):
      * dom/Element.h:
      (WebCore::Element::isURLAttribute):
      * editing/MarkupAccumulator.cpp:
      (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
      (WebCore::MarkupAccumulator::appendAttribute):
      * editing/markup.cpp:
      (WebCore::completeURLs):
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::isURLAttribute):
      * html/HTMLAnchorElement.h:
      * html/HTMLBaseElement.cpp:
      (WebCore::HTMLBaseElement::isURLAttribute):
      * html/HTMLBaseElement.h:
      * html/HTMLBodyElement.cpp:
      (WebCore::HTMLBodyElement::isURLAttribute):
      * html/HTMLBodyElement.h:
      * html/HTMLButtonElement.cpp:
      (WebCore::HTMLButtonElement::isURLAttribute):
      * html/HTMLButtonElement.h:
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::isURLAttribute):
      * html/HTMLElement.h:
      * html/HTMLEmbedElement.cpp:
      (WebCore::HTMLEmbedElement::isURLAttribute):
      * html/HTMLEmbedElement.h:
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::isURLAttribute):
      * html/HTMLFormElement.h:
      * html/HTMLFrameElementBase.cpp:
      (WebCore::HTMLFrameElementBase::isURLAttribute):
      * html/HTMLFrameElementBase.h:
      (HTMLFrameElementBase):
      * html/HTMLHtmlElement.cpp:
      (WebCore::HTMLHtmlElement::isURLAttribute):
      * html/HTMLHtmlElement.h:
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::isURLAttribute):
      * html/HTMLImageElement.h:
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::isURLAttribute):
      * html/HTMLInputElement.h:
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::isURLAttribute):
      * html/HTMLLinkElement.h:
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::isURLAttribute):
      * html/HTMLMediaElement.h:
      * html/HTMLModElement.cpp:
      (WebCore::HTMLModElement::isURLAttribute):
      * html/HTMLModElement.h:
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::isURLAttribute):
      * html/HTMLObjectElement.h:
      * html/HTMLParamElement.cpp:
      (WebCore::HTMLParamElement::isURLAttribute):
      * html/HTMLParamElement.h:
      * html/HTMLQuoteElement.cpp:
      (WebCore::HTMLQuoteElement::isURLAttribute):
      * html/HTMLQuoteElement.h:
      * html/HTMLScriptElement.cpp:
      (WebCore::HTMLScriptElement::isURLAttribute):
      * html/HTMLScriptElement.h:
      * html/HTMLSourceElement.cpp:
      (WebCore::HTMLSourceElement::isURLAttribute):
      * html/HTMLSourceElement.h:
      * html/HTMLTableCellElement.cpp:
      (WebCore::HTMLTableCellElement::isURLAttribute):
      * html/HTMLTableCellElement.h:
      * html/HTMLTableElement.cpp:
      (WebCore::HTMLTableElement::isURLAttribute):
      * html/HTMLTableElement.h:
      * html/HTMLTrackElement.cpp:
      (WebCore::HTMLTrackElement::isURLAttribute):
      * html/HTMLTrackElement.h:
      * html/HTMLVideoElement.cpp:
      (WebCore::HTMLVideoElement::isURLAttribute):
      * html/HTMLVideoElement.h:
      * svg/SVGScriptElement.cpp:
      (WebCore::SVGScriptElement::isURLAttribute):
      * svg/SVGScriptElement.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d8a6d153
  25. 03 May, 2012 1 commit
  26. 02 May, 2012 2 commits
    • antti@apple.com's avatar
      Move title and media queries from StyleSheetInternal to CSSStyleSheet · 50487e60
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=85387
      
      Reviewed by Anders Carlsson.
      
      Stylesheet title and media queries are determined by the owner, not by the stylesheet itself.
      The fields belong to CSSStyleSheet.
              
      This will make it easier to share StyleSheetInternal instances between documents.
      
      * css/CSSStyleSheet.cpp:
      (WebCore::StyleSheetInternal::StyleSheetInternal):
      (WebCore::StyleSheetInternal::isCacheable):
      (WebCore):
      (WebCore::CSSStyleSheet::setDisabled):
              
          Invalidate the document style directly instead of ping-ponging through StyleSheetInternal.
      
      (WebCore::CSSStyleSheet::setMediaQueries):
      (WebCore::CSSStyleSheet::media):
      * css/CSSStyleSheet.h:
      (StyleSheetInternal):
      (WebCore::StyleSheetInternal::originalURL):
      (WebCore::StyleSheetInternal::hasCharsetRule):
      (WebCore::CSSStyleSheet::mediaQueries):
      (CSSStyleSheet):
      (WebCore::CSSStyleSheet::setTitle):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::appendAuthorStylesheets):
      (WebCore::StyleResolver::collectMatchingRulesForList):
      * dom/DOMImplementation.cpp:
      (WebCore::DOMImplementation::createCSSStyleSheet):
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::setCSSStyleSheet):
      * dom/StyleElement.cpp:
      (WebCore::StyleElement::createSheet):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::parseAttribute):
      (WebCore::HTMLLinkElement::setCSSStyleSheet):
      * html/HTMLStyleElement.cpp:
      (WebCore::HTMLStyleElement::parseAttribute):
      * svg/SVGStyleElement.cpp:
      (WebCore::SVGStyleElement::parseAttribute):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      50487e60
    • antti@apple.com's avatar
      StyleSheetInternal::parseUserStyleSheet() should be called parseAuthorStyleSheet(). · f58faddc
      antti@apple.com authored
      Rubber-stamped by Nikolas Zimmermann.
      
      * css/CSSImportRule.cpp:
      (WebCore::StyleRuleImport::setCSSStyleSheet):
      * css/CSSStyleSheet.cpp:
      (WebCore::StyleSheetInternal::parseAuthorStyleSheet):
      * css/CSSStyleSheet.h:
      (StyleSheetInternal):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::setCSSStyleSheet):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f58faddc
  27. 30 Apr, 2012 1 commit
  28. 26 Apr, 2012 1 commit
    • antti@apple.com's avatar
      Cache parsed stylesheets · 52f660f5
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=85004
      
      Reviewed by Andreas Kling.
      
      CSS parsing is 1-2% of WebKit CPU usage on average pages, more on sites with large stylesheets.
      We currently reparse all stylesheets from source text when they are encountered again. In many
      browsing scenarios we can eliminate lot of this by caching the parsed stylesheets. For example 
      it is very common for subpages of a site to share the stylesheets.
              
      This patch enables memory caching for stylesheet loaded using the <link> element. Only stylesheets
      that have no import rules are cacheable for now.
              
      Cached stylesheets are copied on restore so there is no sharing (and no memory wins) yet.
      In the future we will also be able to share the actual data structures between pages for 
      significant memory savings.
              
      After browsing around for a while <5% of the memory cache data was in parsed stylesheets so this
      does not bloat the cache significantly.
      
      * css/CSSStyleSheet.cpp:
      (WebCore):
      (WebCore::StyleSheetInternal::estimatedSizeInBytes):
              
          Estimate stylesheet size so we can handle decoded data pruning correctly.
      
      * css/CSSStyleSheet.h:
      (StyleSheetInternal):
      * css/StylePropertySet.cpp:
      (WebCore::StylePropertySet::averageSizeInBytes):
      (WebCore):
      * css/StylePropertySet.h:
      (StylePropertySet):
      * css/StyleRule.cpp:
      (WebCore::StyleRule::averageSizeInBytes):
      (WebCore):
      * css/StyleRule.h:
      (StyleRule):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::setCSSStyleSheet):
              
          Save and restore parsed stylesheet. The current CSS parse context must be identical to the cached 
          stylesheets. This ensures that the parsing results would be identical.
      
      * loader/cache/CachedCSSStyleSheet.cpp:
      (WebCore):
      (WebCore::CachedCSSStyleSheet::destroyDecodedData):
      (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
      (WebCore::CachedCSSStyleSheet::saveParsedStyleSheet):
      * loader/cache/CachedCSSStyleSheet.h:
              
          The parsed stylesheet cache is considered decoded data, similar to the image bitmaps. It uses the
          same mechanism for pruning.
      
      (WebCore):
      (CachedCSSStyleSheet):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      52f660f5
  29. 25 Apr, 2012 2 commits
    • antti@apple.com's avatar
      Remove owner node pointer from StyleSheetInternal · fe126eb6
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=84882
      
      Reviewed by Andread Kling.
      
      To make sharing between multiple nodes possible StyleSheetInternal should not have a Node pointer.
              
      - Make StyleSheetInternal constructor take CSSParserContext instead of Node*
      - Move owner node pointer to CSSStyleSheet. CSSStyleSheet now acts as a client for StyleSheetInternal.
              
      This gets us closer to being able to cache stylesheet data structures.
              
      * css/CSSImportRule.cpp:
      (WebCore::StyleRuleImport::setCSSStyleSheet):
      (WebCore::StyleRuleImport::requestStyleSheet):
              
          Setup CSSParserContext.
          Remove FIXME about updateBaseURL(). It is no longer possible to change URL of StyleSheetInternal.
      
      * css/CSSPageRule.cpp:
      (WebCore::CSSPageRule::setSelectorText):
      * css/CSSParser.cpp:
      (WebCore::CSSParserContext::CSSParserContext):
      * css/CSSParserMode.h:
      (CSSParserContext):
          
          Expand CSSParserContext constructors.
      
      * css/CSSStyleRule.cpp:
      (WebCore::CSSStyleRule::setSelectorText):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::StyleResolver):
      (WebCore::StyleResolver::addAuthorRulesAndCollectUserRulesFromSheets):
      (WebCore::StyleResolver::collectMatchingRulesForList):
      * css/StyleResolver.h:
      (StyleResolver):
      * css/CSSStyleSheet.cpp:
      
          User stylesheets went back to being CSSStyleSheets. Adapt to that.
      
      (WebCore::StyleSheetInternal::StyleSheetInternal):
      (WebCore):
      (WebCore::StyleSheetInternal::checkLoaded):
      (WebCore::StyleSheetInternal::startLoadingDynamicSheet):
      (WebCore::StyleSheetInternal::rootStyleSheet):
      (WebCore::StyleSheetInternal::singleOwnerNode):
      (WebCore::StyleSheetInternal::singleOwnerDocument):
      (WebCore::StyleSheetInternal::styleSheetChanged):
              
          The owner node is now located through CSSStyleSheet. Only one client is supported atm.
      
      (WebCore::StyleSheetInternal::registerClient):
      (WebCore::StyleSheetInternal::unregisterClient):
              
          Register CSSStyleSheets.
      
      (WebCore::CSSStyleSheet::CSSStyleSheet):
      (WebCore::CSSStyleSheet::~CSSStyleSheet):
      (WebCore::CSSStyleSheet::rules):
      (WebCore::CSSStyleSheet::cssRules):
      (WebCore::CSSStyleSheet::ownerDocument):
      * css/CSSStyleSheet.h:
      (WebCore::StyleSheetInternal::create):
      (WebCore::StyleSheetInternal::createInline):
      (StyleSheetInternal):
      (WebCore::CSSStyleSheet::create):
      (CSSStyleSheet):
              
          Moved m_ownerNode.
          Changed constructors
          Removed setFinalURL(). 
      
      * css/PropertySetCSSStyleDeclaration.cpp:
      (WebCore::StyleRuleCSSStyleDeclaration::setNeedsStyleRecalc):
      * dom/Document.cpp:
      (WebCore::Document::updateBaseURL):
              
          Instead of setFinalURL, construct a new StyleSheetInternal if the base url ever changes.
      
      (WebCore::Document::pageUserSheet):
      (WebCore::Document::pageGroupUserSheets):
      (WebCore::Document::addUserSheet):
      (WebCore::Document::elementSheet):
      * dom/Document.h:
      (Document):
      (WebCore::Document::documentUserSheets):
              
          Adapt to the new interface.
          Turned user stylesheets CSSStyleSheets so they can find the owner node.
      
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::setCSSStyleSheet):
      * dom/StyleElement.cpp:
      (WebCore::StyleElement::createSheet):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::setCSSStyleSheet):
      * inspector/InspectorCSSAgent.cpp:
      (WebCore::SelectorProfile::startSelector):
      (WebCore::InspectorCSSAgent::bindStyleSheet):
      * inspector/InspectorStyleSheet.cpp:
      (WebCore::fillMediaListChain):
      (WebCore::InspectorStyleSheet::ownerDocument):
      * page/PageSerializer.cpp:
      (WebCore::PageSerializer::serializeCSSStyleSheet):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fe126eb6
    • alexis.menard@openbossa.org's avatar
      Rename CSSStyleSelector files to StyleResolver. · e6db2f6c
      alexis.menard@openbossa.org authored
      https://bugs.webkit.org/show_bug.cgi?id=84814
      
      Reviewed by Antti Koivisto.
      
      Rename CSSStyleSelector files to match the new class name StyleResolver.
      Update the includes all over the code base to the new name.
      
      Source/WebCore:
      
      No new tests : renaming files, no behavior changes expected.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSAllInOne.cpp:
      * css/CSSCalculationValue.cpp:
      * css/CSSFontSelector.cpp:
      * css/CSSGradientValue.cpp:
      * css/MediaQueryEvaluator.cpp:
      * css/MediaQueryMatcher.cpp:
      * css/SVGCSSStyleSelector.cpp:
      * css/StyleBuilder.cpp:
      * css/StyleMedia.cpp:
      * css/StyleResolver.cpp: Renamed from Source/WebCore/css/CSSStyleSelector.cpp.
      (WebCore):
      (RuleData):
      (WebCore::RuleData::position):
      (WebCore::RuleData::rule):
      (WebCore::RuleData::selector):
      (WebCore::RuleData::hasFastCheckableSelector):
      (WebCore::RuleData::hasMultipartSelector):
      (WebCore::RuleData::hasRightmostSelectorMatchingHTMLBasedOnRuleHash):
      (WebCore::RuleData::containsUncommonAttributeSelector):
      (WebCore::RuleData::specificity):
      (WebCore::RuleData::linkMatchType):
      (WebCore::RuleData::hasDocumentSecurityOrigin):
      (WebCore::RuleData::isInRegionRule):
      (WebCore::RuleData::descendantSelectorIdentifierHashes):
      (SameSizeAsRuleData):
      (RuleSet):
      (WebCore::RuleSet::create):
      (WebCore::RuleSet::disableAutoShrinkToFit):
      (WebCore::RuleSet::features):
      (WebCore::RuleSet::idRules):
      (WebCore::RuleSet::classRules):
      (WebCore::RuleSet::tagRules):
      (WebCore::RuleSet::shadowPseudoElementRules):
      (WebCore::RuleSet::linkPseudoClassRules):
      (WebCore::RuleSet::focusPseudoClassRules):
      (WebCore::RuleSet::universalRules):
      (WebCore::RuleSet::pageRules):
      (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
      (RuleSetSelectorPair):
      (WebCore::elementCanUseSimpleDefaultStyle):
      (WebCore::screenEval):
      (WebCore::printEval):
      (WebCore::leftToRightDeclaration):
      (WebCore::rightToLeftDeclaration):
      (WebCore::StyleResolver::StyleResolver):
      (WebCore::StyleResolver::addAuthorRulesAndCollectUserRulesFromSheets):
      (WebCore::makeRuleSet):
      (WebCore::StyleResolver::collectFeatures):
      (WebCore::StyleResolver::determineScope):
      (WebCore::StyleResolver::ruleSetForScope):
      (WebCore::StyleResolver::appendAuthorStylesheets):
      (WebCore::StyleResolver::setupScopeStack):
      (WebCore::StyleResolver::pushScope):
      (WebCore::StyleResolver::popScope):
      (WebCore::StyleResolver::pushParentElement):
      (WebCore::StyleResolver::popParentElement):
      (WebCore::StyleResolver::pushParentShadowRoot):
      (WebCore::StyleResolver::popParentShadowRoot):
      (WebCore::StyleResolver::addKeyframeStyle):
      (WebCore::StyleResolver::~StyleResolver):
      (WebCore::StyleResolver::sweepMatchedPropertiesCache):
      (WebCore::StyleResolver::Features::Features):
      (WebCore::StyleResolver::Features::~Features):
      (WebCore::StyleResolver::Features::add):
      (WebCore::StyleResolver::Features::clear):
      (WebCore::parseUASheet):
      (WebCore::loadFullDefaultStyle):
      (WebCore::loadSimpleDefaultStyle):
      (WebCore::loadViewSourceStyle):
      (WebCore::ensureDefaultStyleSheetsForElement):
      (WebCore::StyleResolver::addMatchedProperties):
      (WebCore::StyleResolver::addElementStyleProperties):
      (WebCore::StyleResolver::collectMatchingRules):
      (WebCore::StyleResolver::collectMatchingRulesForRegion):
      (WebCore::StyleResolver::sortAndTransferMatchedRules):
      (WebCore::StyleResolver::matchScopedAuthorRules):
      (WebCore::StyleResolver::matchAuthorRules):
      (WebCore::StyleResolver::matchUserRules):
      (WebCore::StyleResolver::matchUARules):
      (MatchingUARulesScope):
      (WebCore::MatchingUARulesScope::MatchingUARulesScope):
      (WebCore::MatchingUARulesScope::~MatchingUARulesScope):
      (WebCore::MatchingUARulesScope::isMatchingUARules):
      (WebCore::StyleResolver::collectMatchingRulesForList):
      * css/StyleResolver.h: Renamed from Source/WebCore/css/CSSStyleSelector.h.
      (WebCore):
      (MediaQueryResult):
      (WebCore::MediaQueryResult::MediaQueryResult):
      (StyleResolver):
      (WebCore::StyleResolver::style):
      (WebCore::StyleResolver::parentStyle):
      (WebCore::StyleResolver::rootElementStyle):
      (WebCore::StyleResolver::element):
      (WebCore::StyleResolver::document):
      (WebCore::StyleResolver::fontDescription):
      (WebCore::StyleResolver::parentFontDescription):
      (WebCore::StyleResolver::setFontDescription):
      (WebCore::StyleResolver::setZoom):
      (WebCore::StyleResolver::setEffectiveZoom):
      (WebCore::StyleResolver::setTextSizeAdjust):
      (WebCore::StyleResolver::hasParentNode):
      (WebCore::StyleResolver::pushScope):
      (WebCore::StyleResolver::popScope):
      (WebCore::StyleResolver::setStyle):
      (WebCore::StyleResolver::fontSelector):
      (WebCore::StyleResolver::allVisitedStateChanged):
      (WebCore::StyleResolver::visitedStateChanged):
      (WebCore::StyleResolver::usesSiblingRules):
      (WebCore::StyleResolver::usesFirstLineRules):
      (WebCore::StyleResolver::usesBeforeAfterRules):
      (WebCore::StyleResolver::usesLinkRules):
      (WebCore::StyleResolver::RuleFeature::RuleFeature):
      (RuleFeature):
      (Features):
      (WebCore::StyleResolver::addMatchedRule):
      (WebCore::StyleResolver::MatchRanges::MatchRanges):
      (MatchRanges):
      (WebCore::StyleResolver::MatchedProperties::MatchedProperties):
      (MatchedProperties):
      (WebCore::StyleResolver::MatchResult::MatchResult):
      (MatchResult):
      (WebCore::StyleResolver::MatchOptions::MatchOptions):
      (MatchOptions):
      (WebCore::StyleResolver::isRightPage):
      (WebCore::StyleResolver::styleNotYetAvailable):
      (WebCore::StyleResolver::applyPropertyToRegularStyle):
      (WebCore::StyleResolver::applyPropertyToVisitedLinkStyle):
      (MatchedPropertiesCacheItem):
      (WebCore::StyleResolver::scopeStackIsConsistent):
      (WebCore::StyleResolver::ScopeStackFrame::ScopeStackFrame):
      (ScopeStackFrame):
      * css/WebKitCSSMatrix.cpp:
      * dom/Document.cpp:
      * dom/Element.cpp:
      * dom/Node.cpp:
      * dom/ShadowRoot.cpp:
      * dom/ShadowTree.cpp:
      * dom/StyledElement.cpp:
      * editing/ApplyStyleCommand.cpp:
      * editing/EditingStyle.cpp:
      * editing/Editor.cpp:
      * editing/markup.cpp:
      * history/CachedPage.cpp:
      * html/HTMLDocument.cpp:
      * html/HTMLLinkElement.cpp:
      * html/HTMLOptGroupElement.cpp:
      * html/HTMLOptionElement.cpp:
      * html/ValidationMessage.cpp:
      * html/canvas/CanvasRenderingContext2D.cpp:
      * html/shadow/MediaControlElements.cpp:
      * inspector/InspectorCSSAgent.cpp:
      * inspector/InspectorDOMAgent.cpp:
      * inspector/InspectorStyleSheet.cpp:
      * loader/LinkLoader.cpp:
      * page/DOMWindow.cpp:
      * page/FrameView.cpp:
      * page/Page.cpp:
      * page/animation/KeyframeAnimation.cpp:
      * platform/qt/RenderThemeQt.cpp:
      * platform/qt/RenderThemeQtMobile.cpp:
      * rendering/RenderLayer.cpp:
      * rendering/RenderLayerBacking.cpp:
      * rendering/RenderListBox.cpp:
      * rendering/RenderMenuList.cpp:
      * rendering/RenderObject.cpp:
      * rendering/RenderRegion.cpp:
      * rendering/RenderSlider.cpp:
      * rendering/RenderTextControlSingleLine.cpp:
      * rendering/RenderThemeMac.mm:
      * rendering/RenderThemeSafari.cpp:
      * rendering/style/RenderStyle.cpp:
      * rendering/style/StyleGeneratedImage.cpp:
      * rendering/style/StyleRareNonInheritedData.cpp:
      * rendering/svg/RenderSVGInlineText.cpp:
      * svg/SVGClipPathElement.cpp:
      * svg/SVGElement.cpp:
      * svg/SVGFontFaceElement.cpp:
      * svg/SVGGradientElement.cpp:
      * svg/SVGMaskElement.cpp:
      * svg/SVGUseElement.cpp:
      
      Source/WebKit/chromium:
      
      * src/AutofillPopupMenuClient.cpp:
      * src/WebViewImpl.cpp:
      
      Source/WebKit/qt:
      
      * Api/qwebelement.cpp:
      * WebCoreSupport/RenderThemeQStyle.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e6db2f6c
  30. 24 Apr, 2012 3 commits
    • alexis.menard@openbossa.org's avatar
      Replace occurences of style selector from variables and methods names by style resolver. · 31b77cb7
      alexis.menard@openbossa.org authored
      https://bugs.webkit.org/show_bug.cgi?id=84765
      
      Reviewed by Andreas Kling.
      
      Rename methods and variables to follow the new name StyleResolver. It requires to update the
      local variables, methods parameters, and function names to match the new name and to remove
      the concept of "selector" to avoid clashing with the CSS concept. The next and last patch
      will be to rename CSSStyleSelector file and update the includes.
      
      Source/WebCore: 
      
      No new tests : just renaming the variables and method names. No behavior changes expected.
      
      * css/CSSFontSelector.cpp:
      (WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
      * css/CSSGradientValue.cpp:
      (WebCore::CSSGradientValue::addStops):
      * css/CSSPageRule.cpp:
      (WebCore::CSSPageRule::setSelectorText):
      * css/CSSStyleRule.cpp:
      (WebCore::CSSStyleRule::setSelectorText):
      * css/CSSStyleSheet.cpp:
      (WebCore::StyleSheetInternal::styleSheetChanged):
      * css/MediaQueryEvaluator.cpp:
      (WebCore::MediaQueryEvaluator::eval):
      * css/MediaQueryMatcher.cpp:
      (WebCore::MediaQueryMatcher::prepareEvaluator):
      (WebCore::MediaQueryMatcher::styleResolverChanged):
      * css/MediaQueryMatcher.h:
      (MediaQueryMatcher):
      * css/PropertySetCSSStyleDeclaration.cpp:
      (WebCore::StyleRuleCSSStyleDeclaration::setNeedsStyleRecalc):
      * css/StyleBuilder.cpp:
      (WebCore::ApplyPropertyExpanding::applyInheritValue):
      (WebCore::ApplyPropertyExpanding::applyInitialValue):
      (WebCore::ApplyPropertyExpanding::applyValue):
      (WebCore::ApplyPropertyDefaultBase::applyInheritValue):
      (WebCore::ApplyPropertyDefaultBase::applyInitialValue):
      (WebCore::ApplyPropertyDefault::applyValue):
      (WebCore::ApplyPropertyNumber::applyValue):
      (WebCore::ApplyPropertyStyleImage::applyValue):
      (WebCore::ApplyPropertyAuto::applyInheritValue):
      (WebCore::ApplyPropertyAuto::applyInitialValue):
      (WebCore::ApplyPropertyAuto::applyValue):
      (WebCore::ApplyPropertyClip::convertToLength):
      (WebCore::ApplyPropertyClip::applyInheritValue):
      (WebCore::ApplyPropertyClip::applyInitialValue):
      (WebCore::ApplyPropertyClip::applyValue):
      (WebCore::ApplyPropertyColor::applyInheritValue):
      (WebCore::ApplyPropertyColor::applyInitialValue):
      (WebCore::ApplyPropertyColor::applyValue):
      (WebCore::ApplyPropertyColor::applyColorValue):
      (WebCore::ApplyPropertyDirection::applyValue):
      (WebCore::ApplyPropertyLength::applyValue):
      (WebCore::ApplyPropertyString::applyValue):
      (WebCore::ApplyPropertyBorderRadius::applyValue):
      (WebCore::ApplyPropertyFillLayer::applyInheritValue):
      (WebCore::ApplyPropertyFillLayer::applyInitialValue):
      (WebCore::ApplyPropertyFillLayer::applyValue):
      (WebCore::ApplyPropertyComputeLength::applyValue):
      (WebCore::ApplyPropertyFont::applyInheritValue):
      (WebCore::ApplyPropertyFont::applyInitialValue):
      (WebCore::ApplyPropertyFont::applyValue):
      (WebCore::ApplyPropertyFontSize::applyInheritValue):
      (WebCore::ApplyPropertyFontSize::applyInitialValue):
      (WebCore::ApplyPropertyFontSize::applyValue):
      (WebCore::ApplyPropertyFontWeight::applyValue):
      (WebCore::ApplyPropertyFontVariantLigatures::applyInheritValue):
      (WebCore::ApplyPropertyFontVariantLigatures::applyInitialValue):
      (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
      (WebCore::ApplyPropertyBorderImage::applyValue):
      (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue):
      (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue):
      (WebCore::ApplyPropertyBorderImageModifier::applyValue):
      (WebCore::ApplyPropertyBorderImageSource::applyValue):
      (WebCore::ApplyPropertyCounter::applyInheritValue):
      (WebCore::ApplyPropertyCounter::applyValue):
      (WebCore::ApplyPropertyCursor::applyInheritValue):
      (WebCore::ApplyPropertyCursor::applyInitialValue):
      (WebCore::ApplyPropertyCursor::applyValue):
      (WebCore::ApplyPropertyTextAlign::applyValue):
      (WebCore::ApplyPropertyTextDecoration::applyValue):
      (WebCore::ApplyPropertyUnicodeBidi::applyValue):
      (WebCore::ApplyPropertyLineHeight::applyValue):
      (WebCore::ApplyPropertyPageSize::applyValue):
      (WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue):
      (WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue):
      (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
      (WebCore::ApplyPropertyAnimation::map):
      (WebCore::ApplyPropertyAnimation::applyInheritValue):
      (WebCore::ApplyPropertyAnimation::applyInitialValue):
      (WebCore::ApplyPropertyAnimation::applyValue):
      (WebCore::ApplyPropertyOutlineStyle::applyInheritValue):
      (WebCore::ApplyPropertyOutlineStyle::applyInitialValue):
      (WebCore::ApplyPropertyOutlineStyle::applyValue):
      (WebCore::ApplyPropertyResize::applyValue):
      (WebCore::ApplyPropertyVerticalAlign::applyValue):
      (WebCore::ApplyPropertyAspectRatio::applyInheritValue):
      (WebCore::ApplyPropertyAspectRatio::applyInitialValue):
      (WebCore::ApplyPropertyAspectRatio::applyValue):
      (WebCore::ApplyPropertyZoom::resetEffectiveZoom):
      (WebCore::ApplyPropertyZoom::applyInheritValue):
      (WebCore::ApplyPropertyZoom::applyInitialValue):
      (WebCore::ApplyPropertyZoom::applyValue):
      (WebCore::ApplyPropertyDisplay::isValidDisplayValue):
      (WebCore::ApplyPropertyDisplay::applyInheritValue):
      (WebCore::ApplyPropertyDisplay::applyInitialValue):
      (WebCore::ApplyPropertyDisplay::applyValue):
      (WebCore::ApplyPropertyFlex::applyInheritValue):
      (WebCore::ApplyPropertyFlex::applyInitialValue):
      (WebCore::ApplyPropertyFlex::applyValue):
      * css/StyleBuilder.h:
      (WebCore::PropertyHandler::applyInheritValue):
      (WebCore::PropertyHandler::applyInitialValue):
      (WebCore::PropertyHandler::applyValue):
      * css/StyleMedia.cpp:
      (WebCore::StyleMedia::matchMedium):
      * dom/Document.cpp:
      (WebCore::Document::Document):
      (WebCore::Document::~Document):
      (WebCore::Document::setDocType):
      (WebCore::Document::childrenChanged):
      (WebCore::Document::setContentLanguage):
      (WebCore::Document::recalcStyle):
      (WebCore::Document::updateLayoutIgnorePendingStylesheets):
      (WebCore::Document::styleForElementIgnoringPendingStylesheets):
      (WebCore::Document::styleForPage):
      (WebCore::Document::combineCSSFeatureFlags):
      (WebCore::Document::resetCSSFeatureFlags):
      (WebCore::Document::createStyleResolver):
      (WebCore::Document::clearStyleResolver):
      (WebCore::Document::clearPageUserSheet):
      (WebCore::Document::updatePageUserSheet):
      (WebCore::Document::clearPageGroupUserSheets):
      (WebCore::Document::updatePageGroupUserSheets):
      (WebCore::Document::addUserSheet):
      (WebCore::Document::processHttpEquiv):
      (WebCore::Document::setSelectedStylesheetSet):
      (WebCore::Document::removePendingSheet):
      (WebCore::Document::evaluateMediaQueryList):
      (WebCore::Document::styleResolverChanged):
      (WebCore::Document::analyzeStylesheetChange):
      (WebCore::Document::updateActiveStylesheets):
      * dom/Document.h:
      (WebCore::Document::styleResolverIfExists):
      (WebCore::Document::styleResolver):
      (Document):
      * dom/Element.cpp:
      (WebCore::StyleResolverParentPusher::StyleResolverParentPusher):
      (WebCore::StyleResolverParentPusher::push):
      (WebCore::StyleResolverParentPusher::~StyleResolverParentPusher):
      (StyleResolverParentPusher):
      (WebCore::Element::attributeChanged):
      (WebCore::Element::attach):
      (WebCore::Element::styleForRenderer):
      (WebCore::Element::recalcStyle):
      (WebCore::Element::beginParsingChildren):
      (WebCore::Element::finishParsingChildren):
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::removedFrom):
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::attach):
      * dom/ShadowTree.cpp:
      (WebCore::ShadowTree::recalcShadowTreeStyle):
      * dom/StyleElement.cpp:
      (WebCore::StyleElement::removedFromDocument):
      * editing/EditingStyle.cpp:
      (WebCore::styleFromMatchedRulesForElement):
      * history/CachedPage.cpp:
      (WebCore::CachedPage::restore):
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::styleResolver):
      * html/HTMLCanvasElement.h:
      (HTMLCanvasElement):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::setDisabledState):
      (WebCore::HTMLLinkElement::process):
      (WebCore::HTMLLinkElement::removedFrom):
      (WebCore::HTMLLinkElement::removePendingSheet):
      * html/HTMLStyleElement.cpp:
      (WebCore::HTMLStyleElement::registerWithScopingNode):
      (WebCore::HTMLStyleElement::unregisterWithScopingNode):
      * html/canvas/CanvasRenderingContext2D.cpp:
      (WebCore::CanvasRenderingContext2D::setFont):
      * inspector/InspectorCSSAgent.cpp:
      (WebCore::InspectorCSSAgent::recalcStyleForPseudoStateIfNeeded):
      (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
      (WebCore::InspectorCSSAgent::buildArrayForRuleList):
      (WebCore::InspectorCSSAgent::clearPseudoState):
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::updateViewMetrics):
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::getMatchedCSSRules):
      * page/Frame.cpp:
      (WebCore::Frame::setPrinting):
      * page/FrameView.cpp:
      (WebCore::FrameView::layout):
      * page/Page.cpp:
      (WebCore::Page::setViewMode):
      (WebCore::Page::setNeedsRecalcStyleInAllFrames):
      (WebCore::Page::allVisitedStateChanged):
      (WebCore::Page::visitedStateChanged):
      * page/animation/KeyframeAnimation.cpp:
      (WebCore::KeyframeAnimation::KeyframeAnimation):
      * platform/efl/RenderThemeEfl.cpp:
      (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
      (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
      (WebCore::RenderThemeEfl::adjustCheckboxStyle):
      (WebCore::RenderThemeEfl::adjustRadioStyle):
      (WebCore::RenderThemeEfl::adjustButtonStyle):
      (WebCore::RenderThemeEfl::adjustMenuListStyle):
      (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
      (WebCore::RenderThemeEfl::adjustTextFieldStyle):
      (WebCore::RenderThemeEfl::adjustTextAreaStyle):
      (WebCore::RenderThemeEfl::adjustSearchFieldDecorationStyle):
      (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
      (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
      (WebCore::RenderThemeEfl::adjustProgressBarStyle):
      * platform/gtk/RenderThemeGtk.cpp:
      (WebCore::RenderThemeGtk::adjustButtonStyle):
      (WebCore::RenderThemeGtk::adjustMenuListStyle):
      (WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
      (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
      (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeGtk::adjustSearchFieldStyle):
      (WebCore::RenderThemeGtk::adjustSliderThumbStyle):
      * platform/qt/RenderThemeQt.cpp:
      (WebCore::RenderThemeQt::adjustSliderThumbStyle):
      (WebCore::RenderThemeQt::adjustSearchFieldStyle):
      (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeQt::adjustSearchFieldDecorationStyle):
      (WebCore::RenderThemeQt::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderThemeQt::adjustInnerSpinButtonStyle):
      * platform/qt/RenderThemeQtMobile.cpp:
      (WebCore::RenderThemeQtMobile::adjustButtonStyle):
      (WebCore::RenderThemeQtMobile::adjustMenuListStyle):
      * platform/wx/RenderThemeWx.cpp:
      (WebCore::RenderThemeWx::adjustButtonStyle):
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::updateFromElement):
      (WebCore::RenderListBox::paintItemForeground):
      * rendering/RenderMenuList.cpp:
      (WebCore::RenderMenuList::fontSelector):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::getUncachedPseudoStyle):
      * rendering/RenderRegion.cpp:
      (WebCore::RenderRegion::styleDidChange):
      (WebCore::RenderRegion::computeStyleInRegion):
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::fontSelector):
      * rendering/RenderTheme.cpp:
      (WebCore::RenderTheme::adjustStyle):
      (WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle):
      * rendering/RenderThemeChromiumSkia.cpp:
      (WebCore::RenderThemeChromiumSkia::adjustMenuListStyle):
      (WebCore::RenderThemeChromiumSkia::adjustMenuListButtonStyle):
      * rendering/RenderThemeMac.mm:
      (WebCore::RenderThemeMac::adjustMenuListStyle):
      (WebCore::RenderThemeMac::adjustSliderThumbStyle):
      (WebCore::RenderThemeMac::adjustSearchFieldStyle):
      * rendering/RenderThemeSafari.cpp:
      (WebCore::RenderThemeSafari::setFontFromControlSize):
      (WebCore::RenderThemeSafari::adjustButtonStyle):
      (WebCore::RenderThemeSafari::adjustMenuListStyle):
      (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
      (WebCore::RenderThemeSafari::adjustSliderThumbStyle):
      (WebCore::RenderThemeSafari::adjustSearchFieldStyle):
      (WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeSafari::adjustSearchFieldDecorationStyle):
      (WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle):
      * rendering/RenderThemeWin.cpp:
      (WebCore::RenderThemeWin::adjustInnerSpinButtonStyle):
      (WebCore::RenderThemeWin::adjustMenuListStyle):
      (WebCore::RenderThemeWin::adjustMenuListButtonStyle):
      (WebCore::RenderThemeWin::adjustSearchFieldStyle):
      (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeWin::adjustSearchFieldDecorationStyle):
      (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):
      * rendering/RenderThemeWinCE.cpp:
      (WebCore::RenderThemeWinCE::adjustMenuListStyle):
      (WebCore::RenderThemeWinCE::adjustSearchFieldStyle):
      (WebCore::RenderThemeWinCE::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeWinCE::adjustSearchFieldDecorationStyle):
      (WebCore::RenderThemeWinCE::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderThemeWinCE::adjustSearchFieldResultsButtonStyle):
      (WebCore::RenderThemeWinCE::adjustMenuListButtonStyle):
      * rendering/style/StyleGeneratedImage.cpp:
      (WebCore::StyleGeneratedImage::image):
      * rendering/svg/RenderSVGInlineText.cpp:
      (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::customStyleForRenderer):
      * svg/SVGFontFaceElement.cpp:
      (WebCore::SVGFontFaceElement::rebuildFontFace):
      (WebCore::SVGFontFaceElement::removedFrom):
      * xml/XMLTreeViewer.cpp:
      (WebCore::XMLTreeViewer::transformDocumentToTreeView):
      * xml/parser/XMLDocumentParser.cpp:
      (WebCore::XMLDocumentParser::end):
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      (WebCore::XMLDocumentParser::doEnd):
      * xml/parser/XMLDocumentParserQt.cpp:
      (WebCore::XMLDocumentParser::doEnd):
      * WebCore.exp.in:
      
      Source/WebKit/chromium: 
      
      * src/AutofillPopupMenuClient.cpp:
      (WebKit::AutofillPopupMenuClient::fontSelector):
      (WebKit::AutofillPopupMenuClient::initialize):
      * src/WebDevToolsAgentImpl.cpp:
      (WebKit::DeviceMetricsSupport::autoZoomPageToFitWidth):
      (WebKit::DeviceMetricsSupport::applySizeOverrideInternal):
      
      Source/WebKit/mac: 
      
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView reapplyStyles]):
      (-[WebHTMLView _setPrinting:minimumPageLogicalWidth:logicalHeight:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustViewSize:paginateScreenContent:]):
      
      Source/WebKit/qt: 
      
      * Api/qwebelement.cpp:
      (QWebElement::styleProperty):
      * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      (DumpRenderTreeSupportQt::setMediaType):
      * WebCoreSupport/RenderThemeQStyle.cpp:
      (WebCore::RenderThemeQStyle::adjustButtonStyle):
      (WebCore::RenderThemeQStyle::adjustTextAreaStyle):
      (WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
      (WebCore::RenderThemeQStyle::adjustSliderThumbStyle):
      (WebCore::RenderThemeQStyle::adjustSearchFieldDecorationStyle):
      (WebCore::RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      31b77cb7
    • alexis.menard@openbossa.org's avatar
      Rename CSSStyleSelector class to StyleResolver. · 2d5f8df7
      alexis.menard@openbossa.org authored
      https://bugs.webkit.org/show_bug.cgi?id=84734
      
      Reviewed by Andreas Kling.
      
      The name CSSStyleSelector is confusing as it conflicts a bit with
      the CSS concept of selectors. One could think it's an encapsulation
      of the CSS selectors but it's not, in fact this class is responsible
      of finding the RenderStyle for a given element. This is the first patch
      as I will later rename the files, and then rename the local variables.
      
      Source/WebCore: 
      
      No new tests : renaming, no behavior changes should appear.
      
      * css/CSSCalculationValue.cpp:
      (WebCore::CSSCalcPrimitiveValue::toCalcValue):
      * css/CSSFontSelector.cpp:
      (WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
      * css/CSSParser.cpp:
      (WebCore::CSSParser::parseSizeParameter):
      * css/CSSStyleSelector.cpp:
      (RuleSet):
      (WebCore::RuleSet::features):
      (WebCore):
      (WebCore::StyleResolver::StyleResolver):
      (WebCore::StyleResolver::addAuthorRulesAndCollectUserRulesFromSheets):
      (WebCore::makeRuleSet):
      (WebCore::StyleResolver::collectFeatures):
      (WebCore::StyleResolver::determineScope):
      (WebCore::StyleResolver::ruleSetForScope):
      (WebCore::StyleResolver::appendAuthorStylesheets):
      (WebCore::StyleResolver::setupScopeStack):
      (WebCore::StyleResolver::pushScope):
      (WebCore::StyleResolver::popScope):
      (WebCore::StyleResolver::pushParentElement):
      (WebCore::StyleResolver::popParentElement):
      (WebCore::StyleResolver::pushParentShadowRoot):
      (WebCore::StyleResolver::popParentShadowRoot):
      (WebCore::StyleResolver::addKeyframeStyle):
      (WebCore::StyleResolver::~StyleResolver):
      (WebCore::StyleResolver::sweepMatchedPropertiesCache):
      (WebCore::StyleResolver::Features::Features):
      (WebCore::StyleResolver::Features::~Features):
      (WebCore::StyleResolver::Features::add):
      (WebCore::StyleResolver::Features::clear):
      (WebCore::StyleResolver::addMatchedProperties):
      (WebCore::StyleResolver::addElementStyleProperties):
      (WebCore::StyleResolver::collectMatchingRules):
      (WebCore::StyleResolver::collectMatchingRulesForRegion):
      (WebCore::StyleResolver::sortAndTransferMatchedRules):
      (WebCore::StyleResolver::matchScopedAuthorRules):
      (WebCore::StyleResolver::matchAuthorRules):
      (WebCore::StyleResolver::matchUserRules):
      (WebCore::StyleResolver::matchUARules):
      (WebCore::StyleResolver::collectMatchingRulesForList):
      * css/CSSStyleSelector.h:
      (StyleResolver):
      (Features):
      * css/MediaQueryEvaluator.cpp:
      (WebCore::MediaQueryEvaluator::eval):
      * css/MediaQueryEvaluator.h:
      (WebCore):
      (MediaQueryEvaluator):
      * css/MediaQueryMatcher.cpp:
      (WebCore::MediaQueryMatcher::prepareEvaluator):
      * css/SVGCSSStyleSelector.cpp:
      (WebCore::StyleResolver::applySVGProperty):
      * css/StyleBuilder.cpp:
      (WebCore::ApplyPropertyExpanding::applyInheritValue):
      (WebCore::ApplyPropertyExpanding::applyInitialValue):
      (WebCore::ApplyPropertyExpanding::applyValue):
      (WebCore::ApplyPropertyDefaultBase::applyInheritValue):
      (WebCore::ApplyPropertyDefaultBase::applyInitialValue):
      (WebCore::ApplyPropertyDefaultBase::applyValue):
      (WebCore::ApplyPropertyDefault::applyValue):
      (WebCore::ApplyPropertyNumber::applyValue):
      (WebCore::ApplyPropertyStyleImage::applyValue):
      (WebCore::ApplyPropertyAuto::applyInheritValue):
      (WebCore::ApplyPropertyAuto::applyInitialValue):
      (WebCore::ApplyPropertyAuto::applyValue):
      (WebCore::ApplyPropertyClip::convertToLength):
      (WebCore::ApplyPropertyClip::applyInheritValue):
      (WebCore::ApplyPropertyClip::applyInitialValue):
      (WebCore::ApplyPropertyClip::applyValue):
      (WebCore::ApplyPropertyColor::applyInheritValue):
      (WebCore::ApplyPropertyColor::applyInitialValue):
      (WebCore::ApplyPropertyColor::applyValue):
      (WebCore::ApplyPropertyColor::applyColorValue):
      (WebCore::ApplyPropertyDirection::applyValue):
      (WebCore::ApplyPropertyLength::applyValue):
      (WebCore::ApplyPropertyString::applyValue):
      (WebCore::ApplyPropertyBorderRadius::applyValue):
      (WebCore::ApplyPropertyFillLayer::applyInheritValue):
      (WebCore::ApplyPropertyFillLayer::applyInitialValue):
      (WebCore::ApplyPropertyFillLayer::applyValue):
      (WebCore::ApplyPropertyComputeLength::applyValue):
      (WebCore::ApplyPropertyFont::applyInheritValue):
      (WebCore::ApplyPropertyFont::applyInitialValue):
      (WebCore::ApplyPropertyFont::applyValue):
      (WebCore::ApplyPropertyFontSize::applyInheritValue):
      (WebCore::ApplyPropertyFontSize::applyInitialValue):
      (WebCore::ApplyPropertyFontSize::applyValue):
      (WebCore::ApplyPropertyFontWeight::applyValue):
      (WebCore::ApplyPropertyFontVariantLigatures::applyInheritValue):
      (WebCore::ApplyPropertyFontVariantLigatures::applyInitialValue):
      (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
      (WebCore::ApplyPropertyBorderImage::applyValue):
      (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue):
      (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue):
      (WebCore::ApplyPropertyBorderImageModifier::applyValue):
      (WebCore::ApplyPropertyBorderImageSource::applyValue):
      (WebCore::ApplyPropertyCounter::emptyFunction):
      (WebCore::ApplyPropertyCounter::applyInheritValue):
      (WebCore::ApplyPropertyCounter::applyValue):
      (WebCore::ApplyPropertyCursor::applyInheritValue):
      (WebCore::ApplyPropertyCursor::applyInitialValue):
      (WebCore::ApplyPropertyCursor::applyValue):
      (WebCore::ApplyPropertyTextAlign::applyValue):
      (WebCore::ApplyPropertyTextDecoration::applyValue):
      (WebCore::ApplyPropertyUnicodeBidi::applyValue):
      (WebCore::ApplyPropertyLineHeight::applyValue):
      (WebCore::ApplyPropertyPageSize::applyInheritValue):
      (WebCore::ApplyPropertyPageSize::applyInitialValue):
      (WebCore::ApplyPropertyPageSize::applyValue):
      (WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue):
      (WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue):
      (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
      (WebCore):
      (WebCore::ApplyPropertyAnimation::map):
      (WebCore::ApplyPropertyAnimation::applyInheritValue):
      (WebCore::ApplyPropertyAnimation::applyInitialValue):
      (WebCore::ApplyPropertyAnimation::applyValue):
      (WebCore::ApplyPropertyOutlineStyle::applyInheritValue):
      (WebCore::ApplyPropertyOutlineStyle::applyInitialValue):
      (WebCore::ApplyPropertyOutlineStyle::applyValue):
      (WebCore::ApplyPropertyResize::applyValue):
      (WebCore::ApplyPropertyVerticalAlign::applyValue):
      (WebCore::ApplyPropertyAspectRatio::applyInheritValue):
      (WebCore::ApplyPropertyAspectRatio::applyInitialValue):
      (WebCore::ApplyPropertyAspectRatio::applyValue):
      (WebCore::ApplyPropertyZoom::resetEffectiveZoom):
      (WebCore::ApplyPropertyZoom::applyInheritValue):
      (WebCore::ApplyPropertyZoom::applyInitialValue):
      (WebCore::ApplyPropertyZoom::applyValue):
      (WebCore::ApplyPropertyDisplay::isValidDisplayValue):
      (WebCore::ApplyPropertyDisplay::applyInheritValue):
      (WebCore::ApplyPropertyDisplay::applyInitialValue):
      (WebCore::ApplyPropertyDisplay::applyValue):
      (WebCore::ApplyPropertyFlex::applyInheritValue):
      (WebCore::ApplyPropertyFlex::applyInitialValue):
      (WebCore::ApplyPropertyFlex::applyValue):
      (WebCore::StyleBuilder::StyleBuilder):
      * css/StyleBuilder.h:
      (WebCore):
      (PropertyHandler):
      (WebCore::PropertyHandler::applyInheritValue):
      (WebCore::PropertyHandler::applyInitialValue):
      (WebCore::PropertyHandler::applyValue):
      * css/StyleMedia.cpp:
      (WebCore::StyleMedia::matchMedium):
      * css/WebKitCSSKeyframesRule.cpp:
      (WebCore::WebKitCSSKeyframesRule::setName):
      * css/WebKitCSSMatrix.cpp:
      (WebCore::WebKitCSSMatrix::setMatrixValue):
      * dom/Document.cpp:
      (WebCore::Document::recalcStyle):
      (WebCore::Document::createStyleSelector):
      (WebCore::Document::testAddedStylesheetRequiresStyleRecalc):
      * dom/Document.h:
      (WebCore):
      (WebCore::Document::styleSelectorIfExists):
      (WebCore::Document::styleSelector):
      (Document):
      * dom/Element.cpp:
      (StyleSelectorParentPusher):
      (WebCore::Element::attributeChanged):
      (WebCore::Element::beginParsingChildren):
      (WebCore::Element::finishParsingChildren):
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::attach):
      * dom/ShadowTree.cpp:
      (WebCore::ShadowTree::recalcShadowTreeStyle):
      * editing/EditingStyle.cpp:
      (WebCore::EditingStyle::mergeStyleFromRules):
      (WebCore::EditingStyle::removeStyleFromRulesAndContext):
      (WebCore::EditingStyle::removePropertiesInElementDefaultStyle):
      (WebCore::legacyFontSizeFromCSSValue):
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::focusedOrActiveStateChanged):
      * history/CachedPage.cpp:
      (WebCore::CachedPage::restore):
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::styleSelector):
      * html/HTMLCanvasElement.h:
      (HTMLCanvasElement):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::process):
      * html/canvas/CanvasRenderingContext2D.cpp:
      (WebCore::CanvasRenderingContext2D::setFont):
      * inspector/InspectorCSSAgent.cpp:
      (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
      (WebCore::InspectorCSSAgent::buildArrayForRuleList):
      * inspector/InspectorCSSAgent.h:
      (InspectorCSSAgent):
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::getMatchedCSSRules):
      * page/Page.cpp:
      (WebCore::Page::allVisitedStateChanged):
      (WebCore::Page::visitedStateChanged):
      * page/animation/AnimationController.cpp:
      (WebCore::AnimationController::updateAnimations):
      * platform/blackberry/RenderThemeBlackBerry.cpp:
      (WebCore::RenderThemeBlackBerry::adjustButtonStyle):
      (WebCore::RenderThemeBlackBerry::adjustTextAreaStyle):
      (WebCore::RenderThemeBlackBerry::adjustTextFieldStyle):
      (WebCore::RenderThemeBlackBerry::adjustSearchFieldStyle):
      (WebCore::RenderThemeBlackBerry::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeBlackBerry::adjustMenuListButtonStyle):
      (WebCore::RenderThemeBlackBerry::adjustMenuListStyle):
      (WebCore::RenderThemeBlackBerry::adjustCheckboxStyle):
      (WebCore::RenderThemeBlackBerry::adjustRadioStyle):
      * platform/blackberry/RenderThemeBlackBerry.h:
      (RenderThemeBlackBerry):
      * platform/efl/RenderThemeEfl.cpp:
      (WebCore::RenderThemeEfl::adjustSliderTrackStyle):
      (WebCore::RenderThemeEfl::adjustSliderThumbStyle):
      (WebCore::RenderThemeEfl::adjustCheckboxStyle):
      (WebCore::RenderThemeEfl::adjustRadioStyle):
      (WebCore::RenderThemeEfl::adjustButtonStyle):
      (WebCore::RenderThemeEfl::adjustMenuListStyle):
      (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
      (WebCore::RenderThemeEfl::adjustTextFieldStyle):
      (WebCore::RenderThemeEfl::adjustTextAreaStyle):
      (WebCore::RenderThemeEfl::adjustSearchFieldDecorationStyle):
      (WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
      (WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
      (WebCore::RenderThemeEfl::adjustProgressBarStyle):
      * platform/efl/RenderThemeEfl.h:
      (RenderThemeEfl):
      * platform/gtk/RenderThemeGtk.cpp:
      (WebCore::RenderThemeGtk::adjustButtonStyle):
      (WebCore::RenderThemeGtk::adjustMenuListStyle):
      (WebCore::RenderThemeGtk::adjustMenuListButtonStyle):
      (WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
      (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeGtk::adjustSearchFieldStyle):
      (WebCore::RenderThemeGtk::adjustSliderTrackStyle):
      (WebCore::RenderThemeGtk::adjustSliderThumbStyle):
      (WebCore::RenderThemeGtk::adjustProgressBarStyle):
      * platform/gtk/RenderThemeGtk.h:
      (RenderThemeGtk):
      * platform/gtk/RenderThemeGtk2.cpp:
      (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
      * platform/gtk/RenderThemeGtk3.cpp:
      (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
      * platform/qt/RenderThemeQt.cpp:
      (WebCore::RenderThemeQt::adjustTextFieldStyle):
      (WebCore::RenderThemeQt::adjustTextAreaStyle):
      (WebCore::RenderThemeQt::adjustMenuListStyle):
      (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
      (WebCore::RenderThemeQt::adjustProgressBarStyle):
      (WebCore::RenderThemeQt::adjustSliderTrackStyle):
      (WebCore::RenderThemeQt::adjustSliderThumbStyle):
      (WebCore::RenderThemeQt::adjustSearchFieldStyle):
      (WebCore::RenderThemeQt::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeQt::adjustSearchFieldDecorationStyle):
      (WebCore::RenderThemeQt::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderThemeQt::adjustInnerSpinButtonStyle):
      * platform/qt/RenderThemeQt.h:
      (RenderThemeQt):
      * platform/qt/RenderThemeQtMobile.cpp:
      (WebCore::RenderThemeQtMobile::adjustButtonStyle):
      (WebCore::RenderThemeQtMobile::adjustTextFieldStyle):
      (WebCore::RenderThemeQtMobile::adjustMenuListStyle):
      * platform/qt/RenderThemeQtMobile.h:
      (RenderThemeQtMobile):
      * platform/wx/RenderThemeWx.cpp:
      (RenderThemeWx):
      (WebCore::RenderThemeWx::adjustButtonStyle):
      (WebCore::RenderThemeWx::adjustTextFieldStyle):
      (WebCore::RenderThemeWx::adjustMenuListStyle):
      (WebCore::RenderThemeWx::adjustMenuListButtonStyle):
      * rendering/RenderInputSpeech.cpp:
      (WebCore::RenderInputSpeech::adjustInputFieldSpeechButtonStyle):
      * rendering/RenderInputSpeech.h:
      (RenderInputSpeech):
      * rendering/RenderTheme.cpp:
      (WebCore::RenderTheme::adjustStyle):
      (WebCore::RenderTheme::adjustCheckboxStyle):
      (WebCore::RenderTheme::adjustRadioStyle):
      (WebCore::RenderTheme::adjustButtonStyle):
      (WebCore::RenderTheme::adjustInnerSpinButtonStyle):
      (WebCore::RenderTheme::adjustTextFieldStyle):
      (WebCore::RenderTheme::adjustTextAreaStyle):
      (WebCore::RenderTheme::adjustMenuListStyle):
      (WebCore::RenderTheme::adjustInputFieldSpeechButtonStyle):
      (WebCore::RenderTheme::adjustMeterStyle):
      (WebCore::RenderTheme::adjustProgressBarStyle):
      (WebCore::RenderTheme::adjustMenuListButtonStyle):
      (WebCore::RenderTheme::adjustSliderTrackStyle):
      (WebCore::RenderTheme::adjustSliderThumbStyle):
      (WebCore::RenderTheme::adjustSearchFieldStyle):
      (WebCore::RenderTheme::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderTheme::adjustSearchFieldDecorationStyle):
      (WebCore::RenderTheme::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderTheme::adjustSearchFieldResultsButtonStyle):
      * rendering/RenderTheme.h:
      (RenderTheme):
      * rendering/RenderThemeChromiumAndroid.cpp:
      (WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle):
      * rendering/RenderThemeChromiumAndroid.h:
      (RenderThemeChromiumAndroid):
      * rendering/RenderThemeChromiumLinux.cpp:
      (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle):
      * rendering/RenderThemeChromiumLinux.h:
      (RenderThemeChromiumLinux):
      * rendering/RenderThemeChromiumSkia.cpp:
      (WebCore::RenderThemeChromiumSkia::adjustButtonStyle):
      (WebCore::RenderThemeChromiumSkia::adjustSearchFieldStyle):
      (WebCore::RenderThemeChromiumSkia::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeChromiumSkia::adjustSearchFieldDecorationStyle):
      (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsButtonStyle):
      (WebCore::RenderThemeChromiumSkia::adjustMenuListStyle):
      (WebCore::RenderThemeChromiumSkia::adjustMenuListButtonStyle):
      * rendering/RenderThemeChromiumSkia.h:
      (RenderThemeChromiumSkia):
      * rendering/RenderThemeChromiumWin.cpp:
      (WebCore):
      (WebCore::RenderThemeChromiumWin::adjustInnerSpinButtonStyle):
      (WebCore::RenderThemeChromiumWin::adjustProgressBarStyle):
      * rendering/RenderThemeChromiumWin.h:
      (RenderThemeChromiumWin):
      * rendering/RenderThemeMac.h:
      (RenderThemeMac):
      * rendering/RenderThemeMac.mm:
      (WebCore::RenderThemeMac::setFontFromControlSize):
      (WebCore::RenderThemeMac::adjustTextFieldStyle):
      (WebCore::RenderThemeMac::adjustTextAreaStyle):
      (WebCore::RenderThemeMac::adjustProgressBarStyle):
      (WebCore::RenderThemeMac::adjustMenuListStyle):
      (WebCore::RenderThemeMac::adjustMenuListButtonStyle):
      (WebCore::RenderThemeMac::adjustSliderTrackStyle):
      (WebCore::RenderThemeMac::adjustSliderThumbStyle):
      (WebCore::RenderThemeMac::adjustSearchFieldStyle):
      (WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeMac::adjustSearchFieldDecorationStyle):
      (WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
      * rendering/RenderThemeSafari.cpp:
      (WebCore::RenderThemeSafari::setFontFromControlSize):
      (WebCore::RenderThemeSafari::adjustButtonStyle):
      (WebCore::RenderThemeSafari::adjustTextFieldStyle):
      (WebCore::RenderThemeSafari::adjustTextAreaStyle):
      (WebCore::RenderThemeSafari::adjustMenuListStyle):
      (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
      (WebCore::RenderThemeSafari::adjustSliderThumbStyle):
      (WebCore::RenderThemeSafari::adjustSearchFieldStyle):
      (WebCore::RenderThemeSafari::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeSafari::adjustSearchFieldDecorationStyle):
      (WebCore::RenderThemeSafari::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderThemeSafari::adjustSearchFieldResultsButtonStyle):
      * rendering/RenderThemeSafari.h:
      (RenderThemeSafari):
      * rendering/RenderThemeWin.cpp:
      (WebCore::RenderThemeWin::adjustInnerSpinButtonStyle):
      (WebCore::RenderThemeWin::adjustMenuListStyle):
      (WebCore::RenderThemeWin::adjustMenuListButtonStyle):
      (WebCore::RenderThemeWin::adjustSearchFieldStyle):
      (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeWin::adjustSearchFieldDecorationStyle):
      (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):
      * rendering/RenderThemeWin.h:
      (RenderThemeWin):
      (WebCore::RenderThemeWin::adjustButtonStyle):
      (WebCore::RenderThemeWin::adjustTextFieldStyle):
      (WebCore::RenderThemeWin::adjustTextAreaStyle):
      * rendering/RenderThemeWinCE.cpp:
      (WebCore::RenderThemeWinCE::adjustMenuListStyle):
      (WebCore::RenderThemeWinCE::adjustSearchFieldStyle):
      (WebCore::RenderThemeWinCE::adjustSearchFieldCancelButtonStyle):
      (WebCore::RenderThemeWinCE::adjustSearchFieldDecorationStyle):
      (WebCore::RenderThemeWinCE::adjustSearchFieldResultsDecorationStyle):
      (WebCore::RenderThemeWinCE::adjustSearchFieldResultsButtonStyle):
      (WebCore::RenderThemeWinCE::adjustMenuListButtonStyle):
      * rendering/RenderThemeWinCE.h:
      (RenderThemeWinCE):
      (WebCore::RenderThemeWinCE::adjustButtonStyle):
      (WebCore::RenderThemeWinCE::adjustTextFieldStyle):
      (WebCore::RenderThemeWinCE::adjustTextAreaStyle):
      * rendering/style/RenderStyle.cpp:
      (WebCore::RenderStyle::isStyleAvailable):
      * rendering/style/RenderStyle.h:
      (WebCore):
      * rendering/style/StyleRareNonInheritedData.h:
      (WebCore):
      * rendering/svg/RenderSVGInlineText.cpp:
      (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
      * rendering/svg/SVGRenderSupport.cpp:
      (WebCore::SVGRenderSupport::isOverflowHidden):
      
      Source/WebKit/qt: 
      
      * WebCoreSupport/RenderThemeQStyle.cpp:
      (WebCore::RenderThemeQStyle::adjustButtonStyle):
      (WebCore::RenderThemeQStyle::adjustTextAreaStyle):
      (WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
      (WebCore::RenderThemeQStyle::adjustSliderTrackStyle):
      (WebCore::RenderThemeQStyle::adjustSliderThumbStyle):
      (WebCore::RenderThemeQStyle::adjustSearchFieldDecorationStyle):
      (WebCore::RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle):
      * WebCoreSupport/RenderThemeQStyle.h:
      (RenderThemeQStyle):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d5f8df7
    • antti@apple.com's avatar
      Consolidate external stylesheet quirks handling to StyleSheetInternal · e05814e4
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=84632
      
      Reviewed by Andreas Kling.
      
      Move the repeated code from StyleImportRule and HTMLLinkElement to StyleSheetInternal::parseUserStyleSheet.
              
      Remove a BUILDING_ON_LEOPARD-only quirk.
      
      * css/CSSImportRule.cpp:
      (WebCore::StyleRuleImport::setCSSStyleSheet):
      * css/CSSParser.cpp:
      (WebCore):
      (WebCore::CSSParserContext::CSSParserContext):
              
          Add new settings bits to the CSSParserContext. These are used for external stylesheet parsing quirks.
      
      * css/CSSParserMode.h:
      (CSSParserContext):
      * css/CSSStyleSheet.cpp:
      (WebCore::StyleSheetInternal::parseUserStyleSheet):
      (WebCore::StyleSheetInternal::parseString):
      (WebCore):
      (WebCore::StyleSheetInternal::parseStringAtLine):
      * css/CSSStyleSheet.h:
      (WebCore):
      (StyleSheetInternal):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::setCSSStyleSheet):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e05814e4
  31. 17 Apr, 2012 1 commit
    • commit-queue@webkit.org's avatar
      insertedIntoDocument and insertedIntoTree should be unitifed. · 9ea0080a
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=82701
      
      Patch by Hajime Morrita <morrita@chromium.org> on 2012-04-16
      Reviewed by Ryosuke Niwa.
      
      Both Node::insertedIntoTree() and Node::insertedIntoDocument() are
      served as lifecycle callbacks which are invoked when a node is
      inserted into its new parent. There are also removedFromTree()
      and removedFromDocument() respectively. Considering that this pair
      of virtual functions are laid onto the hot path, it's worth
      merging them into one, to gain some speedup. Such
      unification could clarify the semantics as well.
      
      This change makes following change to merge these functions.
      
      - pulling the tree traversal out from ContainerNode to ChildNodeInsertionNotifier.
      - letting new Node::insertInto() do the job for its own, but not
        for its children and
      - Pass the parent of each insertion root as a parameter of insertedInto().
        This root node can tell inserted node where it is inserted,
        specifically whetehr the insertion is to the document or not.
      
      Same pattern is also applied to Node::removedFromDocument() and
      Node::removedFromTree(), which are factored to Node::removedFrom()
      and ChildNodeRemovalNotifier respectively.
      
      Speed up on Dromaeo/dom-modify.html is about 2%.
      Further speed-up by de-virtulization would be possible.
      
      Caveat:
      
      There is possible situation where a node need to invoke
      insertedInto() after its children is nofitied, instead of before
      that.  It was represented naturally with previous
      traversal-by-ContainerNode pattern, but is no longer simple with
      this new external traversal. To support this scenario, we
      introduced the InsertionNotificationRequest as a return value of insertedInto()
      and a supplemental hook Node::didNotifyDescendantInseretions(). See for
      example HTMLFormElement.cpp to learn how it works.
      
      No new tests. Covered by existing tests.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::parserInsertBefore):
      (WebCore::ContainerNode::removeChild):
      (WebCore::ContainerNode::parserRemoveChild):
      (WebCore::ContainerNode::removeChildren):
      (WebCore::ContainerNode::parserAddChild):
      (WebCore::updateTreeAfterInsertion):
      * dom/ContainerNode.h:
      (ContainerNode):
      (WebCore::Node::highestAncestor):
      (WebCore):
      * dom/ContainerNodeAlgorithms.cpp: Added.
      (WebCore):
      (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
      (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
      (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
      (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
      * dom/ContainerNodeAlgorithms.h:
      (ChildNodeInsertionNotifier):
      (WebCore::ChildNodeInsertionNotifier::ChildNodeInsertionNotifier):
      (WebCore):
      (ChildNodeRemovalNotifier):
      (WebCore::ChildNodeRemovalNotifier::ChildNodeRemovalNotifier):
      (WebCore::removeAllChildrenInContainer):
      (WebCore::appendChildToContainer):
      (Private):
      (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
      (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
      (WebCore::ChildNodeInsertionNotifier::notifyInsertedIntoDocument):
      (WebCore::ChildNodeInsertionNotifier::notify):
      (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument):
      (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
      (WebCore::ChildNodeRemovalNotifier::notify):
      * dom/DOMAllInOne.cpp:
      * dom/DocumentType.cpp:
      (WebCore::DocumentType::insertedInto):
      (WebCore::DocumentType::removedFrom):
      * dom/DocumentType.h:
      (DocumentType):
      * dom/Element.cpp:
      (WebCore::Element::insertedInto):
      (WebCore::Element::removedFrom):
      * dom/Element.h:
      (Element):
      * dom/Node.cpp:
      (WebCore::Node::insertedInto):
      (WebCore::Node::removedFrom):
      * dom/Node.h:
      (Node):
      (WebCore::Node::didNotifyDescendantInseretions):
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::insertedInto):
      (WebCore::ProcessingInstruction::removedFrom):
      * dom/ProcessingInstruction.h:
      (ProcessingInstruction):
      * dom/ScriptElement.cpp:
      (WebCore::ScriptElement::insertedInto):
      * dom/ScriptElement.h:
      (WebCore):
      (ScriptElement):
      * dom/ShadowTree.cpp:
      (WebCore::ShadowTree::addShadowRoot):
      (WebCore::ShadowTree::removeAllShadowRoots):
      * dom/ShadowTree.h:
      (ShadowTree):
      (ShadowRootVector):
      (WebCore::ShadowRootVector::ShadowRootVector):
      (WebCore):
      * html/FormAssociatedElement.cpp:
      (WebCore::FormAssociatedElement::insertedInto):
      (WebCore::FormAssociatedElement::removedFrom):
      (WebCore::FormAssociatedElement::formRemovedFromTree):
      * html/FormAssociatedElement.h:
      (FormAssociatedElement):
      * html/HTMLBaseElement.cpp:
      (WebCore::HTMLBaseElement::insertedInto):
      (WebCore::HTMLBaseElement::removedFrom):
      * html/HTMLBaseElement.h:
      (HTMLBaseElement):
      * html/HTMLBodyElement.cpp:
      (WebCore::HTMLBodyElement::insertedInto):
      (WebCore::HTMLBodyElement::didNotifyDescendantInseretions):
      * html/HTMLBodyElement.h:
      (HTMLBodyElement):
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::insertedInto):
      (WebCore::HTMLFormControlElement::removedFrom):
      * html/HTMLFormControlElement.h:
      (HTMLFormControlElement):
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::insertedInto):
      (WebCore::HTMLFormElement::didNotifyDescendantInseretions):
      (WebCore::HTMLFormElement::removedFrom):
      * html/HTMLFormElement.h:
      (HTMLFormElement):
      * html/HTMLFrameElementBase.cpp:
      (WebCore::HTMLFrameElementBase::insertedInto):
      (WebCore):
      (WebCore::HTMLFrameElementBase::didNotifyDescendantInseretions):
      * html/HTMLFrameElementBase.h:
      (HTMLFrameElementBase):
      * html/HTMLFrameSetElement.cpp:
      (WebCore::HTMLFrameSetElement::insertedInto):
      (WebCore::HTMLFrameSetElement::removedFrom):
      * html/HTMLFrameSetElement.h:
      (HTMLFrameSetElement):
      * html/HTMLIFrameElement.cpp:
      (WebCore::HTMLIFrameElement::insertedInto):
      (WebCore::HTMLIFrameElement::removedFrom):
      * html/HTMLIFrameElement.h:
      (HTMLIFrameElement):
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::insertedInto):
      (WebCore::HTMLImageElement::removedFrom):
      * html/HTMLImageElement.h:
      (HTMLImageElement):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::insertedInto):
      (WebCore::HTMLInputElement::removedFrom):
      * html/HTMLInputElement.h:
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::insertedInto):
      (WebCore::HTMLLinkElement::removedFrom):
      * html/HTMLLinkElement.h:
      (HTMLLinkElement):
      * html/HTMLMapElement.cpp:
      (WebCore::HTMLMapElement::insertedInto):
      (WebCore::HTMLMapElement::removedFrom):
      * html/HTMLMapElement.h:
      (HTMLMapElement):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::insertedInto):
      (WebCore::HTMLMediaElement::removedFrom):
      * html/HTMLMediaElement.h:
      (HTMLMediaElement):
      * html/HTMLMetaElement.cpp:
      (WebCore::HTMLMetaElement::insertedInto):
      * html/HTMLMetaElement.h:
      (HTMLMetaElement):
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::insertedInto):
      (WebCore::HTMLObjectElement::removedFrom):
      * html/HTMLObjectElement.h:
      (HTMLObjectElement):
      * html/HTMLOptionElement.cpp:
      (WebCore::HTMLOptionElement::insertedInto):
      * html/HTMLOptionElement.h:
      (HTMLOptionElement):
      * html/HTMLQuoteElement.cpp:
      (WebCore::HTMLQuoteElement::insertedInto):
      * html/HTMLQuoteElement.h:
      (HTMLQuoteElement):
      * html/HTMLScriptElement.cpp:
      (WebCore::HTMLScriptElement::insertedInto):
      * html/HTMLScriptElement.h:
      (HTMLScriptElement):
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::insertedInto):
      * html/HTMLSelectElement.h:
      * html/HTMLSourceElement.cpp:
      (WebCore::HTMLSourceElement::insertedInto):
      * html/HTMLSourceElement.h:
      (HTMLSourceElement):
      * html/HTMLStyleElement.cpp:
      (WebCore::HTMLStyleElement::insertedInto):
      (WebCore::HTMLStyleElement::removedFrom):
      * html/HTMLStyleElement.h:
      (HTMLStyleElement):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::insertedInto):
      * html/HTMLTextFormControlElement.h:
      * html/HTMLTitleElement.cpp:
      (WebCore::HTMLTitleElement::insertedInto):
      (WebCore::HTMLTitleElement::removedFrom):
      * html/HTMLTitleElement.h:
      (HTMLTitleElement):
      * html/HTMLTrackElement.cpp:
      (WebCore::HTMLTrackElement::insertedInto):
      * html/HTMLTrackElement.h:
      (HTMLTrackElement):
      * mathml/MathMLMathElement.cpp:
      (WebCore::MathMLMathElement::insertedInto):
      * mathml/MathMLMathElement.h:
      (MathMLMathElement):
      * svg/SVGElement.cpp:
      (WebCore::SVGElement::removedFrom):
      * svg/SVGElement.h:
      (SVGElement):
      * svg/SVGFEImageElement.cpp:
      (WebCore::SVGFEImageElement::insertedInto):
      (WebCore::SVGFEImageElement::removedFrom):
      * svg/SVGFEImageElement.h:
      (SVGFEImageElement):
      * svg/SVGFontFaceElement.cpp:
      (WebCore::SVGFontFaceElement::insertedInto):
      (WebCore::SVGFontFaceElement::removedFrom):
      * svg/SVGFontFaceElement.h:
      (SVGFontFaceElement):
      * svg/SVGFontFaceUriElement.cpp:
      (WebCore::SVGFontFaceUriElement::insertedInto):
      * svg/SVGFontFaceUriElement.h:
      (SVGFontFaceUriElement):
      * svg/SVGGlyphElement.cpp:
      (WebCore::SVGGlyphElement::insertedInto):
      (WebCore::SVGGlyphElement::removedFrom):
      * svg/SVGGlyphElement.h:
      (SVGGlyphElement):
      * svg/SVGHKernElement.cpp:
      (WebCore::SVGHKernElement::insertedInto):
      (WebCore::SVGHKernElement::removedFrom):
      * svg/SVGHKernElement.h:
      (SVGHKernElement):
      * svg/SVGImageElement.cpp:
      (WebCore::SVGImageElement::insertedInto):
      * svg/SVGImageElement.h:
      (SVGImageElement):
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::insertedInto):
      (WebCore::SVGSVGElement::removedFrom):
      * svg/SVGSVGElement.h:
      (SVGSVGElement):
      * svg/SVGScriptElement.cpp:
      (WebCore::SVGScriptElement::insertedInto):
      * svg/SVGScriptElement.h:
      (SVGScriptElement):
      * svg/SVGStyleElement.cpp:
      (WebCore::SVGStyleElement::insertedInto):
      (WebCore::SVGStyleElement::removedFrom):
      * svg/SVGStyleElement.h:
      (SVGStyleElement):
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::insertedInto):
      (WebCore::SVGStyledElement::removedFrom):
      (WebCore::SVGStyledElement::updateRelativeLengthsInformation):
      * svg/SVGStyledElement.h:
      (SVGStyledElement):
      * svg/SVGTRefElement.cpp:
      (WebCore::SVGTRefElement::buildPendingResource):
      (WebCore::SVGTRefElement::insertedInto):
      (WebCore::SVGTRefElement::removedFrom):
      * svg/SVGTRefElement.h:
      (SVGTRefElement):
      * svg/SVGTextPathElement.cpp:
      (WebCore::SVGTextPathElement::insertedInto):
      * svg/SVGTextPathElement.h:
      * svg/SVGTitleElement.cpp:
      (WebCore::SVGTitleElement::insertedInto):
      (WebCore::SVGTitleElement::removedFrom):
      * svg/SVGTitleElement.h:
      (SVGTitleElement):
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::insertedInto):
      (WebCore::SVGUseElement::removedFrom):
      * svg/SVGUseElement.h:
      (SVGUseElement):
      * svg/SVGVKernElement.cpp:
      (WebCore::SVGVKernElement::insertedInto):
      (WebCore::SVGVKernElement::removedFrom):
      * svg/SVGVKernElement.h:
      (SVGVKernElement):
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::SVGSMILElement::insertedInto):
      (WebCore::SVGSMILElement::removedFrom):
      * svg/animation/SVGSMILElement.h:
      (SVGSMILElement):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114351 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9ea0080a
  32. 15 Apr, 2012 1 commit
    • antti@apple.com's avatar
      Capture CSS parser context · 071237b8
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=83998
      
      Source/WebCore: 
      
      Reviewed by Andreas Kling.
      
      Currently the CSS parser calls to the Document and StyleSheetInternal objects to get settings, base URL etc.
      The required information should be passed in on parser construction instead. The parser should not need to
      know about the document at all.
              
      The patch adds CSSParserContext struct that captures the parsing context. StyleSheetInternal saves the
      parsing context and reuses it for any further parsing.
              
      If the same stylesheet source is parsed with an identical context then the resulting stylesheet structure will
      be identical. This will allow sharing parsed stylesheets in the future.
      
      * css/CSSGrammar.y:
      * css/CSSImportRule.cpp:
      (WebCore::StyleRuleImport::setCSSStyleSheet):
      * css/CSSMediaRule.cpp:
      (WebCore::CSSMediaRule::insertRule):
      * css/CSSPageRule.cpp:
      (WebCore::CSSPageRule::setSelectorText):
      * css/CSSParser.cpp:
      (WebCore):
      (WebCore::strictCSSParserContext):
      (WebCore::CSSParserContext::CSSParserContext):
      (WebCore::CSSParser::CSSParser):
      (WebCore::CSSParser::parseKeyframeRule):
      (WebCore::CSSParser::parseValue):
      (WebCore::CSSParser::parseSelector):
      (WebCore::CSSParser::completeURL):
      (WebCore::CSSParser::parseContent):
      (WebCore::CSSParser::parseAttr):
      (WebCore::CSSParser::parseFillImage):
      (WebCore::CSSParser::parseFontFaceSrcURI):
      (WebCore::CSSParser::parseFontFaceSrc):
      (WebCore::CSSParser::parseBorderImage):
      (WebCore::CSSParser::parseImageSet):
      (WebCore::CSSParser::parseCustomFilter):
      (WebCore::CSSParser::parseFilter):
      (WebCore::CSSParser::cssRegionsEnabled):
      (WebCore::CSSParser::parseFlowThread):
      (WebCore::CSSParser::createMediaRule):
      (WebCore::CSSParser::createStyleRule):
      (WebCore::CSSParser::createFontFaceRule):
      (WebCore::CSSParser::createPageRule):
      (WebCore::CSSParser::createKeyframe):
      * css/CSSParser.h:
      (CSSParser):
      (WebCore::CSSParser::inStrictMode):
      (WebCore::CSSParser::inQuirksMode):
      (WebCore::CSSParser::validUnit):
      * css/CSSParserMode.h:
      (WebCore):
      (CSSParserContext):
      * css/CSSRule.h:
      (WebCore::CSSRule::parserContext):
      (CSSRule):
      * css/CSSStyleRule.cpp:
      (WebCore::CSSStyleRule::setSelectorText):
      * css/CSSStyleSheet.cpp:
      (WebCore::StyleSheetInternal::StyleSheetInternal):
      (WebCore::StyleSheetInternal::parseString):
      (WebCore::StyleSheetInternal::parseStringAtLine):
      (WebCore):
      (WebCore::StyleSheetInternal::updateBaseURL):
      (WebCore::StyleSheetInternal::completeURL):
      (WebCore::CSSStyleSheet::insertRule):
      * css/CSSStyleSheet.h:
      (StyleSheetInternal):
      (WebCore::StyleSheetInternal::parserContext):
      (WebCore::StyleSheetInternal::charset):
      (WebCore::StyleSheetInternal::setFinalURL):
      (WebCore::StyleSheetInternal::baseURL):
      * css/CSSValuePool.cpp:
      * css/StylePropertySet.cpp:
      (WebCore::StylePropertySet::parseDeclaration):
      * css/WebKitCSSKeyframesRule.cpp:
      (WebCore::WebKitCSSKeyframesRule::insertRule):
      * dom/Document.cpp:
      (WebCore::Document::webkitGetFlowByName):
      (WebCore::Document::pageUserSheet):
      (WebCore::Document::pageGroupUserSheets):
      * dom/Element.cpp:
      (WebCore::Element::webkitMatchesSelector):
      * dom/Node.cpp:
      (WebCore::Node::querySelector):
      (WebCore::Node::querySelectorAll):
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::parseStyleSheet):
      * dom/StyleElement.cpp:
      (WebCore::StyleElement::createSheet):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::setCSSStyleSheet):
      * html/shadow/ContentSelectorQuery.cpp:
      (WebCore::ContentSelectorQuery::ContentSelectorQuery):
      * inspector/InspectorStyleSheet.cpp:
      (WebCore::InspectorStyle::setPropertyText):
      (WebCore::InspectorStyleSheet::reparseStyleSheet):
      (WebCore::InspectorStyleSheet::ensureSourceData):
      (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
      
      LayoutTests: 
      
      Reviewed by Andreas Kling.
              
      Modify the tests so that they don't expect settings changes to apply to already existing stylesheets.
      
      * css3/filters/script-tests/custom-filter-property-parsing.js:
      * fast/regions/script-tests/css-regions-disabled.js:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      071237b8
  33. 11 Apr, 2012 1 commit
    • antti@apple.com's avatar
      Split CSSStyleSheet into internal and CSSOM type · da4d9c51
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=83612
              
      Reviewed by Andreas Kling.
      
      This will complete the separation of our style sheet data structures from CSSOM.
              
      The internal parts of CSSStyleSheet move to StyleSheetInternal. CSS parser
      and style selector will now operate on internal types. Unlike other CSSOM types
      CSSStyleSheets are still always instantiated to hold the top level author stylesheets
      (by Nodes).
      
      * css/CSSFontFaceSrcValue.cpp:
      (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs):
      * css/CSSFontFaceSrcValue.h:
      (CSSFontFaceSrcValue):
      * css/CSSImportRule.cpp:
      (WebCore::StyleRuleImport::create):
      (WebCore::StyleRuleImport::StyleRuleImport):
      (WebCore::StyleRuleImport::setCSSStyleSheet):
      (WebCore::StyleRuleImport::requestStyleSheet):
      (WebCore::CSSImportRule::~CSSImportRule):
      (WebCore):
      (WebCore::CSSImportRule::styleSheet):
      * css/CSSImportRule.h:
      (WebCore):
      (StyleRuleImport):
      (WebCore::StyleRuleImport::parentStyleSheet):
      (WebCore::StyleRuleImport::styleSheet):
      (CSSImportRule):
      * css/CSSMediaRule.cpp:
      (WebCore::CSSMediaRule::insertRule):
      * css/CSSParser.cpp:
      (WebCore::CSSParser::parseSheet):
      (WebCore::CSSParser::parseRule):
      (WebCore::CSSParser::parseKeyframeRule):
      (WebCore::CSSParser::parseFontFaceValue):
      (WebCore::CSSParser::parseValue):
      (WebCore::CSSParser::parseSelector):
      (WebCore::CSSParser::parseDeclaration):
      (WebCore::CSSParser::setStyleSheet):
      (WebCore::CSSParser::parseFlowThread):
      * css/CSSParser.h:
      (WebCore):
      (CSSParser):
      * css/CSSPrimitiveValue.cpp:
      (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs):
      * css/CSSPrimitiveValue.h:
      (CSSPrimitiveValue):
      * css/CSSReflectValue.cpp:
      (WebCore::CSSReflectValue::addSubresourceStyleURLs):
      * css/CSSReflectValue.h:
      (CSSReflectValue):
      * css/CSSRule.h:
      (CSSRule):
      * css/CSSStyleSelector.cpp:
      (RuleSet):
      (WebCore):
      (WebCore::CSSStyleSelector::CSSStyleSelector):
      (WebCore::CSSStyleSelector::addAuthorRulesAndCollectUserRulesFromSheets):
      (WebCore::CSSStyleSelector::determineScope):
      (WebCore::CSSStyleSelector::appendAuthorStylesheets):
      (WebCore::parseUASheet):
      (WebCore::CSSStyleSelector::collectMatchingRulesForList):
      * css/CSSStyleSelector.h:
      (CSSStyleSelector):
              
          Add a set for root CSSStyleSheet objects so that the wrappers created in ensureFullCSSOMWrapperForInspector
          stay valid.
              
      * css/CSSStyleSheet.cpp:
      (WebCore::StyleSheetInternal::StyleSheetInternal):
      (WebCore::StyleSheetInternal::~StyleSheetInternal):
      (WebCore::StyleSheetInternal::parserAppendRule):
      (WebCore::StyleSheetInternal::createChildRuleCSSOMWrapper):
      (WebCore::StyleSheetInternal::ruleCount):
      (WebCore::StyleSheetInternal::clearCharsetRule):
      (WebCore::StyleSheetInternal::clearRules):
      (WebCore::StyleSheetInternal::parserSetEncodingFromCharsetRule):
      (WebCore::StyleSheetInternal::wrapperInsertRule):
      (WebCore::StyleSheetInternal::wrapperDeleteRule):
      (WebCore::StyleSheetInternal::addNamespace):
      (WebCore::StyleSheetInternal::determineNamespace):
      (WebCore::StyleSheetInternal::parseString):
      (WebCore::StyleSheetInternal::parseStringAtLine):
      (WebCore::StyleSheetInternal::isLoading):
      (WebCore::StyleSheetInternal::checkLoaded):
      (WebCore::StyleSheetInternal::notifyLoadedSheet):
      (WebCore::StyleSheetInternal::startLoadingDynamicSheet):
      (WebCore::StyleSheetInternal::findStyleSheetOwnerNode):
      (WebCore::StyleSheetInternal::findDocument):
      (WebCore::StyleSheetInternal::setMediaQueries):
      (WebCore::StyleSheetInternal::styleSheetChanged):
      (WebCore):
      (WebCore::StyleSheetInternal::baseURL):
      (WebCore::StyleSheetInternal::completeURL):
      (WebCore::StyleSheetInternal::addSubresourceStyleURLs):
      (WebCore::StyleSheetInternal::parentStyleSheet):
      (WebCore::CSSStyleSheet::CSSStyleSheet):
      (WebCore::CSSStyleSheet::~CSSStyleSheet):
      (WebCore::CSSStyleSheet::setDisabled):
      (WebCore::CSSStyleSheet::length):
      (WebCore::CSSStyleSheet::item):
      (WebCore::CSSStyleSheet::rules):
      (WebCore::CSSStyleSheet::insertRule):
      (WebCore::CSSStyleSheet::addRule):
      (WebCore::CSSStyleSheet::cssRules):
      (WebCore::CSSStyleSheet::deleteRule):
      (WebCore::CSSStyleSheet::media):
      (WebCore::CSSStyleSheet::parentStyleSheet):
      * css/CSSStyleSheet.h:
      (WebCore):
      (WebCore::StyleSheetInternal::create):
      (WebCore::StyleSheetInternal::createInline):
      (StyleSheetInternal):
      (WebCore::StyleSheetInternal::ownerNode):
      (WebCore::StyleSheetInternal::clearOwnerNode):
      (WebCore::StyleSheetInternal::ownerRule):
      (WebCore::StyleSheetInternal::originalURL):
      (WebCore::StyleSheetInternal::title):
      (WebCore::StyleSheetInternal::setTitle):
      (WebCore::StyleSheetInternal::setFinalURL):
      (WebCore::StyleSheetInternal::finalURL):
      (CSSStyleSheet):
      (WebCore::CSSStyleSheet::create):
      (WebCore::CSSStyleSheet::removeRule):
      (WebCore::CSSStyleSheet::clearOwnerRule):
      (WebCore::CSSStyleSheet::styleSheetChanged):
      (WebCore::CSSStyleSheet::findDocument):
      (WebCore::CSSStyleSheet::internal):
      (WebCore::CSSStyleSheet::isCSSStyleSheet):
      (WebCore::CSSStyleSheet::type):
      * css/CSSValue.cpp:
      (WebCore::CSSValue::addSubresourceStyleURLs):
      * css/CSSValue.h:
      (WebCore):
      (CSSValue):
      * css/CSSValueList.cpp:
      (WebCore::CSSValueList::addSubresourceStyleURLs):
      * css/CSSValueList.h:
      (CSSValueList):
      * css/CSSValuePool.cpp:
      (WebCore::CSSValuePool::createFontFaceValue):
      * css/CSSValuePool.h:
      (WebCore):
      (CSSValuePool):
      * css/PropertySetCSSStyleDeclaration.cpp:
      (WebCore::PropertySetCSSStyleDeclaration::setCssText):
      (WebCore::PropertySetCSSStyleDeclaration::setProperty):
      (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
      * css/PropertySetCSSStyleDeclaration.h:
      (WebCore):
      * css/StylePropertySet.cpp:
      (WebCore::StylePropertySet::setProperty):
      (WebCore::StylePropertySet::parseDeclaration):
      (WebCore::StylePropertySet::addSubresourceStyleURLs):
      * css/StylePropertySet.h:
      (WebCore):
      (StylePropertySet):
      * css/StyleSheet.cpp:
      (WebCore):
      * css/StyleSheet.h:
      (StyleSheet):
      (WebCore::StyleSheet::media):
      (WebCore::StyleSheet::ownerRule):
      (WebCore::StyleSheet::isXSLStyleSheet):
      * css/WebKitCSSKeyframesRule.cpp:
      (WebCore::WebKitCSSKeyframesRule::insertRule):
      * dom/DOMImplementation.cpp:
      (WebCore::DOMImplementation::createCSSStyleSheet):
      * dom/Document.cpp:
      (WebCore::Document::updateBaseURL):
      (WebCore::Document::pageUserSheet):
      (WebCore::Document::pageGroupUserSheets):
      (WebCore::Document::addUserSheet):
      (WebCore::Document::elementSheet):
      (WebCore::Document::testAddedStylesheetRequiresStyleRecalc):
      (WebCore::Document::analyzeStylesheetChange):
      * dom/Document.h:
      (WebCore):
      (Document):
      (WebCore::Document::documentUserSheets):
      * dom/ElementAttributeData.cpp:
      (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
      * dom/ProcessingInstruction.cpp:
      (WebCore::ProcessingInstruction::setCSSStyleSheet):
      (WebCore::ProcessingInstruction::parseStyleSheet):
      * dom/StyleElement.cpp:
      (WebCore::StyleElement::createSheet):
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::setInlineStyleProperty):
      (WebCore::StyledElement::addSubresourceAttributeURLs):
      (WebCore):
      (WebCore::StyledElement::addPropertyToAttributeStyle):
      * dom/StyledElement.h:
      (WebCore):
      * html/HTMLFontElement.cpp:
      (WebCore::HTMLFontElement::collectStyleForAttribute):
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::parseAttribute):
      (WebCore::HTMLLinkElement::setCSSStyleSheet):
      (WebCore::HTMLLinkElement::styleSheetIsLoading):
      (WebCore::HTMLLinkElement::addSubresourceAttributeURLs):
      * html/HTMLStyleElement.cpp:
      (WebCore::HTMLStyleElement::parseAttribute):
      (WebCore::HTMLStyleElement::addSubresourceAttributeURLs):
      * inspector/InspectorStyleSheet.cpp:
      (WebCore::fillMediaListChain):
      (WebCore::InspectorStyle::setPropertyText):
      (WebCore::InspectorStyleSheet::styleSheetURL):
      (WebCore::InspectorStyleSheet::reparseStyleSheet):
      (WebCore::InspectorStyleSheet::ensureSourceData):
      (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
      * page/PageSerializer.cpp:
      (WebCore::PageSerializer::serializeCSSStyleSheet):
      * svg/SVGStyleElement.cpp:
      (WebCore::SVGStyleElement::parseAttribute):
      * xml/XSLStyleSheet.h:
      (XSLStyleSheet):
      (WebCore::XSLStyleSheet::finalURL):
      * xml/XSLStyleSheetLibxslt.cpp:
      (WebCore::XSLStyleSheet::XSLStyleSheet):
      (WebCore::XSLStyleSheet::isLoading):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da4d9c51