Commit a0f1a0c6 authored by rniwa@webkit.org's avatar rniwa@webkit.org
Browse files

2009-07-21 Ryosuke Niwa <rniwa@webkit.org>

        Reviewed by Eric Seidel.

        REGRESSION (r46142):  editing/execCommand/19087.html & editing/execCommand/19653-1.html fail in Windows build
        https://bugs.webkit.org/show_bug.cgi?id=27480

        Because m_anchorType : 2 is treated as a signed integer by cl.exe, anchorType() wasn't returning the correct value.
        We made m_anchorType unsigned so that anchorType() returns the correct value.

        * dom/Position.h:
        (WebCore::Position::anchorType): statically cast to AnchorType



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 17158547
2009-07-21 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Eric Seidel.
REGRESSION (r46142): editing/execCommand/19087.html & editing/execCommand/19653-1.html fail in Windows build
https://bugs.webkit.org/show_bug.cgi?id=27480
Because m_anchorType : 2 is treated as a signed integer by cl.exe, anchorType() wasn't returning the correct value.
We made m_anchorType unsigned so that anchorType() returns the correct value.
* dom/Position.h:
(WebCore::Position::anchorType): statically cast to AnchorType
2009-07-21 Jian Li <jianli@chromium.org>
 
Reviewed by David Levin.
......
......@@ -70,7 +70,7 @@ public:
// For creating offset positions:
Position(PassRefPtr<Node> anchorNode, int offset, AnchorType);
AnchorType anchorType() const { return m_anchorType; }
AnchorType anchorType() const { return static_cast<AnchorType>(m_anchorType); }
void clear() { m_anchorNode.clear(); m_offset = 0; m_anchorType = PositionIsOffsetInAnchor; m_isLegacyEditingPosition = false; }
......@@ -172,7 +172,7 @@ private:
// returns true, then other places in editing will treat m_offset == 0 as "before the anchor"
// and m_offset > 0 as "after the anchor node". See rangeCompliantEquivalent for more info.
int m_offset;
AnchorType m_anchorType : 2;
unsigned m_anchorType : 2;
bool m_isLegacyEditingPosition : 1;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment