Changeset 93439 in webkit


Ignore:
Timestamp:
Aug 19, 2011 2:37:27 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r93425.
http://trac.webkit.org/changeset/93425
https://bugs.webkit.org/show_bug.cgi?id=66591

"The newly-added ASSERT is being triggered on several bots"
(Requested by jchaffraix on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-08-19

Source/WebCore:

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::HTMLLinkElement):
(WebCore::HTMLLinkElement::setDisabled):
(WebCore::HTMLLinkElement::sheetLoaded):
(WebCore::HTMLLinkElement::disabled):

  • html/HTMLLinkElement.h:

(WebCore::HTMLLinkElement::isEnabledViaScript):

LayoutTests:

  • fast/css/link-disabled-attr-expected.txt:
  • fast/css/stylesheet-enable-first-alternate-expected.txt: Removed.
  • fast/css/stylesheet-enable-first-alternate-on-load-expected.txt: Removed.
  • fast/css/stylesheet-enable-first-alternate-on-load.html: Removed.
  • fast/css/stylesheet-enable-first-alternate.html: Removed.
  • fast/css/stylesheet-enable-second-alternate-expected.txt: Removed.
  • fast/css/stylesheet-enable-second-alternate-on-load-expected.txt: Removed.
  • fast/css/stylesheet-enable-second-alternate-on-load.html: Removed.
  • fast/css/stylesheet-enable-second-alternate.html: Removed.
  • http/tests/css/link-css-disabled-value-with-slow-loading-sheet-expected.txt: Removed.
  • http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error-expected.txt: Removed.
  • http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html: Removed.
  • http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html: Removed.
  • http/tests/css/resources/link-css-disabled-value-with-slow-loading-sheet-in-error.js: Removed.
  • http/tests/css/resources/link-css-disabled-value-with-slow-loading-sheet.js: Removed.
  • http/tests/css/resources/slow-loading-sheet-in-error.php: Removed.
  • http/tests/css/resources/slow-loading-sheet.php: Removed.
Location:
trunk
Files:
16 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r93437 r93439  
     12011-08-19  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r93425.
     4        http://trac.webkit.org/changeset/93425
     5        https://bugs.webkit.org/show_bug.cgi?id=66591
     6
     7        "The newly-added ASSERT is being triggered on several bots"
     8        (Requested by jchaffraix on #webkit).
     9
     10        * fast/css/link-disabled-attr-expected.txt:
     11        * fast/css/stylesheet-enable-first-alternate-expected.txt: Removed.
     12        * fast/css/stylesheet-enable-first-alternate-on-load-expected.txt: Removed.
     13        * fast/css/stylesheet-enable-first-alternate-on-load.html: Removed.
     14        * fast/css/stylesheet-enable-first-alternate.html: Removed.
     15        * fast/css/stylesheet-enable-second-alternate-expected.txt: Removed.
     16        * fast/css/stylesheet-enable-second-alternate-on-load-expected.txt: Removed.
     17        * fast/css/stylesheet-enable-second-alternate-on-load.html: Removed.
     18        * fast/css/stylesheet-enable-second-alternate.html: Removed.
     19        * http/tests/css/link-css-disabled-value-with-slow-loading-sheet-expected.txt: Removed.
     20        * http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error-expected.txt: Removed.
     21        * http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html: Removed.
     22        * http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html: Removed.
     23        * http/tests/css/resources/link-css-disabled-value-with-slow-loading-sheet-in-error.js: Removed.
     24        * http/tests/css/resources/link-css-disabled-value-with-slow-loading-sheet.js: Removed.
     25        * http/tests/css/resources/slow-loading-sheet-in-error.php: Removed.
     26        * http/tests/css/resources/slow-loading-sheet.php: Removed.
     27
    1282011-08-19  Victoria Kirst  <vrk@chromium.org>
    229
  • trunk/LayoutTests/fast/css/link-disabled-attr-expected.txt

    r93425 r93439  
    1616FAIL link.disabled should be true. Was false.
    1717PASS link.sheet is non-null.
    18 PASS getComputedStyle(console).backgroundColor is 'rgb(0, 128, 0)'
     18FAIL getComputedStyle(console).backgroundColor should be rgb(0, 128, 0). Was rgba(0, 0, 0, 0).
    1919FAIL link.disabled should be true. Was false.
    20 FAIL getComputedStyle(console).backgroundColor should be rgba(0, 0, 0, 0). Was rgb(0, 128, 0).
     20PASS getComputedStyle(console).backgroundColor is originalBG
    2121PASS link.disabled is false
    22 PASS getComputedStyle(console).backgroundColor is 'rgb(0, 128, 0)'
     22FAIL getComputedStyle(console).backgroundColor should be rgb(0, 128, 0). Was rgba(0, 0, 0, 0).
    2323PASS getComputedStyle(console).backgroundColor is originalBG
    2424PASS successfullyParsed is true
  • trunk/Source/WebCore/ChangeLog

    r93438 r93439  
     12011-08-19  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r93425.
     4        http://trac.webkit.org/changeset/93425
     5        https://bugs.webkit.org/show_bug.cgi?id=66591
     6
     7        "The newly-added ASSERT is being triggered on several bots"
     8        (Requested by jchaffraix on #webkit).
     9
     10        * html/HTMLLinkElement.cpp:
     11        (WebCore::HTMLLinkElement::HTMLLinkElement):
     12        (WebCore::HTMLLinkElement::setDisabled):
     13        (WebCore::HTMLLinkElement::sheetLoaded):
     14        (WebCore::HTMLLinkElement::disabled):
     15        * html/HTMLLinkElement.h:
     16        (WebCore::HTMLLinkElement::isEnabledViaScript):
     17
    1182011-08-18  Adrienne Walker  <enne@google.com>
    219
  • trunk/Source/WebCore/html/HTMLLinkElement.cpp

    r93425 r93439  
    5757    , m_sizes(DOMSettableTokenList::create())
    5858    , m_loading(false)
    59     , m_scriptState(Unset)
     59    , m_isEnabledViaScript(false)
    6060    , m_createdByParser(createdByParser)
    6161    , m_isInShadowTree(false)
     
    8686void HTMLLinkElement::setDisabled(bool disabled)
    8787{
    88     bool wasEnabledViaScript = isEnabledViaScript();
    89     setIsEnabledViaScript(!disabled);
    90 
    9188    if (!m_sheet)
    9289        return;
    9390
    9491    bool wasDisabled = m_sheet->disabled();
    95     if (wasDisabled == disabled) {
    96         if (wasEnabledViaScript != isEnabledViaScript())
    97             document()->styleSelectorChanged(DeferRecalcStyle);
    98         return;
    99     }
     92    if (wasDisabled == disabled)
     93        return;
    10094
    10195    m_sheet->setDisabled(disabled);
     96    m_isEnabledViaScript = !disabled;
    10297
    10398    // If we change the disabled state while the sheet is still loading, then we have to
     
    126121    if (!disabled)
    127122        process();
    128 
    129     ASSERT(areDisabledAndScriptStatesConsistent());
    130123}
    131124
     
    367360bool HTMLLinkElement::sheetLoaded()
    368361{
    369     // Migrate the disabled information before removePendingSheet is called
    370     // as it will start a recalStyleSelector which needs this information.
    371     if (m_scriptState != Unset) {
    372         ASSERT(!m_loading);
    373         // FIXME: We should ASSERT that it was set for stylesheets only, but
    374         // currently we allow setDisabled to be called regardless of the <link> rel.
    375         setDisabled(m_scriptState == DisabledViaScript);
    376     }
    377 
    378362    if (!isLoading()) {
    379363        removePendingSheet();
    380364        return true;
    381365    }
    382 
    383366    return false;
    384367}
     
    463446bool HTMLLinkElement::disabled() const
    464447{
    465     ASSERT(areDisabledAndScriptStatesConsistent());
    466 
    467     if (!m_sheet) {
    468         // FF disagrees with the CSS OM spec and always has an associated stylesheet for alternate sheet (regardless of whether
    469         // the resource is fetched). As we store the enabled state in m_scriptState while loading, return this information to be
    470         // consistent with FF. sheetLoaded() is called at the end of any transfer (whether it was in error or not) so m_scriptState
    471         // will be transfered back into our stylesheet and the disabled() value should always be consistent.
    472         if (isLoading() && m_scriptState != Unset)
    473             return m_scriptState == DisabledViaScript;
    474 
    475         return false;
    476     }
    477 
    478     return m_sheet->disabled();
     448    return m_sheet && m_sheet->disabled();
    479449}
    480450
     
    489459}
    490460
    491 #ifndef NDEBUG
    492 bool HTMLLinkElement::areDisabledAndScriptStatesConsistent() const
    493 {
    494     if (!m_relAttribute.m_isStyleSheet)
    495         return true;
    496 
    497     // During loading, m_scriptState holds the temporary value for sheet()->disabled()
    498     // so it can have any values (same for sheet()->disabled()).
    499     if (isLoading())
    500         return true;
    501 
    502     if (m_scriptState == Unset)
    503         return true;
    504 
    505     bool isDisabledViaScript = m_scriptState == DisabledViaScript;
    506     return isDisabledViaScript == sheet()->disabled();
    507 }
    508 #endif
    509 
    510461} // namespace WebCore
  • trunk/Source/WebCore/html/HTMLLinkElement.h

    r93425 r93439  
    5858    // FIXME: This should be renamed isStyleSheetLoading as this is only used for stylesheets.
    5959    bool isLoading() const;
    60     bool isEnabledViaScript() const { return m_scriptState == EnabledViaScript; }
     60    bool isEnabledViaScript() const { return m_isEnabledViaScript; }
    6161    bool disabled() const;
    6262    void setDisabled(bool);
     
    8686    virtual bool isURLAttribute(Attribute*) const;
    8787
     88private:
    8889    virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
    8990
     
    9798    HTMLLinkElement(const QualifiedName&, Document*, bool createdByParser);
    9899
    99     void setIsEnabledViaScript(bool enabled) { m_scriptState = enabled ? EnabledViaScript : DisabledViaScript; }
    100 #ifndef NDEBUG
    101     bool areDisabledAndScriptStatesConsistent() const;
    102 #endif
    103 
    104100    LinkLoader m_linkLoader;
    105101    CachedResourceHandle<CachedCSSStyleSheet> m_cachedSheet;
     
    111107    LinkRelAttribute m_relAttribute;
    112108    bool m_loading;
    113     enum EnabledViaScriptState { Unset, EnabledViaScript, DisabledViaScript };
    114     EnabledViaScriptState m_scriptState;
     109    bool m_isEnabledViaScript;
    115110    bool m_createdByParser;
    116111    bool m_isInShadowTree;
    117 
     112   
    118113    PendingSheetType m_pendingSheetType;
    119114};
Note: See TracChangeset for help on using the changeset viewer.