Changeset 83540 in webkit


Ignore:
Timestamp:
Apr 11, 2011 5:16:10 PM (13 years ago)
Author:
rniwa@webkit.org
Message:

2011-04-11 Ryosuke Niwa <rniwa@webkit.org>

Unreviewed, rolling out r83515.
http://trac.webkit.org/changeset/83515
https://bugs.webkit.org/show_bug.cgi?id=57178

Broke GTK builds. nextOnLineExists and prevOnLineExists are still used in AccessibilityObjectWrapperAtk.cpp.

  • rendering/InlineBox.cpp: (WebCore::InlineBox::nextOnLineExists): (WebCore::InlineBox::prevOnLineExists):
  • rendering/InlineBox.h: (WebCore::InlineBox::InlineBox):
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r83538 r83540  
     12011-04-11  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Unreviewed, rolling out r83515.
     4        http://trac.webkit.org/changeset/83515
     5        https://bugs.webkit.org/show_bug.cgi?id=57178
     6
     7        Broke GTK builds. nextOnLineExists and prevOnLineExists are still used in AccessibilityObjectWrapperAtk.cpp.
     8
     9        * rendering/InlineBox.cpp:
     10        (WebCore::InlineBox::nextOnLineExists):
     11        (WebCore::InlineBox::prevOnLineExists):
     12        * rendering/InlineBox.h:
     13        (WebCore::InlineBox::InlineBox):
     14
    1152011-04-11  Brady Eidson  <beidson@apple.com>
    216
  • trunk/Source/WebCore/rendering/InlineBox.cpp

    r83515 r83540  
    212212}
    213213
     214bool InlineBox::nextOnLineExists() const
     215{
     216    if (!m_determinedIfNextOnLineExists) {
     217        m_determinedIfNextOnLineExists = true;
     218
     219        if (!parent())
     220            m_nextOnLineExists = false;
     221        else if (nextOnLine())
     222            m_nextOnLineExists = true;
     223        else
     224            m_nextOnLineExists = parent()->nextOnLineExists();
     225    }
     226    return m_nextOnLineExists;
     227}
     228
     229bool InlineBox::prevOnLineExists() const
     230{
     231    if (!m_determinedIfPrevOnLineExists) {
     232        m_determinedIfPrevOnLineExists = true;
     233       
     234        if (!parent())
     235            m_prevOnLineExists = false;
     236        else if (prevOnLine())
     237            m_prevOnLineExists = true;
     238        else
     239            m_prevOnLineExists = parent()->prevOnLineExists();
     240    }
     241    return m_prevOnLineExists;
     242}
     243
    214244InlineBox* InlineBox::nextLeafChild() const
    215245{
  • trunk/Source/WebCore/rendering/InlineBox.h

    r83515 r83540  
    5959        , m_dirOverride(false)
    6060        , m_isText(false)
     61        , m_determinedIfNextOnLineExists(false)
     62        , m_determinedIfPrevOnLineExists(false)
     63        , m_nextOnLineExists(false)
     64        , m_prevOnLineExists(false)
    6165        , m_expansion(0)
    6266#ifndef NDEBUG
     
    9094        , m_dirOverride(false)
    9195        , m_isText(false)
     96        , m_determinedIfNextOnLineExists(false)
     97        , m_determinedIfPrevOnLineExists(false)
     98        , m_nextOnLineExists(false)
     99        , m_prevOnLineExists(false)
    92100        , m_expansion(0)
    93101#ifndef NDEBUG
     
    194202        m_prev = prev;
    195203    }
     204    bool nextOnLineExists() const;
     205    bool prevOnLineExists() const;
    196206
    197207    virtual bool isLeaf() const { return true; }
     
    348358    bool m_isText : 1; // Whether or not this object represents text with a non-zero height. Includes non-image list markers, text boxes.
    349359protected:
     360    mutable bool m_determinedIfNextOnLineExists : 1;
     361    mutable bool m_determinedIfPrevOnLineExists : 1;
     362    mutable bool m_nextOnLineExists : 1;
     363    mutable bool m_prevOnLineExists : 1;
    350364    int m_expansion : 11; // for justified text
    351365
Note: See TracChangeset for help on using the changeset viewer.