OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 2 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
3 * Copyright (C) 2007 Apple Inc. | 3 * Copyright (C) 2007 Apple Inc. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 graphicsContext.addURLTargetAtPoint(entry.key, point); | 292 graphicsContext.addURLTargetAtPoint(entry.key, point); |
293 } | 293 } |
294 } | 294 } |
295 | 295 |
296 String PrintContext::pageProperty(LocalFrame* frame, const char* propertyName, i
nt pageNumber) | 296 String PrintContext::pageProperty(LocalFrame* frame, const char* propertyName, i
nt pageNumber) |
297 { | 297 { |
298 Document* document = frame->document(); | 298 Document* document = frame->document(); |
299 PrintContext printContext(frame); | 299 PrintContext printContext(frame); |
300 printContext.begin(800); // Any width is OK here. | 300 printContext.begin(800); // Any width is OK here. |
301 document->updateLayout(); | 301 document->updateLayout(); |
302 RefPtr<LayoutStyle> style = document->styleForPage(pageNumber); | 302 RefPtr<ComputedStyle> style = document->styleForPage(pageNumber); |
303 | 303 |
304 // Implement formatters for properties we care about. | 304 // Implement formatters for properties we care about. |
305 if (!strcmp(propertyName, "margin-left")) { | 305 if (!strcmp(propertyName, "margin-left")) { |
306 if (style->marginLeft().isAuto()) | 306 if (style->marginLeft().isAuto()) |
307 return String("auto"); | 307 return String("auto"); |
308 return String::number(style->marginLeft().value()); | 308 return String::number(style->marginLeft().value()); |
309 } | 309 } |
310 if (!strcmp(propertyName, "line-height")) | 310 if (!strcmp(propertyName, "line-height")) |
311 return String::number(style->lineHeight().value()); | 311 return String::number(style->lineHeight().value()); |
312 if (!strcmp(propertyName, "font-size")) | 312 if (!strcmp(propertyName, "font-size")) |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 DEFINE_TRACE(PrintContext) | 350 DEFINE_TRACE(PrintContext) |
351 { | 351 { |
352 #if ENABLE(OILPAN) | 352 #if ENABLE(OILPAN) |
353 visitor->trace(m_frame); | 353 visitor->trace(m_frame); |
354 visitor->trace(m_linkDestinations); | 354 visitor->trace(m_linkDestinations); |
355 visitor->trace(m_linkedDestinations); | 355 visitor->trace(m_linkedDestinations); |
356 #endif | 356 #endif |
357 } | 357 } |
358 | 358 |
359 } | 359 } |
OLD | NEW |