Bug 11271 - REGRESSION (r12358): Text in display: table unselectable
Summary: REGRESSION (r12358): Text in display: table unselectable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Nobody
URL:
Keywords: HasReduction, Regression
Depends on:
Blocks:
 
Reported: 2006-10-12 19:47 PDT by Matt Lilek
Modified: 2007-01-18 17:29 PST (History)
1 user (show)

See Also:


Attachments
Testcase (321 bytes, text/html)
2006-10-12 19:47 PDT, Matt Lilek
no flags Details
Patch (15.45 KB, patch)
2007-01-18 12:26 PST, mitz
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Lilek 2006-10-12 19:47:02 PDT
Text directly inside an element whose display is set to table is unselectable, but if the text is enclosed in another element, the text is selectable.  This only applies to text, not images, etc.

Works properly in Safari 2.0.4.  Testcase in a minute.
Comment 1 Matt Lilek 2006-10-12 19:47:43 PDT
Created attachment 11060 [details]
Testcase
Comment 2 mitz 2007-01-18 12:05:56 PST
Looks like a regression from <http://trac.webkit.org/projects/webkit/changeset/12358>. I am preparing a patch.
Comment 3 mitz 2007-01-18 12:26:11 PST
Created attachment 12540 [details]
Patch

No editing test regressions.
Comment 4 Darin Adler 2007-01-18 13:04:58 PST
Comment on attachment 12540 [details]
Patch

Looks good. The way Hyatt had me fix something like this in another similar case was to ask the renderer "isText() && !isBR()" instead of doing the checking on the DOM tree side.

I think we should have a RenderObject call that returns style for other renderers and 0 for text renderers that are not <br> elements. Or a boolean check on RenderObject like isRealText() which is isText() && !isBR().

r=me
Comment 5 Mark Rowe (bdash) 2007-01-18 17:29:42 PST
Landed in r18968.