Split underline, strikeout, squiggly annotions div into multiple divs
* Follow up of #12505 * Fix bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1679696
This commit is contained in:
parent
43550be484
commit
830070ca41
@ -1462,6 +1462,7 @@ class UnderlineAnnotationElement extends AnnotationElement {
|
|||||||
parameters.data.contents
|
parameters.data.contents
|
||||||
);
|
);
|
||||||
super(parameters, isRenderable, /* ignoreBorder = */ true);
|
super(parameters, isRenderable, /* ignoreBorder = */ true);
|
||||||
|
this.quadrilaterals = this._createQuadrilaterals(/* ignoreBorder = */ true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1472,11 +1473,18 @@ class UnderlineAnnotationElement extends AnnotationElement {
|
|||||||
* @returns {HTMLSectionElement}
|
* @returns {HTMLSectionElement}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
this.container.className = "underlineAnnotation";
|
|
||||||
|
|
||||||
if (!this.data.hasPopup) {
|
if (!this.data.hasPopup) {
|
||||||
this._createPopup(null, this.data);
|
this._createPopup(null, this.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.quadrilaterals) {
|
||||||
|
this.quadrilaterals.forEach(quadrilateral => {
|
||||||
|
quadrilateral.className = "underlineAnnotation";
|
||||||
|
});
|
||||||
|
return this.quadrilaterals;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.container.className = "underlineAnnotation";
|
||||||
return this.container;
|
return this.container;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1489,6 +1497,7 @@ class SquigglyAnnotationElement extends AnnotationElement {
|
|||||||
parameters.data.contents
|
parameters.data.contents
|
||||||
);
|
);
|
||||||
super(parameters, isRenderable, /* ignoreBorder = */ true);
|
super(parameters, isRenderable, /* ignoreBorder = */ true);
|
||||||
|
this.quadrilaterals = this._createQuadrilaterals(/* ignoreBorder = */ true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1499,11 +1508,18 @@ class SquigglyAnnotationElement extends AnnotationElement {
|
|||||||
* @returns {HTMLSectionElement}
|
* @returns {HTMLSectionElement}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
this.container.className = "squigglyAnnotation";
|
|
||||||
|
|
||||||
if (!this.data.hasPopup) {
|
if (!this.data.hasPopup) {
|
||||||
this._createPopup(null, this.data);
|
this._createPopup(null, this.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.quadrilaterals) {
|
||||||
|
this.quadrilaterals.forEach(quadrilateral => {
|
||||||
|
quadrilateral.className = "squigglyAnnotation";
|
||||||
|
});
|
||||||
|
return this.quadrilaterals;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.container.className = "squigglyAnnotation";
|
||||||
return this.container;
|
return this.container;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1516,6 +1532,7 @@ class StrikeOutAnnotationElement extends AnnotationElement {
|
|||||||
parameters.data.contents
|
parameters.data.contents
|
||||||
);
|
);
|
||||||
super(parameters, isRenderable, /* ignoreBorder = */ true);
|
super(parameters, isRenderable, /* ignoreBorder = */ true);
|
||||||
|
this.quadrilaterals = this._createQuadrilaterals(/* ignoreBorder = */ true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1526,11 +1543,18 @@ class StrikeOutAnnotationElement extends AnnotationElement {
|
|||||||
* @returns {HTMLSectionElement}
|
* @returns {HTMLSectionElement}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
this.container.className = "strikeoutAnnotation";
|
|
||||||
|
|
||||||
if (!this.data.hasPopup) {
|
if (!this.data.hasPopup) {
|
||||||
this._createPopup(null, this.data);
|
this._createPopup(null, this.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.quadrilaterals) {
|
||||||
|
this.quadrilaterals.forEach(quadrilateral => {
|
||||||
|
quadrilateral.className = "strikeoutAnnotation";
|
||||||
|
});
|
||||||
|
return this.quadrilaterals;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.container.className = "strikeoutAnnotation";
|
||||||
return this.container;
|
return this.container;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user