Moved code that set initial value of text control via the editor from
CreateAnonymousContent() to a new method called SetInitialValue().
SetInitialValue() is now called during the frame's first reflow.
Added mUseEditor to indicate when it is safe to use the editor
to get and set values.
r=mjudge@netscape.com
git-svn-id: svn://10.0.0.236/trunk@78409 18797224-902f-48f8-a5cc-f745e15eee43
Fix some CSS errors found with CSS parser error reporting, with Ben's approval.
git-svn-id: svn://10.0.0.236/trunk@78230 18797224-902f-48f8-a5cc-f745e15eee43
I had to put in an ifdef _WIN32 because no other platform implements the call in nsIFontMetrics
I will have to address this ifdef in the next release (Bug 50998), which means I will probably implement
GetAveCharWidth for all platforms that don't have a native call
Bug 44656 r=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@78138 18797224-902f-48f8-a5cc-f745e15eee43
is (aveCharWidth * (sizeAttr+1))+padding+border
50280 - we need to set the mPrefSize width/height to -1 so the size of the text control gets recalculated
b=50280,44656,33312 r=kmclusk
git-svn-id: svn://10.0.0.236/trunk@77663 18797224-902f-48f8-a5cc-f745e15eee43
This enabled the text field to shrink if necessary in some situations (i.e. table cell precentages)
b=40596 r=kmclusk
git-svn-id: svn://10.0.0.236/trunk@77203 18797224-902f-48f8-a5cc-f745e15eee43
fix for bug 45662 (updating range impl to dom spec)
fix for some edge case selection issues invloving multiple windows, no bug #
but saari knows about this.
r: sfraser, jfrancis, mjudge, saari
a: beppe
git-svn-id: svn://10.0.0.236/trunk@77040 18797224-902f-48f8-a5cc-f745e15eee43
there is too much state to be remember to calc the min size for when ever it is asked for it.
(see also fix nsBoxFramae.cpp)
b=40596 r=evaughan
git-svn-id: svn://10.0.0.236/trunk@75787 18797224-902f-48f8-a5cc-f745e15eee43
39529 - caret width not correct for single/muti line textfields, which relied on:
46445 - nsLookAndFeel needs to be a service.
r: mjudge@netscape.com, kin@netscape.com
a:beppe
git-svn-id: svn://10.0.0.236/trunk@75084 18797224-902f-48f8-a5cc-f745e15eee43
Modified CreateAnonymousContent() to disable editor undo before
setting the default value, and then reenable it afterwards.
r=brade@netscape.com
git-svn-id: svn://10.0.0.236/trunk@75066 18797224-902f-48f8-a5cc-f745e15eee43
layout/html/forms/src/nsGfxTextControlFrame2.cpp
- Modified CreateAnonymousContent() to disable forced
refreshes and reflows in the editor, and call
SetTextControlFrameState() to set the intial value
of the text widget.
- Fixed leak in SetTextControlFrameState().
editor/public/nsIHTMLEditor.h
- Added DisableForcedUpdates and DisableForcedRefreshes flags.
editor/base/nsEditor.cpp
- Modified EndUpdateViewBatch() so that it uses the new
DisableForcedUpdates and DisableForcedRefreshes flags.
- We now also close the reflow batch before we close the
update batch.
r=brade@netscape.com
git-svn-id: svn://10.0.0.236/trunk@74257 18797224-902f-48f8-a5cc-f745e15eee43
Modified CreateAnonymousContent() and AttributeChanged()
to set the editor's readonly and disabled flags.
r=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@74165 18797224-902f-48f8-a5cc-f745e15eee43
output system, and use \n (the DOM linebreak character) when getting
output from text controls. Also fix some warnings. r=kin.
git-svn-id: svn://10.0.0.236/trunk@73925 18797224-902f-48f8-a5cc-f745e15eee43
was a debug change in my tree that I accidentally included in my previous
checkin.
git-svn-id: svn://10.0.0.236/trunk@73690 18797224-902f-48f8-a5cc-f745e15eee43
Modified CreateAnonymousContent() to use mCachedState if it exists.
r=ducarroz@netscape.com
git-svn-id: svn://10.0.0.236/trunk@73688 18797224-902f-48f8-a5cc-f745e15eee43
Modified CreateAnonymousContent() so that if the text widget has
a default value, it adds it as a text node under the div after it
is created. Add better error checking to avoid possible problems.
Removed calls to SetTextControlState() that were used
to initialize the text widget contents from GetPrefSize() because
it was causing a reflow within a reflow and the editor to be re-entered.
Added missing call to GetText() in Reset().
r=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@73592 18797224-902f-48f8-a5cc-f745e15eee43