Ignore custom fonts applied to pseudo elements #442

Merged
merged 1 commit into from Jan 3, 2013

1 participant

@mhoran

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
@mhoran

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

Details default The Travis build passed
@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
thoughtbot, inc. member
jferris added a note Jan 3, 2013

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@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