Changeset 428


Ignore:
Timestamp:
11/28/05 03:54:34 (9 years ago)
Author:
gogo
Message:

This branch contains preliminary work for supporting Opera.

Opera technology preview which includes Rich Editing (designMode
style) may be downloaded at http://snapshot.opera.com/

Currently with only a few modifications (and identifing as Gecko for the
time being) Xinha actually works to a useful degree.

Location:
branches/opera
Files:
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/opera/htmlarea.js

    r421 r428  
    7272HTMLArea.is_win_ie = (HTMLArea.is_ie && !HTMLArea.is_mac); 
    7373HTMLArea.is_gecko  = (navigator.product == "Gecko"); 
     74HTMLArea.is_designMode = (typeof document.designMode != 'undefined'); 
    7475 
    7576// Creates a new HTMLArea object.  Tries to replace the textarea with the given 
     
    275276 
    276277  // CharSet of the iframe, default is the charset of the document 
    277   this.charSet = HTMLArea.is_gecko ? document.characterSet : document.charset; 
     278  this.charSet = (typeof document.characterSet != 'undefined') ? document.characterSet : document.charset; 
    278279 
    279280  // URL-s 
     
    13891390  // Add an event to initialize the iframe once loaded. 
    13901391  editor._iframeLoadDone = false; 
     1392   
     1393  // Opera doesn't work with the event on the iframe, we have the blank page that gets 
     1394  //  loaded tell us when ready. 
     1395  if(this._iframe.contentWindow && this._iframe.contentWindow.xinhaReadyToRoll) 
     1396  { 
     1397    editor._iframeLoadDone = true; 
     1398    editor.initIframe(); 
     1399    return; 
     1400  } 
     1401   
    13911402  HTMLArea._addEvent 
    13921403  ( 
     
    14031414    } 
    14041415  ); 
    1405  
     1416   
    14061417}; 
    14071418 
     
    17641775  HTMLArea.prototype.editorIsActivated = function() { 
    17651776    try { 
    1766       if (HTMLArea.is_gecko) return (this._doc.designMode == 'on'); 
     1777      if (HTMLArea.is_designMode) return (this._doc.designMode == 'on'); 
    17671778      else return (this._doc.body.contentEditable); 
    17681779    } catch (e) 
     
    17831794    } 
    17841795 
    1785     if (HTMLArea.is_gecko && this._doc.designMode != 'on') 
     1796    if (HTMLArea.is_designMode && this._doc.designMode != 'on') 
    17861797    { 
    17871798      try 
     
    18191830    this.disableToolbar(); 
    18201831 
    1821     if (HTMLArea.is_gecko && this._doc.designMode != 'off') 
     1832    if (HTMLArea.is_designMode && this._doc.designMode != 'off') 
    18221833    { 
    18231834      try {this._doc.designMode = 'off';} catch (e) {} 
     
    18411852 
    18421853  HTMLArea.prototype.initIframe = function() 
    1843   { 
     1854  {         
    18441855    this.disableToolbar(); 
    18451856    var doc = null; 
     
    18571868      doc = this._doc;       
    18581869      if (!doc) { // try later 
    1859         if (HTMLArea.is_gecko) { 
     1870        if (0 && HTMLArea.is_gecko) { 
    18601871          setTimeout(function() { editor.initIframe()}, 50); 
    18611872          return false; 
     
    18681879    { // try later 
    18691880      setTimeout(function() { editor.initIframe()}, 50); 
     1881      return false; 
    18701882    } 
    18711883     
     
    43624374    } 
    43634375  } 
    4364   return HTMLArea.is_gecko || HTMLArea.is_ie; 
     4376  
     4377  return HTMLArea.is_ie || HTMLArea.is_designMode; 
    43654378}; 
    43664379 
  • branches/opera/plugins/ImageManager/Classes/GD.php

    r43 r428  
    333333    * better result. 
    334334    * 
    335     * @param $new_x int new width 
    336     * @param $new_y int new height 
     335    * @param int  $new_x new width 
     336    * @param int  $new_y new height 
    337337    * 
    338338    * @return true on success or pear error 
     
    438438     * Save the image file 
    439439     * 
    440      * @param $filename string the name of the file to write to 
    441      * @param $quality  int     output DPI, default is 85 
    442      * @param $types    string  define the output format, default 
     440     * @param string  $filename the name of the file to write to 
     441     * @param int     $quality  output DPI, default is 85 
     442     * @param string  $types    define the output format, default 
    443443     *                          is the current used format 
    444444     * 
  • branches/opera/plugins/ImageManager/Classes/IM.php

    r174 r428  
    183183     * Save the image file 
    184184     * 
    185      * @param $filename string the name of the file to write to 
    186      * @param $quality  quality image dpi, default=75 
    187      * @param $type     string  (JPG,PNG...) 
     185     * @param string  $filename the name of the file to write to 
     186     * @param quality $quality image dpi, default=75 
     187     * @param string  $type     (JPG,PNG...) 
    188188     * 
    189189     * @return none 
  • branches/opera/plugins/ImageManager/Classes/NetPBM.php

    r43 r428  
    206206     * Save the image file 
    207207     * 
    208      * @param $filename string the name of the file to write to 
     208     * @param string $filename the name of the file to write to 
    209209     * @param string $type (jpeg,png...); 
    210210     * @param int $quality 75 
  • branches/opera/popups/blank.html

    r20 r428  
    11<html> 
     2 <body onload="window.xinhaReadyToRoll = true;"> 
     3 </body> 
    24</html> 
Note: See TracChangeset for help on using the changeset viewer.