Changeset 14346 in webkit
- Timestamp:
- May 12, 2006 7:44:53 PM (18 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r14345 r14346 1 2006-05-12 Timothy Hatcher <timothy@apple.com> 2 3 Reviewed by Darin. 4 5 http://bugzilla.opendarwin.org/show_bug.cgi?id=7156 6 Bug 7156: TinyMCE: Links are actually activated in editable area, not editable. 7 8 Links in editable areas will not activate or perform a navigation 9 change (on par with WinIE and Firefox.) To visit the link 10 you can shift-click. Manual test added. 11 12 * css/cssstyleselector.cpp: 13 (WebCore::CSSStyleSelector::adjustRenderStyle): 14 * html/HTMLAnchorElement.cpp: 15 (WebCore::HTMLAnchorElement::defaultEventHandler): 16 (WebCore::HTMLAnchorElement::setActive): 17 * html/HTMLAnchorElement.h: 18 * manual-tests/contenteditable-link.html: Added. 19 * page/FrameView.cpp: 20 (WebCore::selectCursor): 21 1 22 2006-05-12 Eric Seidel <eseidel@apple.com> 2 23 … … 1089 1110 * WebCore: Removed an extra WebCore subtree that somehow got checked in. 1090 1111 1091 >>>>>>> .r142971092 1112 2006-05-10 David Carson <dacarson@gmail.com> 1093 1113 -
trunk/WebCore/css/cssstyleselector.cpp
r14278 r14346 999 999 style->display() == TABLE_ROW_GROUP || style->display() == TABLE_ROW)) 1000 1000 style->setOverflow(OVISIBLE); 1001 1002 // Links should be user selectable when content editable 1003 if (e && e->isLink() && (style->userModify() == READ_WRITE || style->userModify() == READ_WRITE_PLAINTEXT_ONLY)) 1004 style->setUserSelect(SELECT_AUTO); 1001 1005 1002 1006 // Cull out any useless layers and also repeat patterns into additional layers. -
trunk/WebCore/html/HTMLAnchorElement.cpp
r14345 r14346 105 105 // Don't make this KEYUP_EVENT again, it makes khtml follow links it shouldn't, 106 106 // when pressing Enter in the combo. 107 if ( (evt->type() == clickEvent || (evt->type() == keydownEvent && m_focused)) && m_isLink) {107 if (m_isLink && (evt->type() == clickEvent || (evt->type() == keydownEvent && m_focused))) { 108 108 MouseEvent* e = 0; 109 109 if (evt->type() == clickEvent) … … 114 114 k = static_cast<KeyboardEvent*>(evt); 115 115 116 DeprecatedString utarget;117 DeprecatedString url;118 119 116 if (e && e->button() == 2) { 117 HTMLElement::defaultEventHandler(evt); 118 return; 119 } 120 121 if (e && !e->shiftKey() && isContentEditable()) { 120 122 HTMLElement::defaultEventHandler(evt); 121 123 return; … … 134 136 } 135 137 136 url = parseURL(getAttribute(hrefAttr)).deprecatedString(); 137 138 utarget = getAttribute(targetAttr).deprecatedString(); 138 DeprecatedString url = WebCore::parseURL(getAttribute(hrefAttr)).deprecatedString(); 139 String utarget = getAttribute(targetAttr); 139 140 140 141 if (e && e->button() == 1) … … 144 145 HTMLImageElement* img = static_cast<HTMLImageElement*>(evt->target()); 145 146 if (img && img->isServerMap()) { 146 RenderImage *r = static_cast<RenderImage*>(img->renderer());147 RenderImage* r = static_cast<RenderImage*>(img->renderer()); 147 148 if(r && e) { 148 149 int absx, absy; … … 160 161 } 161 162 } 162 if (!evt->defaultPrevented()) { 163 if (document()->frame())164 165 } 163 164 if (!evt->defaultPrevented() && document()->frame()) 165 document()->frame()->urlSelected(url, utarget); 166 166 167 evt->setDefaultHandled(); 167 168 } 169 168 170 HTMLElement::defaultEventHandler(evt); 169 171 } 170 172 173 void HTMLAnchorElement::setActive(bool down, bool pause) 174 { 175 if (isContentEditable()) 176 return; 177 ContainerNode::setActive(down, pause); 178 } 171 179 172 180 void HTMLAnchorElement::parseMappedAttribute(MappedAttribute *attr) -
trunk/WebCore/html/HTMLAnchorElement.h
r14345 r14346 46 46 virtual void parseMappedAttribute(MappedAttribute*); 47 47 virtual void defaultEventHandler(Event*); 48 virtual void setActive(bool active = true, bool pause = false); 48 49 virtual void accessKeyAction(bool fullAction); 49 50 virtual bool isURLAttribute(Attribute*) const; -
trunk/WebCore/page/FrameView.cpp
r14345 r14346 555 555 556 556 switch (style ? style->cursor() : CURSOR_AUTO) { 557 case CURSOR_AUTO: 558 if (event.isOverLink() || isSubmitImage(node)) 557 case CURSOR_AUTO: { 558 bool editable = (node && node->isContentEditable()); 559 if ((event.isOverLink() || isSubmitImage(node)) && (!editable || event.event().shiftKey())) 559 560 return handCursor(); 560 if ( (node && node->isContentEditable())|| (renderer && renderer->isText() && renderer->canSelect()))561 if (editable || (renderer && renderer->isText() && renderer->canSelect())) 561 562 return iBeamCursor(); 562 563 return pointerCursor(); 564 } 563 565 case CURSOR_CROSS: 564 566 return crossCursor();
Note: See TracChangeset
for help on using the changeset viewer.