Changeset 90966 in webkit


Ignore:
Timestamp:
Jul 13, 2011 5:29:55 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[CSSRegions] Parse -webkit-content-order property
https://bugs.webkit.org/show_bug.cgi?id=63897

Patch by Mihnea Ovidenie <mihnea@adobe.com> on 2011-07-13
Reviewed by David Hyatt.

Source/WebCore:

Test: fast/regions/webkit-content-order-parsing.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

  • css/CSSParser.cpp:

(WebCore::CSSParser::parseValue):

  • css/CSSPropertyNames.in:
  • css/CSSStyleSelector.cpp:

(WebCore::CSSStyleSelector::applyProperty):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::diff):

  • rendering/style/RenderStyle.h:

(WebCore::InheritedFlags::regionIndex):
(WebCore::InheritedFlags::setRegionIndex):
(WebCore::InheritedFlags::initialRegionIndex):

  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):

  • rendering/style/StyleRareNonInheritedData.h:

LayoutTests:

  • fast/regions/script-tests/webkit-content-order-parsing.js: Added.
  • fast/regions/webkit-content-order-parsing-expected.txt: Added.
  • fast/regions/webkit-content-order-parsing.html: Added.
Location:
trunk
Files:
3 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r90962 r90966  
     12011-07-13  Mihnea Ovidenie  <mihnea@adobe.com>
     2
     3        [CSSRegions] Parse -webkit-content-order property
     4        https://bugs.webkit.org/show_bug.cgi?id=63897
     5
     6        Reviewed by David Hyatt.
     7
     8        * fast/regions/script-tests/webkit-content-order-parsing.js: Added.
     9        * fast/regions/webkit-content-order-parsing-expected.txt: Added.
     10        * fast/regions/webkit-content-order-parsing.html: Added.
     11
    1122011-07-13  Michael Saboff  <msaboff@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r90963 r90966  
     12011-07-13  Mihnea Ovidenie  <mihnea@adobe.com>
     2
     3        [CSSRegions] Parse -webkit-content-order property
     4        https://bugs.webkit.org/show_bug.cgi?id=63897
     5
     6        Reviewed by David Hyatt.
     7
     8        Test: fast/regions/webkit-content-order-parsing.html
     9
     10        * css/CSSComputedStyleDeclaration.cpp:
     11        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
     12        * css/CSSParser.cpp:
     13        (WebCore::CSSParser::parseValue):
     14        * css/CSSPropertyNames.in:
     15        * css/CSSStyleSelector.cpp:
     16        (WebCore::CSSStyleSelector::applyProperty):
     17        * rendering/style/RenderStyle.cpp:
     18        (WebCore::RenderStyle::diff):
     19        * rendering/style/RenderStyle.h:
     20        (WebCore::InheritedFlags::regionIndex):
     21        (WebCore::InheritedFlags::setRegionIndex):
     22        (WebCore::InheritedFlags::initialRegionIndex):
     23        * rendering/style/StyleRareNonInheritedData.cpp:
     24        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
     25        (WebCore::StyleRareNonInheritedData::operator==):
     26        * rendering/style/StyleRareNonInheritedData.h:
     27
    1282011-07-13  James Robinson  <jamesr@chromium.org>
    229
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r90863 r90966  
    249249#if ENABLE(CSS_REGIONS)
    250250    , CSSPropertyWebkitFlow
     251    , CSSPropertyWebkitContentOrder
    251252#endif
    252253#if ENABLE(SVG)
     
    16681669                return primitiveValueCache->createIdentifierValue(CSSValueAuto);
    16691670            return primitiveValueCache->createValue(style->flowThread(), CSSPrimitiveValue::CSS_STRING);
     1671        case CSSPropertyWebkitContentOrder:
     1672            return primitiveValueCache->createValue(style->regionIndex(), CSSPrimitiveValue::CSS_NUMBER);
    16701673#endif
    16711674        /* Shorthand properties, currently not supported see bug 13658*/
  • trunk/Source/WebCore/css/CSSParser.cpp

    r90937 r90966  
    15921592    case CSSPropertyWebkitFlow:
    15931593        return parseFlowThread(propId, important);
     1594    case CSSPropertyWebkitContentOrder:
     1595        validPrimitive = validUnit(value, FInteger, m_strict);
     1596        break;
    15941597#endif
    15951598    case CSSPropertyWebkitUserDrag: // auto | none | element
  • trunk/Source/WebCore/css/CSSPropertyNames.in

    r90863 r90966  
    329329#if defined(ENABLE_CSS_REGIONS) && ENABLE_CSS_REGIONS
    330330-webkit-flow
     331-webkit-content-order
    331332#endif
    332333#if defined(ENABLE_CSS_EXCLUSIONS) && ENABLE_CSS_EXCLUSIONS
  • trunk/Source/WebCore/css/CSSStyleSelector.cpp

    r90863 r90966  
    48924892        else
    48934893            m_style->setFlowThread(primitiveValue->getStringValue());
     4894        return;
     4895    case CSSPropertyWebkitContentOrder:
     4896        HANDLE_INHERIT_AND_INITIAL(regionIndex, RegionIndex);
     4897        m_style->setRegionIndex(clampToInteger(primitiveValue->getDoubleValue()));
    48944898        return;
    48954899#endif
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r90937 r90966  
    348348#if ENABLE(CSS_REGIONS)
    349349        if (rareNonInheritedData->m_flowThread != other->rareNonInheritedData->m_flowThread
    350             || rareNonInheritedData->m_regionThread != other->rareNonInheritedData->m_regionThread)
     350            || rareNonInheritedData->m_regionThread != other->rareNonInheritedData->m_regionThread
     351            || rareNonInheritedData->m_regionIndex != other->rareNonInheritedData->m_regionIndex)
    351352            return StyleDifferenceLayout;
    352353#endif
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r90869 r90966  
    747747    const AtomicString& flowThread() const { return rareNonInheritedData->m_flowThread; }
    748748    const AtomicString& regionThread() const { return rareNonInheritedData->m_regionThread; }
     749    int regionIndex() const { return rareNonInheritedData->m_regionIndex; }
    749750#endif
    750751
     
    11001101    void setFlowThread(const AtomicString& flowThread) { SET_VAR(rareNonInheritedData, m_flowThread, flowThread); }
    11011102    void setRegionThread(const AtomicString& regionThread) { SET_VAR(rareNonInheritedData, m_regionThread, regionThread); }
     1103    void setRegionIndex(int regionIndex) { SET_VAR(rareNonInheritedData, m_regionIndex, regionIndex); }
    11021104#endif
    11031105
     
    13441346    static const AtomicString& initialFlowThread() { return nullAtom; }
    13451347    static const AtomicString& initialRegionThread() { return nullAtom; }
     1348    static int initialRegionIndex() { return 0; }
    13461349#endif
    13471350
  • trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp

    r90863 r90966  
    5959    , m_flowThread(RenderStyle::initialFlowThread())
    6060    , m_regionThread(RenderStyle::initialRegionThread())
     61    , m_regionIndex(RenderStyle::initialRegionIndex())
    6162#endif
    6263#if ENABLE(CSS_EXCLUSIONS)
     
    105106    , m_flowThread(o.m_flowThread)
    106107    , m_regionThread(o.m_regionThread)
     108    , m_regionIndex(o.m_regionIndex)
    107109#endif
    108110#if ENABLE(CSS_EXCLUSIONS)
     
    158160        && (m_flowThread == o.m_flowThread)
    159161        && (m_regionThread == o.m_regionThread)
     162        && (m_regionIndex == o.m_regionIndex)
    160163#endif
    161164#if ENABLE(CSS_EXCLUSIONS)
  • trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h

    r90937 r90966  
    136136    AtomicString m_flowThread;
    137137    AtomicString m_regionThread;
     138    int m_regionIndex;
    138139#endif
    139140
Note: See TracChangeset for help on using the changeset viewer.