(CssDeclaration declaration)
| 262 | } |
| 263 | |
| 264 | @Override |
| 265 | public void declaration(CssDeclaration declaration) |
| 266 | { |
| 267 | registerURIs(declaration.getComponents(), declaration.getLocation().getLine(), |
| 268 | declaration.getLocation().getColumn()); |
| 269 | |
| 270 | String propertyName = declaration.getName().get(); |
| 271 | if (propertyName == null) |
| 272 | { |
| 273 | return; |
| 274 | } |
| 275 | |
| 276 | if (propertyName.equals("position")) |
| 277 | { |
| 278 | CssConstruct cns = declaration.getComponents().get(0); |
| 279 | if (cns != null) |
| 280 | { |
| 281 | String value = cns.toCssString(); |
| 282 | if (value != null && value.equalsIgnoreCase("fixed")) |
| 283 | { |
| 284 | report.message(MessageId.CSS_006, getCorrectedEPUBLocation(declaration)); |
| 285 | } |
| 286 | } |
| 287 | } |
| 288 | if (version == EPUBVersion.VERSION_3) |
| 289 | { |
| 290 | if (propertyName.equals("direction") || propertyName.equals("unicode-bidi")) |
| 291 | { |
| 292 | report.message(MessageId.CSS_001, getCorrectedEPUBLocation(declaration), propertyName); |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | if (inFontFace) |
| 297 | { |
| 298 | hasFontFaceDeclarations = true; |
| 299 | |
| 300 | // collect for info |
| 301 | if (propertyName.equals("font-family")) |
| 302 | { |
| 303 | CssConstruct cc = declaration.getComponents().get(0); |
| 304 | if (cc != null) |
| 305 | { |
| 306 | fontFamily = SPACE_AND_QUOTES.trimFrom(cc.toCssString()); |
| 307 | } |
| 308 | } |
| 309 | else if (propertyName.equals("font-style")) |
| 310 | { |
| 311 | CssConstruct cc = declaration.getComponents().get(0); |
| 312 | fontStyle = cc.toCssString(); |
| 313 | } |
| 314 | else if (propertyName.equals("font-weight")) |
| 315 | { |
| 316 | CssConstruct cc = declaration.getComponents().get(0); |
| 317 | fontWeight = cc.toCssString(); |
| 318 | } |
| 319 | else if (propertyName.equals("src")) |
| 320 | { |
| 321 | for (CssConstruct construct : declaration.getComponents()) |
nothing calls this directly
no test coverage detected