Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Ignore custom fonts applied to pseudo elements #442

Merged
merged 1 commit into from Jan 3, 2013

Conversation

Projects
None yet
2 participants
Collaborator

mhoran commented Jan 1, 2013

WebPage::setUserStylesheet prevents Web Fonts from loading when styles
are applied directly to elements, however if the styles are applied to
pseudo elements, the override does not apply. This leads to crashes on
Mac OS X, likely due to https://bugs.webkit.org/show_bug.cgi?id=61031.

Fixes #181.

@mhoran mhoran Ignore custom fonts applied to pseudo elements
WebPage::setUserStylesheet prevents Web Fonts from loading when styles
are applied directly to elements, however if the styles are applied to
pseudo elements, the override does not apply. This leads to crashes on
Mac OS X, likely due to https://bugs.webkit.org/show_bug.cgi?id=61031.
11c596f
Collaborator

mhoran commented Jan 2, 2013

Updated to apply to all pseudo elements, not just before and after.

@mhoran mhoran merged commit 11c596f into thoughtbot:master Jan 3, 2013

1 check passed

default The Travis build passed
Details

@mhoran mhoran deleted the mhoran:fix-font-awesome branch Jan 3, 2013

@jferris jferris commented on the diff Jan 3, 2013

spec/driver_spec.rb
@@ -1326,6 +1332,38 @@ def make_the_server_go_away
SCRIPT
font_family.should == "Arial"
end
+
+ it "ignores custom fonts before an element" do
+ font_family = driver.evaluate_script(<<-SCRIPT)
@jferris

jferris Jan 3, 2013

Owner

There's some duplication in these examples. You could extract a helper method to get the computed style; I think the only variation between the examples is the pseudo-selector (before, after, etc).

@panozzaj panozzaj referenced this pull request Jan 8, 2013

Closed

mixed charset regression #444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment