Changeset 61232 in webkit


Ignore:
Timestamp:
Jun 15, 2010 8:23:12 PM (14 years ago)
Author:
yuzo@google.com
Message:

2010-06-15 Dmitry Titov <dimich@chromium.org>

Not reviewed, updating Chromium test expectations.

  • platform/chromium/test_expectations.txt:

2010-06-15 Mark Rowe <mrowe@apple.com>

Rubber-stamped by David Harrison.

sqlite3_prepare16_v2 is not documented as always setting "tail" during error cases.
Explicitly initialize it to null, just to be safe.

  • platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::prepare):

2010-06-10 Yuzo Fujishima <yuzo@google.com>

Reviewed by Shinichiro Hamaji.

Implement render style selection for pages to support CSS3 Paged Media.
https://bugs.webkit.org/show_bug.cgi?id=35961

  • Misc/WebCoreStatistics.h:
  • Misc/WebCoreStatistics.mm: (-[WebFrame pageProperty:propertyName:]):

2010-06-10 Yuzo Fujishima <yuzo@google.com>

Reviewed by Shinichiro Hamaji.

Implement render style selection for pages to support CSS3 Paged Media.
https://bugs.webkit.org/show_bug.cgi?id=35961

  • DumpRenderTree/LayoutTestController.cpp: (parsePagePropertyParameters): (pagePropertyCallback): (LayoutTestController::staticFunctions):
  • DumpRenderTree/LayoutTestController.h:
  • DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: (LayoutTestController::pageProperty):
  • DumpRenderTree/mac/LayoutTestControllerMac.mm: (LayoutTestController::pageProperty):
  • DumpRenderTree/win/LayoutTestControllerWin.cpp: (LayoutTestController::pageProperty):
Location:
trunk
Files:
2 added
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r61229 r61232  
    10951095
    10961096        * platform/chromium/test_expectations.txt:
     1097
     10982010-06-10  Yuzo Fujishima  <yuzo@google.com>
     1099
     1100        Reviewed by Shinichiro Hamaji.
     1101
     1102        Implement render style selection for pages to support CSS3 Paged Media.
     1103        https://bugs.webkit.org/show_bug.cgi?id=35961
     1104
     1105        * platform/chromium/test_expectations.txt:
     1106        * platform/gtk/Skipped:
     1107        * platform/qt/Skipped:
     1108        * platform/win/Skipped:
     1109        * printing/page-rule-selection-expected.txt: Added.
     1110        * printing/page-rule-selection.html: Added.
    10971111
    109811122010-06-10  Yuzo Fujishima  <yuzo@google.com>
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r61229 r61232  
    29182918// Whitespace difference between TestShell and DRT.
    29192919BUGDARIN : fast/history/history-back-within-subframe.html = TEXT
     2920
     2921// LayoutTestController::pageProperty is not implemented for Chromium yet.
     2922BUGWK35961 : printing/page-rule-selection.html = TEXT
  • trunk/LayoutTests/platform/gtk/Skipped

    r61173 r61232  
    59385938fast/forms/slider-mouse-events.html
    59395939fast/forms/slider-zoomed.html
     5940
     5941# LayoutTestController::pageProperty is not implemented for GTK yet.
     5942printing/page-rule-selection.html
  • trunk/LayoutTests/platform/qt/Skipped

    r61173 r61232  
    854854fast/ruby/rubyDOM-remove-text1.html
    855855fast/ruby/rubyDOM-remove-text2.html
     856
     857# Missing LayoutTestController::pageProperty.
     858# https://bugs.webkit.org/show_bug.cgi?id=35961
     859printing/page-rule-selection.html
    856860
    857861# ============================================================================= #
  • trunk/LayoutTests/platform/win/Skipped

    r60960 r61232  
    894894fast/dom/DeviceOrientation
    895895fast/dom/Window/window-properties-on-device-orientation.html
     896
     897# LayoutTestController::pageProperty is not implemented for WIN yet.
     898printing/page-rule-selection.html
  • trunk/WebCore/ChangeLog

    r61231 r61232  
    35373537        Reviewed by Shinichiro Hamaji.
    35383538
     3539        Implement render style selection for pages to support CSS3 Paged Media.
     3540        https://bugs.webkit.org/show_bug.cgi?id=35961
     3541
     3542        Test: printing/page-rule-selection.html
     3543
     3544        * WebCore.base.exp:
     3545        * css/CSSGrammar.y:
     3546        * css/CSSSelector.cpp:
     3547        (WebCore::CSSSelector::specificity):
     3548        (WebCore::CSSSelector::specificityForPage):
     3549        * css/CSSSelector.h:
     3550        (WebCore::CSSSelector::CSSSelector):
     3551        (WebCore::CSSSelector::isForPage):
     3552        (WebCore::CSSSelector::setForPage):
     3553        * css/CSSStyleSelector.cpp:
     3554        (WebCore::CSSStyleSelector::styleForPage):
     3555        (WebCore::CSSStyleSelector::matchPageRules):
     3556        (WebCore::CSSStyleSelector::matchPageRulesForList):
     3557        (WebCore::CSSStyleSelector::isLeftPage):
     3558        (WebCore::CSSStyleSelector::isFirstPage):
     3559        (WebCore::CSSStyleSelector::pageName):
     3560        * css/CSSStyleSelector.h:
     3561        (WebCore::CSSStyleSelector::isRightPage):
     3562        * css/html.css:
     3563        (@page):
     3564        * dom/Document.cpp:
     3565        (WebCore::Document::styleForPage):
     3566        * dom/Document.h:
     3567        * page/PrintContext.cpp:
     3568        (WebCore::PrintContext::pageProperty):
     3569        * page/PrintContext.h:
     3570
     3571
     35722010-06-10  Yuzo Fujishima  <yuzo@google.com>
     3573
     3574        Reviewed by Shinichiro Hamaji.
     3575
    35393576        Fix Bug 40452: REGRESSION: printing is broken if stylesheet has @page
    35403577        https://bugs.webkit.org/show_bug.cgi?id=40452
  • trunk/WebCore/WebCore.base.exp

    r61178 r61232  
    249249__ZN7WebCore12IconDatabase9setClientEPNS_18IconDatabaseClientE
    250250__ZN7WebCore12PluginWidget14invalidateRectERKNS_7IntRectE
     251__ZN7WebCore12PrintContext12pagePropertyEPNS_5FrameEPKci
    251252__ZN7WebCore12PrintContext13numberOfPagesEPNS_5FrameERKNS_9FloatSizeE
    252253__ZN7WebCore12PrintContext20pageNumberForElementEPNS_7ElementERKNS_9FloatSizeE
  • trunk/WebCore/css/CSSGrammar.y

    r60227 r61232  
    779779        $$ = p->createFloatingSelector();
    780780        $$->m_tag = QualifiedName(nullAtom, $1, p->m_defaultNamespace);
     781        $$->setForPage();
    781782    }
    782783    | IDENT pseudo_page {
    783784        CSSParser* p = static_cast<CSSParser*>(parser);
    784785        $$ = $2;
     786        if ($$) {
     787            $$->m_tag = QualifiedName(nullAtom, $1, p->m_defaultNamespace);
     788            $$->setForPage();
     789        }
     790    }
     791    | pseudo_page {
     792        $$ = $1;
    785793        if ($$)
    786             $$->m_tag = QualifiedName(nullAtom, $1, p->m_defaultNamespace);
    787     }
    788     | pseudo_page {
    789         $$ = $1;
     794            $$->setForPage();
    790795    }
    791796    | /* empty */ {
    792797        CSSParser* p = static_cast<CSSParser*>(parser);
    793798        $$ = p->createFloatingSelector();
     799        $$->setForPage();
    794800    }
    795801    ;
  • trunk/WebCore/css/CSSSelector.cpp

    r60880 r61232  
    3838unsigned int CSSSelector::specificity()
    3939{
     40    if (m_isForPage)
     41        return specificityForPage();
     42
    4043    // FIXME: Pseudo-elements and pseudo-classes do not have the same specificity. This function
    4144    // isn't quite correct.
     
    6568    // make sure it doesn't overflow
    6669    return s & 0xffffff;
     70}
     71
     72unsigned CSSSelector::specificityForPage()
     73{
     74    // See http://dev.w3.org/csswg/css3-page/#cascading-and-page-context
     75    unsigned s = (m_tag.localName() == starAtom ? 0 : 4);
     76
     77    switch (pseudoType()) {
     78    case PseudoFirstPage:
     79        s += 2;
     80        break;
     81    case PseudoLeftPage:
     82    case PseudoRightPage:
     83        s += 1;
     84        break;
     85    case PseudoNotParsed:
     86        break;
     87    default:
     88        ASSERT_NOT_REACHED();
     89    }
     90    return s;
    6791}
    6892
  • trunk/WebCore/css/CSSSelector.h

    r59751 r61232  
    4040            , m_isLastInSelectorList(false)
    4141            , m_hasRareData(false)
     42            , m_isForPage(false)
    4243            , m_tag(anyQName())
    4344        {
     
    5152            , m_isLastInSelectorList(false)
    5253            , m_hasRareData(false)
     54            , m_isForPage(false)
    5355            , m_tag(qName)
    5456        {
     
    254256        bool isSimple() const;
    255257
     258        bool isForPage() const { return m_isForPage; }
     259        void setForPage() { m_isForPage = true; }
     260
    256261        unsigned m_relation           : 3; // enum Relation
    257262        mutable unsigned m_match      : 4; // enum Match
     
    262267        bool m_isLastInSelectorList   : 1;
    263268        bool m_hasRareData            : 1;
    264 
     269        bool m_isForPage              : 1;
     270
     271        unsigned specificityForPage();
    265272        void extractPseudoType() const;
    266273
  • trunk/WebCore/css/CSSStyleSelector.cpp

    r61094 r61232  
    15491549}
    15501550
     1551PassRefPtr<RenderStyle> CSSStyleSelector::styleForPage(int pageIndex)
     1552{
     1553    initForStyleResolve(m_checker.m_document->body());
     1554
     1555    m_style = RenderStyle::create();
     1556    m_style->inheritFrom(m_rootElementStyle);
     1557
     1558    const bool isLeft = isLeftPage(pageIndex);
     1559    const bool isFirst = isFirstPage(pageIndex);
     1560    const String page = pageName(pageIndex);
     1561    matchPageRules(defaultPrintStyle, isLeft, isFirst, page);
     1562    matchPageRules(m_userStyle, isLeft, isFirst, page);
     1563    matchPageRules(m_authorStyle, isLeft, isFirst, page);
     1564    m_lineHeightValue = 0;
     1565    applyDeclarations<true>(false, 0, m_matchedDecls.size() - 1);
     1566
     1567    // If our font got dirtied, go ahead and update it now.
     1568    if (m_fontDirty)
     1569        updateFont();
     1570
     1571    // Line-height is set when we are sure we decided on the font-size
     1572    if (m_lineHeightValue)
     1573        applyProperty(CSSPropertyLineHeight, m_lineHeightValue);
     1574
     1575    applyDeclarations<false>(false, 0, m_matchedDecls.size() - 1);
     1576
     1577    // Now return the style.
     1578    return m_style.release();
     1579}
     1580
    15511581#if ENABLE(DATAGRID)
    15521582
     
    28882918        }
    28892919    }
     2920}
     2921
     2922void CSSStyleSelector::matchPageRules(CSSRuleSet* rules, bool isLeftPage, bool isFirstPage, const String& pageName)
     2923{
     2924    m_matchedRules.clear();
     2925
     2926    if (!rules)
     2927        return;
     2928
     2929    matchPageRulesForList(rules->getPageRules(), isLeftPage, isFirstPage, pageName);
     2930
     2931    // If we didn't match any rules, we're done.
     2932    if (m_matchedRules.isEmpty())
     2933        return;
     2934
     2935    // Sort the set of matched rules.
     2936    sortMatchedRules(0, m_matchedRules.size());
     2937
     2938    // Now transfer the set of matched rules over to our list of decls.
     2939    for (unsigned i = 0; i < m_matchedRules.size(); i++)
     2940        addMatchedDeclaration(m_matchedRules[i]->rule()->declaration());
     2941}
     2942
     2943void CSSStyleSelector::matchPageRulesForList(CSSRuleDataList* rules, bool isLeftPage, bool isFirstPage, const String& pageName)
     2944{
     2945    if (!rules)
     2946        return;
     2947
     2948    for (CSSRuleData* d = rules->first(); d; d = d->next()) {
     2949        CSSStyleRule* rule = d->rule();
     2950        const AtomicString& selectorLocalName = d->selector()->m_tag.localName();
     2951        if (selectorLocalName != starAtom && selectorLocalName != pageName)
     2952            continue;
     2953        CSSSelector::PseudoType pseudoType = d->selector()->pseudoType();
     2954        if ((pseudoType == CSSSelector::PseudoLeftPage && !isLeftPage)
     2955            || (pseudoType == CSSSelector::PseudoRightPage && isLeftPage)
     2956            || (pseudoType == CSSSelector::PseudoFirstPage && !isFirstPage))
     2957            continue;
     2958
     2959        // If the rule has no properties to apply, then ignore it.
     2960        CSSMutableStyleDeclaration* decl = rule->declaration();
     2961        if (!decl || !decl->length())
     2962            continue;
     2963
     2964        // Add this rule to our list of matched rules.
     2965        addMatchedRule(d);
     2966    }
     2967}
     2968
     2969bool CSSStyleSelector::isLeftPage(int pageIndex) const
     2970{
     2971    bool isFirstPageLeft = false;
     2972    if (m_rootElementStyle->direction() == RTL)
     2973        isFirstPageLeft = true;
     2974
     2975    return (pageIndex + (isFirstPageLeft ? 1 : 0)) % 2;
     2976}
     2977
     2978bool CSSStyleSelector::isFirstPage(int pageIndex) const
     2979{
     2980    // FIXME: In case of forced left/right page, page at index 1 (not 0) can be the first page.
     2981    return (!pageIndex);
     2982}
     2983
     2984String CSSStyleSelector::pageName(int /* pageIndex */) const
     2985{
     2986    // FIXME: Implement page index to page name mapping.
     2987    return "";
    28902988}
    28912989
  • trunk/WebCore/css/CSSStyleSelector.h

    r59387 r61232  
    9494        PassRefPtr<RenderStyle> pseudoStyleForElement(PseudoId pseudo, Element* e, RenderStyle* parentStyle = 0, bool matchVisitedPseudoClass = false);
    9595
     96        PassRefPtr<RenderStyle> styleForPage(int pageIndex);
     97
    9698        static PassRefPtr<RenderStyle> styleForDocument(Document*);
    9799
     
    181183        template <bool firstPass>
    182184        void applyDeclarations(bool important, int startIndex, int endIndex);
     185
     186        void matchPageRules(CSSRuleSet*, bool isLeftPage, bool isFirstPage, const String& pageName);
     187        void matchPageRulesForList(CSSRuleDataList*, bool isLeftPage, bool isFirstPage, const String& pageName);
     188        bool isLeftPage(int pageIndex) const;
     189        bool isRightPage(int pageIndex) const { return !isLeftPage(pageIndex); }
     190        bool isFirstPage(int pageIndex) const;
     191        String pageName(int pageIndex) const;
    183192       
    184193        CSSRuleSet* m_authorStyle;
  • trunk/WebCore/css/html.css

    r59541 r61232  
    684684}
    685685
     686/* page */
     687
     688@page {
     689    /* FIXME: Define the right default values for page properties. */
     690    margin: 1in;
     691}
     692
    686693/* noscript is handled internally, as it depends on settings */
  • trunk/WebCore/dom/Document.cpp

    r61126 r61232  
    14971497}
    14981498
     1499PassRefPtr<RenderStyle> Document::styleForPage(int pageIndex)
     1500{
     1501    RefPtr<RenderStyle> style = styleSelector()->styleForPage(pageIndex);
     1502    return style.release();
     1503}
     1504
    14991505void Document::createStyleSelector()
    15001506{
  • trunk/WebCore/dom/Document.h

    r61126 r61232  
    483483    void updateLayoutIgnorePendingStylesheets();
    484484    PassRefPtr<RenderStyle> styleForElementIgnoringPendingStylesheets(Element*);
     485    PassRefPtr<RenderStyle> styleForPage(int pageIndex);
    485486    static void updateStyleForAllDocuments(); // FIXME: Try to reduce the # of calls to this function.
    486487    DocLoader* docLoader() { return m_docLoader.get(); }
  • trunk/WebCore/page/PrintContext.cpp

    r60943 r61232  
    200200}
    201201
     202String PrintContext::pageProperty(Frame* frame, const char* propertyName, int pageNumber)
     203{
     204    Document* document = frame->document();
     205    document->updateLayout();
     206    RefPtr<RenderStyle> style = document->styleForPage(pageNumber);
     207
     208    // Implement formatters for properties we care about.
     209    if (!strcmp(propertyName, "margin-left"))
     210        return String::format("%d", style->marginLeft().rawValue());
     211    if (!strcmp(propertyName, "line-height"))
     212        return String::format("%d", style->lineHeight().rawValue());
     213    if (!strcmp(propertyName, "font-size"))
     214        return String::format("%d", style->fontDescription().computedPixelSize());
     215    if (!strcmp(propertyName, "font-family"))
     216        return String::format("%s", style->fontDescription().family().family().string().utf8().data());
     217
     218    return String::format("pageProperty() unimplemented for: %s", propertyName);
     219}
     220
    202221int PrintContext::numberOfPages(Frame* frame, const FloatSize& pageSizeInPixels)
    203222{
  • trunk/WebCore/page/PrintContext.h

    r57384 r61232  
    3232class GraphicsContext;
    3333class IntRect;
     34class String;
    3435
    3536class PrintContext {
     
    5556    // Used by layout tests.
    5657    static int pageNumberForElement(Element*, const FloatSize& pageSizeInPixels);
     58    static String pageProperty(Frame* frame, const char* propertyName, int pageNumber);
    5759    static int numberOfPages(Frame*, const FloatSize& pageSizeInPixels);
    5860
  • trunk/WebKit/mac/ChangeLog

    r61217 r61232  
     12010-06-10  Yuzo Fujishima  <yuzo@google.com>
     2
     3        Reviewed by Shinichiro Hamaji.
     4
     5        Implement render style selection for pages to support CSS3 Paged Media.
     6        https://bugs.webkit.org/show_bug.cgi?id=35961
     7
     8        * Misc/WebCoreStatistics.h:
     9        * Misc/WebCoreStatistics.mm:
     10        (-[WebFrame pageProperty:propertyName:]):
     11
    1122010-06-15  Darin Adler  <darin@apple.com>
    213
  • trunk/WebKit/mac/Misc/WebCoreStatistics.h

    r58386 r61232  
    8888- (int)pageNumberForElement:(DOMElement*)element:(float)pageWidthInPixels:(float)pageHeightInPixels;
    8989- (int)numberOfPages:(float)pageWidthInPixels:(float)pageHeightInPixels;
     90- (NSString *)pageProperty:(const char*)propertyName:(int)pageNumber;
    9091@end
  • trunk/WebKit/mac/Misc/WebCoreStatistics.mm

    r58386 r61232  
    276276}
    277277
     278- (NSString *)pageProperty:(const char *)propertyName:(int)pageNumber
     279{
     280    return PrintContext::pageProperty(_private->coreFrame, propertyName, pageNumber);
     281}
     282
    278283@end
  • trunk/WebKitTools/ChangeLog

    r61222 r61232  
     12010-06-10  Yuzo Fujishima  <yuzo@google.com>
     2
     3        Reviewed by Shinichiro Hamaji.
     4
     5        Implement render style selection for pages to support CSS3 Paged Media.
     6        https://bugs.webkit.org/show_bug.cgi?id=35961
     7
     8        * DumpRenderTree/LayoutTestController.cpp:
     9        (parsePagePropertyParameters):
     10        (pagePropertyCallback):
     11        (LayoutTestController::staticFunctions):
     12        * DumpRenderTree/LayoutTestController.h:
     13        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
     14        (LayoutTestController::pageProperty):
     15        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
     16        (LayoutTestController::pageProperty):
     17        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
     18        (LayoutTestController::pageProperty):
     19
    1202010-06-15  Sam Weinig  <sam@webkit.org>
    221
  • trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp

    r59840 r61232  
    522522}
    523523
     524// Caller needs to delete[] propertyName.
     525static bool parsePagePropertyParameters(JSContextRef context, int argumentCount, const JSValueRef* arguments, JSValueRef* exception, char*& propertyName, int& pageNumber)
     526{
     527    pageNumber = 0;
     528    switch (argumentCount) {
     529    case 2:
     530        pageNumber = static_cast<float>(JSValueToNumber(context, arguments[1], exception));
     531        if (*exception)
     532            return false;
     533        // Fall through.
     534    case 1: {
     535        JSRetainPtr<JSStringRef> propertyNameString(Adopt, JSValueToStringCopy(context, arguments[0], exception));
     536        if (*exception)
     537            return false;
     538
     539        size_t maxLength = JSStringGetMaximumUTF8CStringSize(propertyNameString.get());
     540        propertyName = new char[maxLength + 1];
     541        JSStringGetUTF8CString(propertyNameString.get(), propertyName, maxLength + 1);
     542        return true;
     543    }
     544    case 0:
     545    default:
     546        return false;
     547    }
     548}
     549
    524550static JSValueRef pageNumberForElementByIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    525551{
     
    547573    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
    548574    return JSValueMakeNumber(context, controller->numberOfPages(pageWidthInPixels, pageHeightInPixels));
     575}
     576
     577static JSValueRef pagePropertyCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
     578{
     579    char* propertyName = 0;
     580    int pageNumber = 0;
     581    if (!parsePagePropertyParameters(context, argumentCount, arguments, exception, propertyName, pageNumber))
     582        return JSValueMakeUndefined(context);
     583
     584    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
     585    JSValueRef value = JSValueMakeString(context, controller->pageProperty(propertyName, pageNumber).get());
     586
     587    delete[] propertyName;
     588    return value;
    549589}
    550590
     
    16021642        { "overridePreference", overridePreferenceCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    16031643        { "pageNumberForElementById", pageNumberForElementByIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     1644        { "pageProperty", pagePropertyCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    16041645        { "pathToLocalResource", pathToLocalResourceCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    16051646        { "pauseAnimationAtTimeOnElementWithId", pauseAnimationAtTimeOnElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
  • trunk/WebKitTools/DumpRenderTree/LayoutTestController.h

    r59840 r61232  
    6363    void overridePreference(JSStringRef key, JSStringRef value);
    6464    int pageNumberForElementById(JSStringRef id, float pageWidthInPixels, float pageHeightInPixels);
     65    JSRetainPtr<JSStringRef> pageProperty(const char* propertyName, int pageNumber) const;
    6566    JSStringRef pathToLocalResource(JSContextRef, JSStringRef url);
    6667    void queueBackNavigation(int howFarBackward);
  • trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp

    r59840 r61232  
    172172}
    173173
     174JSRetainPtr<JSStringRef> LayoutTestController::pageProperty(const char* propertyName, int pageNumber) const
     175{
     176    // FIXME: implement
     177    return JSRetainPtr<JSStringRef>();
     178}
     179
    174180size_t LayoutTestController::webHistoryItemCount()
    175181{
  • trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm

    r60488 r61232  
    213213}
    214214
     215JSRetainPtr<JSStringRef> LayoutTestController::pageProperty(const char* propertyName, int pageNumber) const
     216{
     217    JSRetainPtr<JSStringRef> propertyValue(Adopt, JSStringCreateWithCFString((CFStringRef)[mainFrame pageProperty:propertyName:pageNumber]));
     218    return propertyValue;
     219}
     220
    215221int LayoutTestController::numberOfPages(float pageWidthInPixels, float pageHeightInPixels)
    216222{
  • trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp

    r59840 r61232  
    12381238}
    12391239
     1240JSRetainPtr<JSStringRef> LayoutTestController::pageProperty(const char* propertyName, int pageNumber) const
     1241{
     1242    // FIXME: Implement this.
     1243    return JSRetainPtr<JSStringRef>();
     1244}
     1245
    12401246void LayoutTestController::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL)
    12411247{
Note: See TracChangeset for help on using the changeset viewer.