Title: [251508] trunk/Source
- Revision
- 251508
- Author
- mmaxfi...@apple.com
- Date
- 2019-10-23 16:14:05 -0700 (Wed, 23 Oct 2019)
Log Message
[iOS] Remove Hiragino Sans site-specific quirk for Yahoo Japan
https://bugs.webkit.org/show_bug.cgi?id=203345
Reviewed by Simon Fraser.
Source/WebCore:
This iOS-specific quirk made Yahoo Japan stop using the 800-weight
version of Hiragino Sans because it's too heavy. We were using the
800-weight because the site requests 700 but we didn't have a 700-
weight of Hiragino Sans. However, now in iOS 13 we do have a 700-
weight of Hiragino Sans, so we can just delete this quirk.
Also, it turns out that Yahoo Japan modified their content to no
longer hit this quirk anyway, so this patch has 0 behavior change.
Site specific quirks are untestable.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::fontRangesForFamily):
* page/Quirks.cpp:
(WebCore::Quirks::shouldLightenJapaneseBoldSansSerif const): Deleted.
* page/Quirks.h:
Source/WTF:
* wtf/Platform.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (251507 => 251508)
--- trunk/Source/WTF/ChangeLog 2019-10-23 23:13:43 UTC (rev 251507)
+++ trunk/Source/WTF/ChangeLog 2019-10-23 23:14:05 UTC (rev 251508)
@@ -1,3 +1,12 @@
+2019-10-23 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [iOS] Remove Hiragino Sans site-specific quirk for Yahoo Japan
+ https://bugs.webkit.org/show_bug.cgi?id=203345
+
+ Reviewed by Simon Fraser.
+
+ * wtf/Platform.h:
+
2019-10-22 Yusuke Suzuki <ysuz...@apple.com>
Make `JSGlobalObject*` threading change more stabilized by adding tests and assertions
Modified: trunk/Source/WTF/wtf/Platform.h (251507 => 251508)
--- trunk/Source/WTF/wtf/Platform.h 2019-10-23 23:13:43 UTC (rev 251507)
+++ trunk/Source/WTF/wtf/Platform.h 2019-10-23 23:14:05 UTC (rev 251508)
@@ -1645,10 +1645,6 @@
#define HAVE_DESIGN_SYSTEM_UI_FONTS 1
#endif
-#if (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || PLATFORM(WATCHOS) || PLATFORM(APPLETV)
-#define USE_HIRAGINO_SANS_WORKAROUND 1
-#endif
-
#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR))
#define HAVE_DEVICE_IDENTITY 1
#endif
Modified: trunk/Source/WebCore/ChangeLog (251507 => 251508)
--- trunk/Source/WebCore/ChangeLog 2019-10-23 23:13:43 UTC (rev 251507)
+++ trunk/Source/WebCore/ChangeLog 2019-10-23 23:14:05 UTC (rev 251508)
@@ -1,3 +1,27 @@
+2019-10-23 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ [iOS] Remove Hiragino Sans site-specific quirk for Yahoo Japan
+ https://bugs.webkit.org/show_bug.cgi?id=203345
+
+ Reviewed by Simon Fraser.
+
+ This iOS-specific quirk made Yahoo Japan stop using the 800-weight
+ version of Hiragino Sans because it's too heavy. We were using the
+ 800-weight because the site requests 700 but we didn't have a 700-
+ weight of Hiragino Sans. However, now in iOS 13 we do have a 700-
+ weight of Hiragino Sans, so we can just delete this quirk.
+
+ Also, it turns out that Yahoo Japan modified their content to no
+ longer hit this quirk anyway, so this patch has 0 behavior change.
+
+ Site specific quirks are untestable.
+
+ * css/CSSFontSelector.cpp:
+ (WebCore::CSSFontSelector::fontRangesForFamily):
+ * page/Quirks.cpp:
+ (WebCore::Quirks::shouldLightenJapaneseBoldSansSerif const): Deleted.
+ * page/Quirks.h:
+
2019-10-23 Chris Dumez <cdu...@apple.com>
Ignore document.open/write after the active parser has been aborted
Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (251507 => 251508)
--- trunk/Source/WebCore/css/CSSFontSelector.cpp 2019-10-23 23:13:43 UTC (rev 251507)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp 2019-10-23 23:14:05 UTC (rev 251508)
@@ -46,7 +46,6 @@
#include "Frame.h"
#include "FrameLoader.h"
#include "Logging.h"
-#include "Quirks.h"
#include "ResourceLoadObserver.h"
#include "RuntimeEnabledFeatures.h"
#include "Settings.h"
@@ -322,14 +321,8 @@
Optional<FontDescription> overrideFontDescription;
const FontDescription* fontDescriptionForLookup = &fontDescription;
auto resolveGenericFamily = [&]() {
- if (auto genericFamilyOptional = WebCore::resolveGenericFamily(m_document.get(), fontDescription, familyName)) {
- if (m_document && m_document->quirks().shouldLightenJapaneseBoldSansSerif() && familyForLookup == sansSerifFamily && fontDescription.weight() == boldWeightValue() && fontDescription.script() == USCRIPT_KATAKANA_OR_HIRAGANA) {
- overrideFontDescription = fontDescription;
- overrideFontDescription->setWeight(FontSelectionValue(600));
- fontDescriptionForLookup = &*overrideFontDescription;
- }
+ if (auto genericFamilyOptional = WebCore::resolveGenericFamily(m_document.get(), fontDescription, familyName))
familyForLookup = *genericFamilyOptional;
- }
};
if (resolveGenericFamilyFirst)
Modified: trunk/Source/WebCore/page/Quirks.cpp (251507 => 251508)
--- trunk/Source/WebCore/page/Quirks.cpp 2019-10-23 23:13:43 UTC (rev 251507)
+++ trunk/Source/WebCore/page/Quirks.cpp 2019-10-23 23:14:05 UTC (rev 251508)
@@ -457,22 +457,6 @@
#endif
}
-bool Quirks::shouldLightenJapaneseBoldSansSerif() const
-{
-#if USE(HIRAGINO_SANS_WORKAROUND)
- if (!needsQuirks())
- return false;
-
- // lang="ja" style="font: bold sans-serif;" content would naturally get HiraginoSans-W8 here, but that's visually
- // too bold. Instead, we should pick HiraginoSans-W6 instead.
- // FIXME: webkit.org/b/200047 Remove this quirk.
- auto host = m_document->topDocument().url().host();
- return equalLettersIgnoringASCIICase(host, "m.yahoo.co.jp");
-#else
- return false;
-#endif
-}
-
// FIXME(<rdar://problem/50394969>): Remove after desmos.com adopts inputmode="none".
bool Quirks::needsInputModeNoneImplicitly(const HTMLElement& element) const
{
Modified: trunk/Source/WebCore/page/Quirks.h (251507 => 251508)
--- trunk/Source/WebCore/page/Quirks.h 2019-10-23 23:13:43 UTC (rev 251507)
+++ trunk/Source/WebCore/page/Quirks.h 2019-10-23 23:14:05 UTC (rev 251508)
@@ -59,7 +59,6 @@
bool shouldDisablePointerEventsQuirk() const;
bool needsInputModeNoneImplicitly(const HTMLElement&) const;
bool needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand() const;
- bool shouldLightenJapaneseBoldSansSerif() const;
bool shouldDisableContentChangeObserverTouchEventAdjustment() const;
WEBCORE_EXPORT bool shouldDispatchSyntheticMouseEventsWhenModifyingSelection() const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes