mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-09-20 20:10:41 +02:00
cursor:none and content:none
This commit is contained in:
parent
70a63e3fce
commit
a67087fae8
@ -5210,7 +5210,8 @@ PRBool CSSParserImpl::ParseContent(nsresult& aErrorCode)
|
||||
// XXX Rewrite to make it look more like ParseCursor or ParseCounterData?
|
||||
nsCSSValue value;
|
||||
if (ParseVariant(aErrorCode, value,
|
||||
VARIANT_CONTENT | VARIANT_INHERIT | VARIANT_NORMAL,
|
||||
VARIANT_CONTENT | VARIANT_INHERIT | VARIANT_NORMAL |
|
||||
VARIANT_NONE,
|
||||
nsCSSProps::kContentKTable)) {
|
||||
nsCSSValueList* listHead = new nsCSSValueList();
|
||||
nsCSSValueList* list = listHead;
|
||||
@ -5229,7 +5230,8 @@ PRBool CSSParserImpl::ParseContent(nsresult& aErrorCode)
|
||||
}
|
||||
if (eCSSUnit_Inherit == value.GetUnit() ||
|
||||
eCSSUnit_Initial == value.GetUnit() ||
|
||||
eCSSUnit_Normal == value.GetUnit()) {
|
||||
eCSSUnit_Normal == value.GetUnit() ||
|
||||
eCSSUnit_None == value.GetUnit()) {
|
||||
// This only matters the first time through the loop.
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
@ -4186,14 +4186,15 @@ nsRuleNode::ComputeContentData(nsStyleStruct* aStartStruct,
|
||||
parentContent = parentContext->GetStyleContent();
|
||||
PRBool inherited = aInherited;
|
||||
|
||||
// content: [string, url, counter, attr, enum]+, normal, inherit
|
||||
// content: [string, url, counter, attr, enum]+, normal, none, inherit
|
||||
PRUint32 count;
|
||||
nsAutoString buffer;
|
||||
nsCSSValueList* contentValue = contentData.mContent;
|
||||
if (contentValue) {
|
||||
if (eCSSUnit_Normal == contentValue->mValue.GetUnit() ||
|
||||
eCSSUnit_None == contentValue->mValue.GetUnit() ||
|
||||
eCSSUnit_Initial == contentValue->mValue.GetUnit()) {
|
||||
// "normal" and "initial" both mean no content
|
||||
// "normal", "none", and "initial" all mean no content
|
||||
content->AllocateContents(0);
|
||||
}
|
||||
else if (eCSSUnit_Inherit == contentValue->mValue.GetUnit()) {
|
||||
|
@ -2,3 +2,11 @@
|
||||
#bug346690 {
|
||||
cursor: none;
|
||||
}
|
||||
|
||||
.bug378535:before {
|
||||
content: "Read this - ";
|
||||
}
|
||||
|
||||
.bug378535#hometown:before {
|
||||
content: none;
|
||||
}
|
@ -14,5 +14,10 @@
|
||||
<h3>cursor:none</h3>
|
||||
<img src="test-image.gif" id="bug346690">
|
||||
<hr>
|
||||
<h2>content:none (bug 378535)</h2>
|
||||
<p class="bug378535">My name is Donald</p>
|
||||
<p class="bug378535" id="hometown">I live in Ducksburg</p>
|
||||
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
@ -2777,7 +2777,9 @@ NS_METHOD nsWindow::SetCursor(nsCursor aCursor)
|
||||
case eCursor_ew_resize:
|
||||
newCursor = ::LoadCursor(NULL, IDC_SIZEWE);
|
||||
break;
|
||||
|
||||
case eCursor_none:
|
||||
newCursor = ::LoadCursor(nsToolkit::mDllInstance, MAKEINTRESOURCE(IDC_NONE));
|
||||
break;
|
||||
default:
|
||||
NS_ERROR("Invalid cursor type");
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user