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) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1942 overflow_y = EOverflow::kAuto; | 1942 overflow_y = EOverflow::kAuto; |
1943 if (overflow_anchor == EOverflowAnchor::kVisible) | 1943 if (overflow_anchor == EOverflowAnchor::kVisible) |
1944 overflow_anchor = EOverflowAnchor::kAuto; | 1944 overflow_anchor = EOverflowAnchor::kAuto; |
1945 // Column-gap is (ab)used by the current paged overflow implementation (in | 1945 // Column-gap is (ab)used by the current paged overflow implementation (in |
1946 // lack of other ways to specify gaps between pages), so we have to | 1946 // lack of other ways to specify gaps between pages), so we have to |
1947 // propagate it too. | 1947 // propagate it too. |
1948 column_gap = overflow_style->ColumnGap(); | 1948 column_gap = overflow_style->ColumnGap(); |
1949 } | 1949 } |
1950 | 1950 |
1951 ScrollSnapType snap_type = overflow_style->GetScrollSnapType(); | 1951 ScrollSnapType snap_type = overflow_style->GetScrollSnapType(); |
1952 const LengthPoint& snap_destination = overflow_style->ScrollSnapDestination(); | |
1953 | 1952 |
1954 RefPtr<ComputedStyle> document_style = GetLayoutViewItem().MutableStyle(); | 1953 RefPtr<ComputedStyle> document_style = GetLayoutViewItem().MutableStyle(); |
1955 if (document_style->GetWritingMode() != root_writing_mode || | 1954 if (document_style->GetWritingMode() != root_writing_mode || |
1956 document_style->Direction() != root_direction || | 1955 document_style->Direction() != root_direction || |
1957 document_style->VisitedDependentColor(CSSPropertyBackgroundColor) != | 1956 document_style->VisitedDependentColor(CSSPropertyBackgroundColor) != |
1958 background_color || | 1957 background_color || |
1959 document_style->BackgroundLayers() != background_layers || | 1958 document_style->BackgroundLayers() != background_layers || |
1960 document_style->ImageRendering() != image_rendering || | 1959 document_style->ImageRendering() != image_rendering || |
1961 document_style->OverflowAnchor() != overflow_anchor || | 1960 document_style->OverflowAnchor() != overflow_anchor || |
1962 document_style->OverflowX() != overflow_x || | 1961 document_style->OverflowX() != overflow_x || |
1963 document_style->OverflowY() != overflow_y || | 1962 document_style->OverflowY() != overflow_y || |
1964 document_style->ColumnGap() != column_gap || | 1963 document_style->ColumnGap() != column_gap || |
1965 document_style->GetScrollSnapType() != snap_type || | 1964 document_style->GetScrollSnapType() != snap_type) { |
1966 document_style->ScrollSnapDestination() != snap_destination) { | |
1967 RefPtr<ComputedStyle> new_style = ComputedStyle::Clone(*document_style); | 1965 RefPtr<ComputedStyle> new_style = ComputedStyle::Clone(*document_style); |
1968 new_style->SetWritingMode(root_writing_mode); | 1966 new_style->SetWritingMode(root_writing_mode); |
1969 new_style->SetDirection(root_direction); | 1967 new_style->SetDirection(root_direction); |
1970 new_style->SetBackgroundColor(background_color); | 1968 new_style->SetBackgroundColor(background_color); |
1971 new_style->AccessBackgroundLayers() = background_layers; | 1969 new_style->AccessBackgroundLayers() = background_layers; |
1972 new_style->SetImageRendering(image_rendering); | 1970 new_style->SetImageRendering(image_rendering); |
1973 new_style->SetOverflowAnchor(overflow_anchor); | 1971 new_style->SetOverflowAnchor(overflow_anchor); |
1974 new_style->SetOverflowX(overflow_x); | 1972 new_style->SetOverflowX(overflow_x); |
1975 new_style->SetOverflowY(overflow_y); | 1973 new_style->SetOverflowY(overflow_y); |
1976 new_style->SetColumnGap(column_gap); | 1974 new_style->SetColumnGap(column_gap); |
1977 new_style->SetScrollSnapType(snap_type); | 1975 new_style->SetScrollSnapType(snap_type); |
1978 new_style->SetScrollSnapDestination(snap_destination); | |
1979 GetLayoutViewItem().SetStyle(new_style); | 1976 GetLayoutViewItem().SetStyle(new_style); |
1980 SetupFontBuilder(*new_style); | 1977 SetupFontBuilder(*new_style); |
1981 } | 1978 } |
1982 | 1979 |
1983 if (body) { | 1980 if (body) { |
1984 if (const ComputedStyle* style = body->GetComputedStyle()) { | 1981 if (const ComputedStyle* style = body->GetComputedStyle()) { |
1985 if (style->Direction() != root_direction || | 1982 if (style->Direction() != root_direction || |
1986 style->GetWritingMode() != root_writing_mode) | 1983 style->GetWritingMode() != root_writing_mode) |
1987 body->SetNeedsStyleRecalc(kSubtreeStyleChange, | 1984 body->SetNeedsStyleRecalc(kSubtreeStyleChange, |
1988 StyleChangeReasonForTracing::Create( | 1985 StyleChangeReasonForTracing::Create( |
(...skipping 4903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6892 } | 6889 } |
6893 | 6890 |
6894 void showLiveDocumentInstances() { | 6891 void showLiveDocumentInstances() { |
6895 WeakDocumentSet& set = liveDocumentSet(); | 6892 WeakDocumentSet& set = liveDocumentSet(); |
6896 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6893 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6897 for (blink::Document* document : set) | 6894 for (blink::Document* document : set) |
6898 fprintf(stderr, "- Document %p URL: %s\n", document, | 6895 fprintf(stderr, "- Document %p URL: %s\n", document, |
6899 document->Url().GetString().Utf8().data()); | 6896 document->Url().GetString().Utf8().data()); |
6900 } | 6897 } |
6901 #endif | 6898 #endif |
OLD | NEW |