Reviewed by Darin.
* rendering/RenderText.h:
(WebCore::RenderText::selectionState):
Change the m_selectionState enum-bitfield to an unsigned-bitfield,
because enums on Windows are signed, which caused it to become
negative (whereas the valid values are all positive).
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fceaa1c..06357fc 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2007-01-09 Dex Deacon <occupant4@gmail.com>
+
+ Reviewed by Darin.
+
+ * rendering/RenderText.h:
+ (WebCore::RenderText::selectionState):
+ Change the m_selectionState enum-bitfield to an unsigned-bitfield,
+ because enums on Windows are signed, which caused it to become
+ negative (whereas the valid values are all positive).
+
2007-01-09 Darin Adler <darin@apple.com>
Reviewed by Hyatt.
diff --git a/WebCore/rendering/RenderText.h b/WebCore/rendering/RenderText.h
index 4dc99bd..0fae8159 100644
--- a/WebCore/rendering/RenderText.h
+++ b/WebCore/rendering/RenderText.h
@@ -117,7 +117,7 @@
void setTextWithOffset(PassRefPtr<StringImpl>, unsigned offset, unsigned len, bool force = false);
virtual bool canBeSelectionLeaf() const { return true; }
- virtual SelectionState selectionState() const { return m_selectionState; }
+ virtual SelectionState selectionState() const { return static_cast<SelectionState>(m_selectionState); }
virtual void setSelectionState(SelectionState s);
virtual IntRect selectionRect();
virtual IntRect caretRect(int offset, EAffinity, int* extraWidthToEndOfLine = 0);
@@ -167,7 +167,7 @@
int m_beginMinWidth;
int m_endMinWidth;
- SelectionState m_selectionState : 3 ;
+ unsigned m_selectionState : 3; // enums on Windows are signed, so this needs to be unsigned to prevent it turning negative.
bool m_hasBreakableChar : 1; // Whether or not we can be broken into multiple lines.
bool m_hasBreak : 1; // Whether or not we have a hard break (e.g., <pre> with '\n').
bool m_hasTab : 1; // Whether or not we have a variable width tab character (e.g., <pre> with '\t').