⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 176529 in webkit


Ignore:
Timestamp:
Nov 24, 2014, 4:20:35 PM (12 years ago)
Author:
benjamin@webkit.org
Message:

Move :placeholder-shown out of experimental
https://bugs.webkit.org/show_bug.cgi?id=138998

Reviewed by Andreas Kling.

The pseudo class :placeholder-shown is used by the inspector, disabling it breaks
the sidebar.

The implementation has been stable for a while, we can move it to stable.

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::selectorText):

  • css/CSSSelector.h:
  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne):

  • css/SelectorPseudoClassAndCompatibilityElementMap.in:
  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown):

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r176528 r176529  
     12014-11-24  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Move :placeholder-shown out of experimental
     4        https://bugs.webkit.org/show_bug.cgi?id=138998
     5
     6        Reviewed by Andreas Kling.
     7
     8        The pseudo class :placeholder-shown is used by the inspector, disabling it breaks
     9        the sidebar.
     10
     11        The implementation has been stable for a while, we can move it to stable.
     12
     13        * css/CSSSelector.cpp:
     14        (WebCore::CSSSelector::selectorText):
     15        * css/CSSSelector.h:
     16        * css/SelectorChecker.cpp:
     17        (WebCore::SelectorChecker::checkOne):
     18        * css/SelectorPseudoClassAndCompatibilityElementMap.in:
     19        * cssjit/SelectorCompiler.cpp:
     20        (WebCore::SelectorCompiler::addPseudoClassType):
     21        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
     22        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPlaceholderShown):
     23
    1242014-11-24  Antti Koivisto  <antti@apple.com>
    225
  • trunk/Source/WebCore/css/CSSSelector.cpp

    r176494 r176529  
    565565                break;
    566566            }
    567 #if ENABLE(CSS_SELECTORS_LEVEL4)
    568567            case CSSSelector::PseudoClassPlaceholderShown:
    569568                str.appendLiteral(":placeholder-shown");
    570569                break;
    571 #endif
    572570            case CSSSelector::PseudoClassOutOfRange:
    573571                str.appendLiteral(":out-of-range");
  • trunk/Source/WebCore/css/CSSSelector.h

    r176494 r176529  
    121121            PseudoClassDefault,
    122122            PseudoClassDisabled,
     123            PseudoClassMatches,
    123124            PseudoClassOptional,
    124 #if ENABLE(CSS_SELECTORS_LEVEL4)
    125125            PseudoClassPlaceholderShown,
    126 #endif
    127             PseudoClassMatches,
    128126            PseudoClassRequired,
    129127            PseudoClassReadOnly,
  • trunk/Source/WebCore/css/SelectorChecker.cpp

    r176494 r176529  
    730730                return hasMatchedAnything;
    731731            }
    732 #if ENABLE(CSS_SELECTORS_LEVEL4)
    733732        case CSSSelector::PseudoClassPlaceholderShown:
    734733            if (is<HTMLTextFormControlElement>(*element)) {
     
    740739            }
    741740            return false;
    742 #endif
    743741        case CSSSelector::PseudoClassNthChild:
    744742            if (!selector->parseNth())
  • trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in

    r176494 r176529  
    4646optional
    4747out-of-range
    48 #if ENABLE(CSS_SELECTORS_LEVEL4)
    4948placeholder-shown
    50 #endif
    5149read-only
    5250read-write
  • trunk/Source/WebCore/cssjit/SelectorCompiler.cpp

    r176494 r176529  
    294294    void generateElementIsLastChild(Assembler::JumpList& failureCases, const SelectorFragment&);
    295295    void generateElementIsOnlyChild(Assembler::JumpList& failureCases, const SelectorFragment&);
    296 #if ENABLE(CSS_SELECTORS_LEVEL4)
    297296    void generateElementHasPlaceholderShown(Assembler::JumpList& failureCases, const SelectorFragment&);
    298 #endif
    299297    void generateSynchronizeStyleAttribute(Assembler::RegisterID elementDataArraySizeAndFlags);
    300298    void generateSynchronizeAllAnimatedSVGAttribute(Assembler::RegisterID elementDataArraySizeAndFlags);
     
    611609    case CSSSelector::PseudoClassLastChild:
    612610    case CSSSelector::PseudoClassOnlyChild:
    613 #if ENABLE(CSS_SELECTORS_LEVEL4)
    614611    case CSSSelector::PseudoClassPlaceholderShown:
    615 #endif
    616612        fragment.pseudoClasses.add(type);
    617613        if (selectorContext == SelectorContext::QuerySelector)
     
    24442440    if (fragment.pseudoClasses.contains(CSSSelector::PseudoClassOnlyChild))
    24452441        generateElementIsOnlyChild(matchingPostTagNameFailureCases, fragment);
    2446 #if ENABLE(CSS_SELECTORS_LEVEL4)
    24472442    if (fragment.pseudoClasses.contains(CSSSelector::PseudoClassPlaceholderShown))
    24482443        generateElementHasPlaceholderShown(matchingPostTagNameFailureCases, fragment);
    2449 #endif
    24502444    if (fragment.pseudoClasses.contains(CSSSelector::PseudoClassFirstChild))
    24512445        generateElementIsFirstChild(matchingPostTagNameFailureCases, fragment);
     
    32883282}
    32893283
    3290 #if ENABLE(CSS_SELECTORS_LEVEL4)
    32913284static bool makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown(Element* element, const SelectorChecker::CheckingContext* checkingContext)
    32923285{
     
    33383331    failureCases.append(functionCall.callAndBranchOnBooleanReturnValue(Assembler::Zero));
    33393332}
    3340 #endif
    33413333
    33423334inline void SelectorCodeGenerator::generateElementHasTagName(Assembler::JumpList& failureCases, const QualifiedName& nameToMatch)
Note: See TracChangeset for help on using the changeset viewer.