2011-06-09 Julien Chaffraix <jchaffraix@codeaurora.org>
authorcommit-queue <commit-queue@webkit.org>
Thu, 9 Jun 2011 20:33:20 +0000 (20:33 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Fri, 10 Jun 2011 13:04:31 +0000 (10:04 -0300)
commit9b9da6b5e9abf0352d75545442f2a1d967d9f18b
treec16db6302f6e5df8139f335fd871ddca11b59b93
parent6ece1fda1630b0a723e4e85df436b418315116a4
2011-06-09  Julien Chaffraix  <jchaffraix@codeaurora.org>

        Reviewed by Antti Koivisto.

        REGRESSION(84329): Stylesheets on some pages do not load
        https://bugs.webkit.org/show_bug.cgi?id=61400

        Adding test to cover the regression. The test actually uncovered
        a bug in the way we handle alternate stylesheet and thus is
        failing some parts.

        * fast/css/link-disabled-attr-expected.txt: Added.
        * fast/css/link-disabled-attr.html: Added.
2011-06-09  Julien Chaffraix  <jchaffraix@codeaurora.org>

        Reviewed by Antti Koivisto.

        REGRESSION(84329): Stylesheets on some pages do not load
        https://bugs.webkit.org/show_bug.cgi?id=61400

        Test: fast/css/link-disabled-attr.html

        Fixed r84329: the change did not take into account the fact
        that HTMLLinkElement did already contain the disabled information
        and the 2 information were not linked as they should have!

        The new logic pushes the information to the stylesheet as this
        is what the spec mandates and what FF is doing. Also it keeps
        one bit of information (that JS enabled the stylesheet) as it
        is needed for the recalcStyleSelector logic.

        * dom/Document.cpp:
        (WebCore::Document::recalcStyleSelector): s/isDisabled/disabled.

        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::HTMLLinkElement): Removed m_disabledState,
        replaced by m_isEnabledViaScript.
        (WebCore::HTMLLinkElement::setDisabled): Updated the logic after
        m_disabledState removal. It also matches the spec by forwarding
        the disabled state to our stylesheet if we have one.
        (WebCore::HTMLLinkElement::parseMappedAttribute): Removed harmful
        handling of the disabledAttr.
        (WebCore::HTMLLinkElement::process): Updated after m_disabledState removal.
        * html/HTMLLinkElement.h:
        (WebCore::HTMLLinkElement::isEnabledViaScript): Ditto.
        (WebCore::HTMLLinkElement::isAlternate): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@88479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css/link-disabled-attr-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/link-disabled-attr.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/html/HTMLLinkElement.cpp
Source/WebCore/html/HTMLLinkElement.h