WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
111663
Make RuleData support up to 8191 selectors
https://bugs.webkit.org/show_bug.cgi?id=111663
Summary
Make RuleData support up to 8191 selectors
Philippe Liard
Reported
2013-03-06 19:04:47 PST
r125294
made RuleData consume less memory by replacing a pointer with an index encoded on 12 bits. This unfortunately breaks Chrome for Android when it is used with Adblock plus which injects a lot of CSS. This leads to blank pages on page load and is caused by an integer overflow when |m_selectorIndex| (encoded on 12 bits) is set.
Attachments
Patch
(1.82 KB, patch)
2013-03-06 19:24 PST
,
Philippe Liard
no flags
Details
Formatted Diff
Diff
Patch
(1.86 KB, patch)
2013-03-06 20:02 PST
,
Philippe Liard
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Andreas Kling
Comment 1
2013-03-06 19:11:21 PST
You can probably steal a bit from RuleData::m_position without causing much trouble.
Philippe Liard
Comment 2
2013-03-06 19:20:52 PST
Yes, I'm uploading a patch doing this right now. Thanks for the quick response. The other approach could also be to use the least significant bit of |m_rule| which is a pointer in case |m_position| cannot be shrunk (should be fine IMO).
Philippe Liard
Comment 3
2013-03-06 19:24:41 PST
Created
attachment 191896
[details]
Patch
Philippe Liard
Comment 4
2013-03-06 19:25:40 PST
I've just uploaded a patch. FYI, here is the corresponding Chromium bug:
https://code.google.com/p/chromium/issues/detail?id=172276
.
Andreas Kling
Comment 5
2013-03-06 19:28:49 PST
Comment on
attachment 191896
[details]
Patch r=me We should look into the calculation of m_specificity at some point, it's very likely that it can be compressed to a much smaller value that won't have us scrambling for single bits like this.
Philippe Liard
Comment 6
2013-03-06 19:33:00 PST
Thanks guys, that was quick! I agree that things can probably be improved here although I'm not familiar with this code at all.
WebKit Review Bot
Comment 7
2013-03-06 19:50:07 PST
Comment on
attachment 191896
[details]
Patch Rejecting
attachment 191896
[details]
from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', '--bot-id=gce-cq-01', 'validate-changelog', '--non-interactive', 191896, '--port=chromium-xvfb']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue /mnt/git/webkit-commit-queue/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output:
http://webkit-commit-queue.appspot.com/results/17064151
Philippe Liard
Comment 8
2013-03-06 20:02:33 PST
Created
attachment 191902
[details]
Patch
Philippe Liard
Comment 9
2013-03-06 20:03:56 PST
Sorry guys for the missing 'Reviewed by' line. I have just uploaded an updated patch.
WebKit Review Bot
Comment 10
2013-03-06 20:56:46 PST
Comment on
attachment 191902
[details]
Patch Clearing flags on attachment: 191902 Committed
r145034
: <
http://trac.webkit.org/changeset/145034
>
WebKit Review Bot
Comment 11
2013-03-06 20:56:50 PST
All reviewed patches have been landed. Closing bug.
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