OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 layer()->scrollToYOffset(top); | 299 layer()->scrollToYOffset(top); |
300 } | 300 } |
301 } | 301 } |
302 | 302 |
303 bool isBodyRenderer = isBody(); | 303 bool isBodyRenderer = isBody(); |
304 bool isRootRenderer = isRoot(); | 304 bool isRootRenderer = isRoot(); |
305 | 305 |
306 // Set the text color if we're the body. | 306 // Set the text color if we're the body. |
307 if (isBodyRenderer) | 307 if (isBodyRenderer) |
308 document()->setTextColor(style()->visitedDependentColor(CSSPropertyColor
)); | 308 document()->setTextColor(style()->visitedDependentColor(CSSPropertyColor
)); |
309 | 309 |
310 if ((isRootRenderer || isBodyRenderer) && (!oldStyle || oldStyle->writingMod
e() != style()->writingMode() || oldStyle->direction() != style()->direction()))
{ | 310 if (isRootRenderer || isBodyRenderer) { |
311 // Propagate the new writing mode and direction up to the RenderView. | 311 // Propagate the new writing mode and direction up to the RenderView. |
312 RenderView* viewRenderer = view(); | 312 RenderView* viewRenderer = view(); |
313 RenderStyle* viewStyle = viewRenderer->style(); | 313 RenderStyle* viewStyle = viewRenderer->style(); |
314 if (isRootRenderer || !document()->directionSetOnDocumentElement()) { | 314 if (viewStyle->direction() != style()->direction() && (isRootRenderer ||
!document()->directionSetOnDocumentElement())) { |
315 viewStyle->setDirection(style()->direction()); | 315 viewStyle->setDirection(style()->direction()); |
316 if (isBodyRenderer) | 316 if (isBodyRenderer) |
317 document()->documentElement()->renderer()->style()->setDirection
(style()->direction()); | 317 document()->documentElement()->renderer()->style()->setDirection
(style()->direction()); |
| 318 setNeedsLayoutAndPrefWidthsRecalc(); |
318 } | 319 } |
319 | 320 |
320 if (isRootRenderer || !document()->writingModeSetOnDocumentElement()) { | 321 if (viewStyle->writingMode() != style()->writingMode() && (isRootRendere
r || !document()->writingModeSetOnDocumentElement())) { |
321 viewStyle->setWritingMode(style()->writingMode()); | 322 viewStyle->setWritingMode(style()->writingMode()); |
322 if (isBodyRenderer) | 323 if (isBodyRenderer) |
323 document()->documentElement()->renderer()->style()->setWritingMo
de(style()->writingMode()); | 324 document()->documentElement()->renderer()->style()->setWritingMo
de(style()->writingMode()); |
| 325 setNeedsLayoutAndPrefWidthsRecalc(); |
324 } | 326 } |
325 setNeedsLayoutAndPrefWidthsRecalc(); | |
326 } | 327 } |
327 } | 328 } |
328 | 329 |
329 void RenderBox::updateBoxModelInfoFromStyle() | 330 void RenderBox::updateBoxModelInfoFromStyle() |
330 { | 331 { |
331 RenderBoxModelObject::updateBoxModelInfoFromStyle(); | 332 RenderBoxModelObject::updateBoxModelInfoFromStyle(); |
332 | 333 |
333 bool isRootObject = isRoot(); | 334 bool isRootObject = isRoot(); |
334 bool isViewObject = isRenderView(); | 335 bool isViewObject = isRenderView(); |
335 | 336 |
(...skipping 2928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3264 { | 3265 { |
3265 if (!parent() || !parent()->isBox()) | 3266 if (!parent() || !parent()->isBox()) |
3266 return locationOffset(); | 3267 return locationOffset(); |
3267 | 3268 |
3268 IntRect rect(frameRect()); | 3269 IntRect rect(frameRect()); |
3269 parentBox()->flipForWritingMode(rect); | 3270 parentBox()->flipForWritingMode(rect); |
3270 return IntSize(rect.x(), rect.y()); | 3271 return IntSize(rect.x(), rect.y()); |
3271 } | 3272 } |
3272 | 3273 |
3273 } // namespace WebCore | 3274 } // namespace WebCore |
OLD | NEW |