Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KDE Libraries
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Unmaintained
KDE Libraries
Commits
fefb64c5
Commit
fefb64c5
authored
13 years ago
by
Maks Orlovich
Browse files
Options
Downloads
Patches
Plain Diff
Don't go through C++ wrappers here, they throw exceptions.
CCBUG: 262040
parent
34a28720
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
khtml/ecma/kjs_range.cpp
+15
-6
15 additions, 6 deletions
khtml/ecma/kjs_range.cpp
with
15 additions
and
6 deletions
khtml/ecma/kjs_range.cpp
+
15
−
6
View file @
fefb64c5
...
...
@@ -369,11 +369,15 @@ JSValue* DOMSelectionProtoFunc::callAsFunction(ExecState *exec, JSObject *thisOb
break
;
}
case
DOMSelection
::
DeleteFromDocument
:
case
DOMSelection
::
DeleteFromDocument
:
{
self
->
m_document
->
part
()
->
setCaret
(
DOM
::
Selection
());
sel
.
toRange
().
deleteContents
();
DOM
::
Range
r
=
sel
.
toRange
();
DOM
::
RangeImpl
*
ri
=
r
.
handle
();
if
(
ri
)
{
ri
->
deleteContents
(
exception
);
}
break
;
}
case
DOMSelection
::
GetRangeAt
:
{
int
i
=
args
[
0
]
->
toInt32
(
exec
);
...
...
@@ -441,10 +445,15 @@ JSValue* DOMSelectionProtoFunc::callAsFunction(ExecState *exec, JSObject *thisOb
break
;
case
DOMSelection
::
ToString
:
if
(
sel
.
isEmpty
()
||
sel
.
isCollapsed
())
if
(
sel
.
isEmpty
()
||
sel
.
isCollapsed
())
{
return
jsString
(
UString
());
else
return
jsString
(
sel
.
toRange
().
toString
());
}
else
{
DOM
::
Range
r
=
sel
.
toRange
();
DOM
::
RangeImpl
*
ri
=
r
.
handle
();
if
(
ri
)
{
return
jsString
(
ri
->
toString
(
exception
));
}
}
break
;
}
return
jsUndefined
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment