(Element e)
| 2763 | } |
| 2764 | |
| 2765 | static boolean hasBorder(Element e) { |
| 2766 | if ("true".equals(e.attr("x-border"))) |
| 2767 | return true; |
| 2768 | |
| 2769 | // https://groups.google.com/g/mozilla.support.thunderbird/c/rwLNk3MU3Gs?pli=1 |
| 2770 | if ("cite".equals(e.attr("type"))) |
| 2771 | return true; |
| 2772 | |
| 2773 | String style = e.attr("style"); |
| 2774 | String[] params = style.split(";"); |
| 2775 | for (String param : params) { |
| 2776 | int colon = param.indexOf(':'); |
| 2777 | if (colon < 0) |
| 2778 | continue; |
| 2779 | String key = param.substring(0, colon).trim().toLowerCase(Locale.ROOT); |
| 2780 | String value = param.substring(colon + 1); |
| 2781 | if ("border-left".equals(key) || "border-right".equals(key)) { |
| 2782 | Float border = getFontSize(value.trim().split("\\s+")[0], 1.0f); |
| 2783 | if (border != null && border > 0) |
| 2784 | return true; |
| 2785 | } |
| 2786 | } |
| 2787 | |
| 2788 | return false; |
| 2789 | } |
| 2790 | |
| 2791 | static boolean isStyled(Document d) { |
| 2792 | ObjectHolder<Boolean> result = new ObjectHolder<>(false); |
no test coverage detected