Reviewed by Mitz.
- fix <rdar://problem/
5726016> REGRESSION: Xcode News window renders
incorrectly due to visibility fix
Added an Xcode-specific quirk.
* WebCore.base.exp: Added export for new Settings function.
* css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::setProperty): Here's the crazy quirk.
If you try to change the visibilty on a node with the class name tab_content,
instead it will use display:none.
* page/Settings.cpp:
(WebCore::Settings::Settings): Initialize m_needsXcodeVisibilityQuirk. Also
initialize m_fontRenderingMode! This seems like it was a bug before, but we
probably were getting lucky and always getting 0 on Windows, which is the
only place the setting matters.
(WebCore::Settings::setNeedsXcodeVisibilityQuirk): Added.
* page/Settings.h:
(WebCore::Settings::needsXcodeVisibilityQuirk): Added.
WebKit/mac:
Reviewed by Mitz.
- fix <rdar://problem/
5726016> REGRESSION: Xcode News window renders
incorrectly due to visibility fix
Added an Xcode-specific quirk.
* Misc/WebKitVersionChecks.h: Added a constant for the "linked on or after"
part of the check.
* WebView/WebView.mm:
(-[WebView _needsXcodeVisibilityQuirk]): Added.
(-[WebView _preferencesChangedNotification:]): Added a call to
setNeedsXcodeVisibilityQuirk based on _needsXcodeVisibilityQuirk.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30156
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2008-02-11 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz.
+
+ - fix <rdar://problem/5726016> REGRESSION: Xcode News window renders
+ incorrectly due to visibility fix
+
+ Added an Xcode-specific quirk.
+
+ * WebCore.base.exp: Added export for new Settings function.
+ * css/CSSMutableStyleDeclaration.cpp:
+ (WebCore::CSSMutableStyleDeclaration::setProperty): Here's the crazy quirk.
+ If you try to change the visibilty on a node with the class name tab_content,
+ instead it will use display:none.
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings): Initialize m_needsXcodeVisibilityQuirk. Also
+ initialize m_fontRenderingMode! This seems like it was a bug before, but we
+ probably were getting lucky and always getting 0 on Windows, which is the
+ only place the setting matters.
+ (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Added.
+ * page/Settings.h:
+ (WebCore::Settings::needsXcodeVisibilityQuirk): Added.
+
2008-02-11 Timothy Hatcher <timothy@apple.com>
Reviewed by Brady Eidson.
__ZN7WebCore8Settings27setFTPDirectoryTemplatePathERKNS_6StringE
__ZN7WebCore8Settings27setLoadsImagesAutomaticallyEb
__ZN7WebCore8Settings28setForceFTPDirectoryListingsEb
+__ZN7WebCore8Settings28setNeedsXcodeVisibilityQuirkEb
__ZN7WebCore8Settings29setAuthorAndUserStylesEnabledEb
__ZN7WebCore8Settings31setShrinksStandaloneImagesToFitEb
__ZN7WebCore8Settings32setNeedsAdobeFrameReloadingQuirkEb
__ZN7WebCore9pageCacheEv
__ZN7WebCoreeqERKNS_19ResourceRequestBaseES2_
__ZN7WebCoreeqERKNS_4KURLES2_
-__ZNK7WebCore5Frame37baseWritingDirectionForSelectionStartEv
__ZNK7WebCore11CachedImage5imageEv
__ZNK7WebCore11ContextMenu19platformDescriptionEv
__ZNK7WebCore11FrameLoader10isCompleteEv
__ZNK7WebCore5Frame30applyEditingStyleToBodyElementEv
__ZNK7WebCore5Frame31fontAttributesForSelectionStartEv
__ZNK7WebCore5Frame33removeEditingStyleFromBodyElementEv
+__ZNK7WebCore5Frame37baseWritingDirectionForSelectionStartEv
__ZNK7WebCore5Frame4pageEv
__ZNK7WebCore5Frame4treeEv
__ZNK7WebCore5Frame4viewEv
-/**
- * This file is part of the DOM implementation for KDE.
- *
+/*
* (C) 1999-2003 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
#include "CSSProperty.h"
#include "CSSPropertyNames.h"
#include "CSSStyleSheet.h"
+#include "CSSValueKeywords.h"
#include "CSSValueList.h"
#include "Document.h"
#include "ExceptionCode.h"
+#include "Settings.h"
#include "StyledElement.h"
using namespace std;
return ec == 0;
}
+ // Quirk for Xcode 3.0 initial help content. It relied on our incorrect handling of visibility
+ // of elements nested inside visibility: hiddent content.
+ if (propertyID == CSS_PROP_VISIBILITY && m_node && m_node->isHTMLElement() && static_cast<HTMLElement*>(m_node)->className() == "tab_content") {
+ if (Settings* settings = m_node->document()->settings()) {
+ if (settings->needsXcodeVisibilityQuirk()) {
+ setProperty(CSS_PROP_VISIBILITY, CSS_VAL_VISIBLE, false, notifyChanged);
+ if (value == "hidden")
+ setProperty(CSS_PROP_DISPLAY, CSS_VAL_NONE, false, notifyChanged);
+ else
+ removeProperty(CSS_PROP_DISPLAY, ec);
+ return true;
+ }
+ }
+ }
+
// When replacing an existing property value, this moves the property to the end of the list.
// Firefox preserves the position, and MSIE moves the property to the beginning.
CSSParser parser(useStrictParsing());
/*
- * Copyright (C) 2006, 2007 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
, m_forceFTPDirectoryListings(false)
, m_developerExtrasEnabled(false)
, m_authorAndUserStylesEnabled(true)
+ , m_fontRenderingMode(0)
+ , m_needsXcodeVisibilityQuirk(false)
{
// A Frame may not have been created yet, so we initialize the AtomicString
// hash before trying to use it.
return static_cast<FontRenderingMode>(m_fontRenderingMode);
}
+void Settings::setNeedsXcodeVisibilityQuirk(bool needsQuirk)
+{
+ m_needsXcodeVisibilityQuirk = needsQuirk;
+}
+
} // namespace WebCore
/*
- * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2003, 2006, 2007, 2008 Apple Inc. All rights reserved.
* (C) 2006 Graham Dennis (graham.dennis@gmail.com)
*
* Redistribution and use in source and binary forms, with or without
#define Settings_h
#include "AtomicString.h"
-#include "KURL.h"
#include "FontDescription.h"
+#include "KURL.h"
namespace WebCore {
EditableLinkNeverLive
};
- class Settings
- {
+ class Settings {
public:
Settings(Page*);
void setFontRenderingMode(FontRenderingMode mode);
FontRenderingMode fontRenderingMode() const;
+ void setNeedsXcodeVisibilityQuirk(bool);
+ bool needsXcodeVisibilityQuirk() const { return m_needsXcodeVisibilityQuirk; }
+
private:
Page* m_page;
bool m_developerExtrasEnabled : 1;
bool m_authorAndUserStylesEnabled : 1;
unsigned m_fontRenderingMode : 1;
+ bool m_needsXcodeVisibilityQuirk : 1;
};
} // namespace WebCore
+2008-02-11 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz.
+
+ - fix <rdar://problem/5726016> REGRESSION: Xcode News window renders
+ incorrectly due to visibility fix
+
+ Added an Xcode-specific quirk.
+
+ * Misc/WebKitVersionChecks.h: Added a constant for the "linked on or after"
+ part of the check.
+
+ * WebView/WebView.mm:
+ (-[WebView _needsXcodeVisibilityQuirk]): Added.
+ (-[WebView _preferencesChangedNotification:]): Added a call to
+ setNeedsXcodeVisibilityQuirk based on _needsXcodeVisibilityQuirk.
+
2008-02-10 Darin Adler <darin@apple.com>
- fix http://bugs.webkit.org/show_bug.cgi?id=17274
/*
- * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* Version numbers are based on the 'current library version' specified in the WebKit build rules.
- All of these methods return or take version numbers with each part shifted to the left 2 bytes.
- For example the version 1.2.3 is returned as 0x00010203 and version 200.3.5 is returned as 0x00C80305
- A version of -1 is returned if the main executable did not link against WebKit (should never happen). */
+/*
+ Version numbers are based on the 'current library version' specified in the WebKit build rules.
+ All of these methods return or take version numbers with each part shifted to the left 2 bytes.
+ For example the version 1.2.3 is returned as 0x00010203 and version 200.3.5 is returned as 0x00C80305
+ A version of -1 is returned if the main executable did not link against WebKit (should never happen).
-/* Please use the current WebKit version number, available in WebKit/Configurations/Version.xcconfig,
- when adding a new version constant. */
+ Please use the current WebKit version number, available in WebKit/Configurations/Version.xcconfig,
+ when adding a new version constant.
+*/
#define WEBKIT_FIRST_VERSION_WITH_3_0_CONTEXT_MENU_TAGS 0x020A0000 // 522.0.0
#define WEBKIT_FIRST_VERSION_WITH_LOCAL_RESOURCE_SECURITY_RESTRICTION 0x020A0000 // 522.0.0
#define WEBKIT_FIRST_VERSION_WITH_CACHE_MODEL_API 0x020B0500 // 523.5.0
#define WEBKIT_FIRST_VERSION_WITHOUT_JAVASCRIPT_RETURN_QUIRK 0x020D0100 // 525.1.0
#define WEBKIT_FIRST_VERSION_WITH_IE_COMPATIBLE_KEYBOARD_EVENT_DISPATCH 0x020D0100 // 525.1.0
+#define WEBKIT_FIRST_VERSION_WITHOUT_XCODE_QUIRK 0x020D0700 // 525.7.0
#ifdef __cplusplus
extern "C" {
return needsQuirks;
needsQuirks = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_IE_COMPATIBLE_KEYBOARD_EVENT_DISPATCH)
- && ![[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.Safari"];
+ && ![[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.Safari"];
checked = YES;
return needsQuirks;
}
+- (BOOL)_needsXcodeVisibilityQuirk
+{
+ static BOOL checked = NO;
+ static BOOL needsQuirk = NO;
+
+ if (checked)
+ return needsQuirk;
+
+ needsQuirk = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_XCODE_QUIRK)
+ && [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.Xcode"];
+ checked = YES;
+
+ return needsQuirk;
+}
+
- (void)_preferencesChangedNotification:(NSNotification *)notification
{
WebPreferences *preferences = (WebPreferences *)[notification object];
settings->setUserStyleSheetLocation([NSURL URLWithString:@""]);
settings->setNeedsAdobeFrameReloadingQuirk([self _needsAdobeFrameReloadingQuirk]);
settings->setNeedsKeyboardEventDisambiguationQuirks([self _needsKeyboardEventDisambiguationQuirks]);
+ settings->setNeedsXcodeVisibilityQuirk([self _needsXcodeVisibilityQuirk]);
}
static inline IMP getMethod(id o, SEL s)