Changeset 54071 in webkit


Ignore:
Timestamp:
Jan 29, 2010 10:32:33 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-29 Tony Chang <tony@chromium.org>

Reviewed by Darin Adler.

Add gdb helper methods for Ranges like we have for VisibleSelections.
https://bugs.webkit.org/show_bug.cgi?id=34308

No new tests, these are only for debugging.

  • dom/Position.cpp: (WebCore::Position::showTreeForThis):
  • dom/Range.cpp: (showTree):
  • dom/Range.h:
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r54070 r54071  
     12010-01-29  Tony Chang  <tony@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Add gdb helper methods for Ranges like we have for VisibleSelections.
     6        https://bugs.webkit.org/show_bug.cgi?id=34308
     7
     8        No new tests, these are only for debugging.
     9
     10        * dom/Position.cpp:
     11        (WebCore::Position::showTreeForThis):
     12        * dom/Range.cpp:
     13        (showTree):
     14        * dom/Range.h:
     15
    1162010-01-29  Drew Wilson  <atwilson@chromium.org>
    217
  • trunk/WebCore/dom/Position.cpp

    r53809 r54071  
    11771177void Position::showTreeForThis() const
    11781178{
    1179     if (node())
     1179    if (node()) {
    11801180        node()->showTreeForThis();
     1181        fprintf(stderr, "offset: %d\n", m_offset);
     1182    }
    11811183}
    11821184
  • trunk/WebCore/dom/Range.cpp

    r53809 r54071  
    19311931
    19321932} // namespace WebCore
     1933
     1934#ifndef NDEBUG
     1935
     1936void showTree(const WebCore::Range* range)
     1937{
     1938    if (range && range->boundaryPointsValid()) {
     1939        WebCore::Position start = range->startPosition();
     1940        WebCore::Position end = range->endPosition();
     1941        start.node()->showTreeAndMark(start.node(), "S", end.node(), "E");
     1942        fprintf(stderr, "start offset: %d, end offset: %d\n", start.deprecatedEditingOffset(), end.deprecatedEditingOffset());
     1943    }
     1944}
     1945
     1946#endif
  • trunk/WebCore/dom/Range.h

    r51324 r54071  
    159159} // namespace
    160160
     161#ifndef NDEBUG
     162// Outside the WebCore namespace for ease of invocation from gdb.
     163void showTree(const WebCore::Range*);
    161164#endif
     165
     166#endif
Note: See TracChangeset for help on using the changeset viewer.