Skip to content

Commit 48f4b4b

Browse files
author
Evgeniy Prudnikov
committed
Review orphaned TODOs in pdfHTML (5)
DEVSIX-6981
1 parent ca253c6 commit 48f4b4b

File tree

4 files changed

+3
-20
lines changed

4 files changed

+3
-20
lines changed

src/main/java/com/itextpdf/html2pdf/attach/impl/DefaultHtmlProcessor.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -431,20 +431,6 @@ private ITagWorker processRunningElement(ITagWorker tagWorker, IElementNode elem
431431
return tagWorker;
432432
}
433433

434-
// TODO For now the whole ITagWorker of the running element is preserved inside RunningElementContainer
435-
// for the sake of future processing in page margin box. This is somewhat a workaround and storing
436-
// tag workers might be easily seen as something undesirable, however at least for now it seems to be
437-
// most suitable solution because:
438-
// - in any case, processing of the whole running element with it's children should be done in
439-
// "normal flow", i.e. in DefaultHtmlProcessor, based on the spec that says that element should be
440-
// processed as it was still in the same position in DOM, but visually as if "display: none" was set.
441-
// - the whole process would need to be repeated in PageContextProcessor again, so it's a double work;
442-
// also currently there is still no convenient way for unifying the processing here and in
443-
// PageContextProcessor, currently only running elements require processing of the whole hierarchy of
444-
// children outside of the default DOM processing and also it's unclear whether this code would be suitable
445-
// for the simplified approach of processing all other children of page margin boxes.
446-
// - ITagWorker is only publicly passed to the constructor, but there is no exposed way to get it out of
447-
// RunningElementContainer, so it would be fairly easy to change this approach in future if needed.
448434
RunningElementContainer runningElementContainer = new RunningElementContainer(element, tagWorker);
449435
context.getCssContext().getRunningManager().addRunningElement(runningElemName, runningElementContainer);
450436

@@ -455,7 +441,6 @@ private ITagWorker processRunningElement(ITagWorker tagWorker, IElementNode elem
455441
* Adds @font-face fonts to the FontProvider.
456442
*/
457443
private void addFontFaceFonts() {
458-
//TODO Shall we add getFonts() to ICssResolver?
459444
if (cssResolver instanceof DefaultCssResolver) {
460445
for (CssFontFaceRule fontFace : ((DefaultCssResolver) cssResolver).getFonts()) {
461446
boolean findSupportedSrc = false;

src/main/java/com/itextpdf/html2pdf/attach/util/WaitingInlineElementsHelper.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,7 @@ private Paragraph createLeavesContainer() {
237237
}
238238
}
239239
if (runningElementsOnly) {
240-
// TODO this might be avoided in future if we will come up with removing of completely empty
241-
// (both in terms of content and possible properties like background and borders) tags from
242-
// logical structure of resultant PDF documents
240+
// TODO DEVSIX-7008 Remove completely empty tags from logical structure of resultant PDF documents
243241
p.getAccessibilityProperties().setRole(StandardRoles.ARTIFACT);
244242
}
245243
return p;

src/main/java/com/itextpdf/html2pdf/css/apply/impl/PageMarginBoxCssApplier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public void apply(ProcessorContext context, IStylesContainer stylesContainer, IT
131131
marginBox.setProperty(Property.OVERFLOW_Y, OverflowPropertyValue.VISIBLE);
132132
}
133133

134-
// TODO outlines are currently not supported for page margin boxes, because of the outlines handling specificity (they are handled on renderer's parent level)
134+
//TODO DEVSIX-7024 Support outlines for page margin boxes
135135
OutlineApplierUtil.applyOutlines(boxStyles, context, marginBox);
136136

137137
marginBox.setProperty(Property.FONT_PROVIDER, context.getFontProvider());

src/main/java/com/itextpdf/html2pdf/css/apply/impl/SpanTagCssApplier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void apply(ProcessorContext context, IStylesContainer stylesContainer, IT
8181
Map<String, String> cssStyles = stylesContainer.getStyles();
8282
for (IPropertyContainer child : spanTagWorker.getOwnLeafElements()) {
8383
// Workaround for form fields so that SpanTagCssApplier does not apply its font-size to the child.
84-
// Form fields have their own CSS applier // TODO remove when form fields are not leaf elements anymore
84+
// Form fields have their own CSS applier
8585
if (!(child instanceof IFormField)) {
8686
applyChildElementStyles(child, cssStyles, context, stylesContainer);
8787
}

0 commit comments

Comments
 (0)