Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Unmaintained
KDE Libraries
Commits
b201d93f
Commit
b201d93f
authored
Jul 03, 2014
by
Andrea Iacovitti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove as well the shorthand property itself from the list.
BUG: 337008 FIXED-IN: 4.13.3
parent
e2bd8eb5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
12 deletions
+19
-12
khtml/css/css_renderstyledeclarationimpl.cpp
khtml/css/css_renderstyledeclarationimpl.cpp
+2
-1
khtml/css/css_renderstyledeclarationimpl.h
khtml/css/css_renderstyledeclarationimpl.h
+1
-1
khtml/css/css_valueimpl.cpp
khtml/css/css_valueimpl.cpp
+15
-9
khtml/css/css_valueimpl.h
khtml/css/css_valueimpl.h
+1
-1
No files found.
khtml/css/css_renderstyledeclarationimpl.cpp
View file @
b201d93f
...
...
@@ -1253,9 +1253,10 @@ void RenderStyleDeclarationImpl::removeProperty(int, DOM::DOMString*)
// ### emit error since we're read-only
}
void
RenderStyleDeclarationImpl
::
removePropertiesInSet
(
const
int
*
,
unsigned
)
bool
RenderStyleDeclarationImpl
::
removePropertiesInSet
(
const
int
*
,
unsigned
)
{
// ### emit error since we're read-only
return
false
;
}
bool
RenderStyleDeclarationImpl
::
setProperty
(
int
,
const
DOM
::
DOMString
&
,
bool
,
int
&
ec
)
...
...
khtml/css/css_renderstyledeclarationimpl.h
View file @
b201d93f
...
...
@@ -52,7 +52,7 @@ public:
unsigned
long
length
()
const
;
virtual
void
removeProperty
(
int
propertyID
,
DOM
::
DOMString
*
old
=
0
);
virtual
void
removePropertiesInSet
(
const
int
*
set
,
unsigned
length
);
virtual
bool
removePropertiesInSet
(
const
int
*
set
,
unsigned
length
);
virtual
bool
isPropertyImplicit
(
int
/*propertyID*/
)
const
{
return
false
;
}
bool
setProperty
(
int
propertyId
,
const
DOM
::
DOMString
&
value
,
bool
important
,
int
&
ec
);
bool
setProperty
(
int
propertyId
,
const
DOM
::
DOMString
&
value
,
bool
important
=
false
);
...
...
khtml/css/css_valueimpl.cpp
View file @
b201d93f
...
...
@@ -644,23 +644,25 @@ static void initShorthandMap(QHash<int, PropertyLonghand>& shorthandMap)
// -------------------------------------------
void
CSSStyleDeclarationImpl
::
removeProperty
(
int
propertyID
,
DOM
::
DOMString
*
old
)
void
CSSStyleDeclarationImpl
::
removeProperty
(
int
propertyID
,
DOM
::
DOMString
*
old
)
{
if
(
!
m_lstValues
)
return
;
bool
changed
=
false
;
static
QHash
<
int
,
PropertyLonghand
>
shorthandMap
;
if
(
shorthandMap
.
isEmpty
())
initShorthandMap
(
shorthandMap
);
PropertyLonghand
longhand
=
shorthandMap
.
value
(
propertyID
);
if
(
longhand
.
length
())
{
removePropertiesInSet
(
longhand
.
properties
(),
longhand
.
length
());
// FIXME: Return an equivalent shorthand when possible.
return
;
// Remove shorthand's longhand subproperties
changed
=
removePropertiesInSet
(
longhand
.
properties
(),
longhand
.
length
());
}
// FIXME: Return an equivalent shorthand when possible.
QMutableListIterator
<
CSSProperty
*>
lstValuesIt
(
*
m_lstValues
);
CSSProperty
*
current
;
lstValuesIt
.
toBack
();
...
...
@@ -671,13 +673,17 @@ void CSSStyleDeclarationImpl::removeProperty(int propertyID,
*
old
=
current
->
value
()
->
cssText
();
delete
lstValuesIt
.
value
();
lstValuesIt
.
remove
();
setC
hanged
()
;
c
hanged
=
true
;
break
;
}
}
if
(
changed
)
{
setChanged
();
}
}
void
CSSStyleDeclarationImpl
::
removePropertiesInSet
(
const
int
*
set
,
unsigned
length
)
bool
CSSStyleDeclarationImpl
::
removePropertiesInSet
(
const
int
*
set
,
unsigned
length
)
{
bool
changed
=
false
;
for
(
unsigned
i
=
0
;
i
<
length
;
i
++
)
{
...
...
@@ -694,8 +700,8 @@ void CSSStyleDeclarationImpl::removePropertiesInSet(const int* set, unsigned len
}
}
}
if
(
changed
)
setC
hanged
()
;
return
c
hanged
;
}
void
CSSStyleDeclarationImpl
::
setChanged
()
...
...
khtml/css/css_valueimpl.h
View file @
b201d93f
...
...
@@ -57,7 +57,7 @@ public:
virtual
unsigned
long
length
()
const
;
CSSRuleImpl
*
parentRule
()
const
;
virtual
void
removeProperty
(
int
propertyID
,
DOM
::
DOMString
*
old
=
0
);
virtual
void
removePropertiesInSet
(
const
int
*
set
,
unsigned
length
);
virtual
bool
removePropertiesInSet
(
const
int
*
set
,
unsigned
length
);
virtual
bool
setProperty
(
int
propertyId
,
const
DOM
::
DOMString
&
value
,
bool
important
,
int
&
ec
);
virtual
bool
setProperty
(
int
propertyId
,
const
DOM
::
DOMString
&
value
,
bool
important
=
false
);
virtual
void
setProperty
(
int
propertyId
,
int
value
,
bool
important
=
false
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment