Changeset 84450 in webkit


Ignore:
Timestamp:
Apr 20, 2011 6:55:09 PM (13 years ago)
Author:
eric@webkit.org
Message:

2011-04-20 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

Split out isIteratorTarget from bidiNext and bidiFirst
https://bugs.webkit.org/show_bug.cgi?id=59033

This is the first (tiny) step of many. When I tried to
make larger changes to this function I broke stuff, so
doing this in tiny pieces so we know it's right.

  • rendering/InlineIterator.h: (WebCore::isIteratorTarget): (WebCore::bidiNext): (WebCore::bidiFirstSkippingInlines): (WebCore::bidiFirstNotSkippingInlines):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r84449 r84450  
     12011-04-20  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Split out isIteratorTarget from bidiNext and bidiFirst
     6        https://bugs.webkit.org/show_bug.cgi?id=59033
     7
     8        This is the first (tiny) step of many.  When I tried to
     9        make larger changes to this function I broke stuff, so
     10        doing this in tiny pieces so we know it's right.
     11
     12        * rendering/InlineIterator.h:
     13        (WebCore::isIteratorTarget):
     14        (WebCore::bidiNext):
     15        (WebCore::bidiFirstSkippingInlines):
     16        (WebCore::bidiFirstNotSkippingInlines):
     17
    1182011-04-20  Alexey Marinichev  <amarinichev@chromium.org>
    219
  • trunk/Source/WebCore/rendering/InlineIterator.h

    r84436 r84450  
    132132}
    133133
     134static inline bool isIteratorTarget(RenderObject* object)
     135{
     136    ASSERT(object); // The iterator will of course return 0, but its not an expected argument to this function.
     137    return object->isText() || object->isFloating() || object->isPositioned() || object->isReplaced();
     138}
     139
    134140// FIXME: This function is misleadingly named. It has little to do with bidi.
    135141// This function will iterate over inlines within a block, optionally notifying
     
    144150    while (current) {
    145151        next = 0;
    146         if (!oldEndOfInline && !current->isFloating() && !current->isReplaced() && !current->isPositioned() && !current->isText()) {
     152        if (!oldEndOfInline && !isIteratorTarget(current)) {
    147153            next = current->firstChild();
    148154            notifyResolverEnteredObject(resolver, next);
     
    179185            break;
    180186
    181         if (next->isText() || next->isFloating() || next->isReplaced() || next->isPositioned()
     187        if (isIteratorTarget(next)
    182188            || ((!skipInlines || !next->firstChild()) // Always return EMPTY inlines.
    183189                && next->isRenderInline()))
     
    212218
    213219    // FIXME: Unify this with the bidiNext call above.
    214     if (o && !o->isText() && !o->isReplaced() && !o->isFloating() && !o->isPositioned())
     220    if (o && !isIteratorTarget(o))
    215221        o = bidiNext(root, o, resolver, true);
    216222
     
    225231    // If either there are no children to walk, or the first one is correct
    226232    // then just return it.
    227     if (!o || o->isRenderInline() || o->isText() || o->isReplaced() || o->isFloating() || o->isPositioned())
     233    if (!o || o->isRenderInline() || isIteratorTarget(o))
    228234        return o;
    229235
Note: See TracChangeset for help on using the changeset viewer.