[webkit-changes] cvs commit: WebCore/kwq KWQKHTMLPart.mm

David hyatt at opensource.apple.com
Tue Aug 30 14:36:27 PDT 2005


hyatt       05/08/30 14:36:26

  Modified:    .        ChangeLog
               khtml/css cssparser.cpp cssstyleselector.cpp cssvalues.in
                        html4.css parser.y
               khtml/rendering render_style.h
               kwq      KWQKHTMLPart.mm
  Log:
  	Change the value of "element" for khtml-user-select to "ignore".  Also undo the support of "-moz"
  	for any -moz property.  Add support for -webkit as an alternative to -khtml.
  
          Reviewed by darin
  
          * khtml/css/cssparser.cpp:
          (CSSParser::parseValue):
          * khtml/css/cssstyleselector.cpp:
          (khtml::CSSStyleSelector::applyProperty):
          * khtml/css/cssvalues.in:
          * khtml/css/html4.css:
          * khtml/css/parser.y:
          * khtml/rendering/render_style.h:
          (khtml::):
          * kwq/KWQKHTMLPart.mm:
          (KWQKHTMLPart::canMouseDownStartSelect):
  
  Revision  Changes    Path
  1.43      +19 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- ChangeLog	30 Aug 2005 20:12:56 -0000	1.42
  +++ ChangeLog	30 Aug 2005 21:36:22 -0000	1.43
  @@ -1,3 +1,22 @@
  +2005-08-30  David Hyatt  <hyatt at apple.com>
  +
  +	Change the value of "element" for khtml-user-select to "ignore".  Also undo the support of "-moz"
  +	for any -moz property.  Add support for -webkit as an alternative to -khtml.
  +	
  +        Reviewed by darin
  +
  +        * khtml/css/cssparser.cpp:
  +        (CSSParser::parseValue):
  +        * khtml/css/cssstyleselector.cpp:
  +        (khtml::CSSStyleSelector::applyProperty):
  +        * khtml/css/cssvalues.in:
  +        * khtml/css/html4.css:
  +        * khtml/css/parser.y:
  +        * khtml/rendering/render_style.h:
  +        (khtml::):
  +        * kwq/KWQKHTMLPart.mm:
  +        (KWQKHTMLPart::canMouseDownStartSelect):
  +
   2005-08-30  John Sullivan  <sullivan at apple.com>
   
           Reviewed by Kevin Decker.
  
  
  
  1.106     +1 -1      WebCore/khtml/css/cssparser.cpp
  
  Index: cssparser.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/css/cssparser.cpp,v
  retrieving revision 1.105
  retrieving revision 1.106
  diff -u -r1.105 -r1.106
  --- cssparser.cpp	28 Aug 2005 04:10:12 -0000	1.105
  +++ cssparser.cpp	30 Aug 2005 21:36:22 -0000	1.106
  @@ -1105,7 +1105,7 @@
               valid_primitive = true;
           break;
       case CSS_PROP__KHTML_USER_SELECT: // auto | none | text
  -        if (id == CSS_VAL_AUTO || id == CSS_VAL_NONE || id == CSS_VAL_TEXT || id == CSS_VAL_ELEMENT)
  +        if (id == CSS_VAL_AUTO || id == CSS_VAL_NONE || id == CSS_VAL_TEXT || id == CSS_VAL_IGNORE)
               valid_primitive = true;
           break;
       case CSS_PROP_TEXT_OVERFLOW: // clip | ellipsis
  
  
  
  1.203     +2 -2      WebCore/khtml/css/cssstyleselector.cpp
  
  Index: cssstyleselector.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/css/cssstyleselector.cpp,v
  retrieving revision 1.202
  retrieving revision 1.203
  diff -u -r1.202 -r1.203
  --- cssstyleselector.cpp	29 Aug 2005 21:29:09 -0000	1.202
  +++ cssstyleselector.cpp	30 Aug 2005 21:36:23 -0000	1.203
  @@ -3881,8 +3881,8 @@
   	    case CSS_VAL_TEXT:
   		style->setUserSelect(SELECT_TEXT);
   		break;
  -            case CSS_VAL_ELEMENT:
  -                style->setUserSelect(SELECT_ELEMENT);
  +            case CSS_VAL_IGNORE:
  +                style->setUserSelect(SELECT_IGNORE);
   	    default:
   		return;
   	}
  
  
  
  1.32      +5 -0      WebCore/khtml/css/cssvalues.in
  
  Index: cssvalues.in
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/css/cssvalues.in,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- cssvalues.in	27 Aug 2005 00:14:19 -0000	1.31
  +++ cssvalues.in	30 Aug 2005 21:36:23 -0000	1.32
  @@ -384,6 +384,11 @@
   element
   
   #
  +# CSS_PROP__KHTML_USER_SELECT
  +#
  +ignore
  +
  +#
   # CSS_PROP_WIDTH/MIN_WIDTH/MAX_WIDTH
   #
   intrinsic
  
  
  
  1.75      +3 -3      WebCore/khtml/css/html4.css
  
  Index: html4.css
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/css/html4.css,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- html4.css	8 Aug 2005 21:11:58 -0000	1.74
  +++ html4.css	30 Aug 2005 21:36:23 -0000	1.75
  @@ -308,11 +308,11 @@
   
   input[type="radio"], input[type="checkbox"] {
       margin: 3px 0.5ex;
  -    -khtml-user-select: element
  +    -khtml-user-select: ignore
   }
   
   select, button, input[type="button"], input[type="image"], input[type="submit"], input[type="reset"], img {
  -    -khtml-user-select: element
  +    -khtml-user-select: ignore
   }
   
   option, optgroup, area, param {
  @@ -395,7 +395,7 @@
   a:-khtml-any-link {
       color: -khtml-link;
       text-decoration: underline;
  -    -khtml-user-select: element
  +    -khtml-user-select: ignore
   }
   
   a:-khtml-any-link:active {
  
  
  
  1.44      +14 -6     WebCore/khtml/css/parser.y
  
  Index: parser.y
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/css/parser.y,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- parser.y	30 Jul 2005 02:33:12 -0000	1.43
  +++ parser.y	30 Aug 2005 21:36:23 -0000	1.44
  @@ -67,16 +67,24 @@
           if (prop.startsWith("-apple-")) {
               prop = "-khtml-" + prop.mid(7);
               tagStr = prop.ascii();
  -        } else if (prop.startsWith("-moz-")) {
  -            prop = "-khtml-" + prop.mid(5);
  -            len += 2;
  +        } else if (prop.startsWith("-webkit-")) {
  +            prop = "-khtml-" + prop.mid(8);
  +            len--;
               tagStr = prop.ascii();
           }
           
           // Honor the use of -khtml-opacity (for Safari 1.1) and also the use of -moz-opacity in Mozilla.
  -        if (prop == "-khtml-opacity") {
  -            tagStr = "opacity";
  -            len = 7;
  +        if (prop == "-khtml-opacity" || prop == "-moz-opacity") {
  +            const char * const opacity = "opacity";
  +            tagStr = opacity;
  +            len = strlen(opacity);
  +        }
  +        
  +        // Honor the use of -moz-border-radius (for compatibility with sites that use Mozilla's border-radius
  +        if (prop == "-moz-border-radius") {
  +            const char * const borderRadius = "border-radius";
  +            tagStr = borderRadius;
  +            len = strlen(borderRadius);
           }
       }
       
  
  
  
  1.89      +1 -1      WebCore/khtml/rendering/render_style.h
  
  Index: render_style.h
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_style.h,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- render_style.h	27 Aug 2005 00:14:21 -0000	1.88
  +++ render_style.h	30 Aug 2005 21:36:24 -0000	1.89
  @@ -739,7 +739,7 @@
   // CSS3 User Select Values
   
   enum EUserSelect {
  -    SELECT_AUTO, SELECT_NONE, SELECT_TEXT, SELECT_ELEMENT
  +    SELECT_AUTO, SELECT_NONE, SELECT_TEXT, SELECT_IGNORE
   };
   
   // Word Break Values. Matches WinIE, rather than CSS3
  
  
  
  1.666     +2 -2      WebCore/kwq/KWQKHTMLPart.mm
  
  Index: KWQKHTMLPart.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.mm,v
  retrieving revision 1.665
  retrieving revision 1.666
  diff -u -r1.665 -r1.666
  --- KWQKHTMLPart.mm	29 Aug 2005 21:29:29 -0000	1.665
  +++ KWQKHTMLPart.mm	30 Aug 2005 21:36:25 -0000	1.666
  @@ -138,7 +138,7 @@
   using khtml::RenderWidget;
   using khtml::RightWordIfOnBoundary;
   using khtml::Selection;
  -using khtml::SELECT_ELEMENT;
  +using khtml::SELECT_IGNORE;
   using khtml::setEnd;
   using khtml::setStart;
   using khtml::ShadowData;
  @@ -2014,7 +2014,7 @@
   
       // Some controls and images can't start a select on a mouse down.
       for (RenderObject* curr = node->renderer(); curr; curr = curr->parent()) {
  -        if (curr->style()->userSelect() == SELECT_ELEMENT)
  +        if (curr->style()->userSelect() == SELECT_IGNORE)
               return false;
       }
   
  
  
  



More information about the webkit-changes mailing list