WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
26364
Search can find text that's hidden by overflow:hidden
https://bugs.webkit.org/show_bug.cgi?id=26364
Summary
Search can find text that's hidden by overflow:hidden
Darin Adler
Reported
Saturday, June 13, 2009 1:58:34 AM UTC
The site may be gone by the time you see this, but at
http://developer.apple.com/wwdc/sessions/
if you search for "AppKit" you'll find something invisible. It's part of a hidden description.
Attachments
patch
(31.09 KB, patch)
2009-06-13 07:55 PDT
,
Darin Adler
mitz: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
Saturday, June 13, 2009 1:59:53 AM UTC
<
rdar://problem/6952081
>
Darin Adler
Comment 2
Saturday, June 13, 2009 3:55:01 PM UTC
Created
attachment 31236
[details]
patch
mitz
Comment 3
Saturday, June 13, 2009 6:23:11 PM UTC
Comment on
attachment 31236
[details]
patch
> +static inline bool fullyClipsContents(Node* node) > +{ > + RenderObject* renderer = node->renderer(); > + if (!renderer || !renderer->isBox()) > + return false; > + RenderStyle* style = renderer->style(); > + if (style->overflowX() == OVISIBLE || style->overflowY() == OVISIBLE) > + return false; > + return toRenderBox(renderer)->size().isEmpty(); > +}
I know that the change log says "We can add other cases here later", but why not handle cases like "overflow-x: hidden; width: 0;" and "overflow-y: hidden; height: 0;" now?
> + // Push true if this node full clips its contents, or if a parent already has fully
Typo: "full clips".
Darin Adler
Comment 4
Sunday, June 14, 2009 7:18:36 PM UTC
(In reply to
comment #3
)
> I know that the change log says "We can add other cases here later", but why > not handle cases like "overflow-x: hidden; width: 0;" and "overflow-y: hidden; > height: 0;" now?
I tested those cases in the snippet editor, and in both cases no text was visible. That is also the rule the text iterator implements.
mitz
Comment 5
Sunday, June 14, 2009 7:22:41 PM UTC
Comment on
attachment 31236
[details]
patch (In reply to
comment #4
)
> (In reply to
comment #3
) > > I know that the change log says "We can add other cases here later", but why > > not handle cases like "overflow-x: hidden; width: 0;" and "overflow-y: hidden; > > height: 0;" now? > > I tested those cases in the snippet editor, and in both cases no text was > visible. That is also the rule the text iterator implements.
Oh, I see: setting overflow-x to hidden sets overflow-y to something other than visible, so + if (style->overflowX() == OVISIBLE || style->overflowY() == OVISIBLE) covers this case.
Darin Adler
Comment 6
Sunday, June 14, 2009 11:08:15 PM UTC
(In reply to
comment #5
)
> Oh, I see: setting overflow-x to hidden sets overflow-y to something other than > visible, so > + if (style->overflowX() == OVISIBLE || style->overflowY() == OVISIBLE) > covers this case.
I guess that || should really be an && -- I'll test to make sure that works and land it that way.
Darin Adler
Comment 7
Monday, June 15, 2009 4:10:21 AM UTC
http://trac.webkit.org/changeset/44674
Finnur Thorarinsson
Comment 8
Thursday, June 18, 2009 1:16:59 AM UTC
Darin, I think we may have a problem with this patch... See:
http://code.google.com/p/chromium/issues/detail?id=14491
Darin Adler
Comment 9
Thursday, June 18, 2009 1:56:53 AM UTC
(In reply to
comment #8
)
> Darin, I think we may have a problem with this patch. > > See:
http://code.google.com/p/chromium/issues/detail?id=14491
I'd be happy to help fix it. If you can come up with a test case, feel free to put the bug in bugs.webkit.org and assign it to hem.
Finnur Thorarinsson
Comment 10
Friday, June 19, 2009 8:46:32 PM UTC
Filed:
https://bugs.webkit.org/show_bug.cgi?id=26557
If you need anything more, don't hesitate to contact me.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug