OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 #include "core/testing/LayerRect.h" | 122 #include "core/testing/LayerRect.h" |
123 #include "core/testing/LayerRectList.h" | 123 #include "core/testing/LayerRectList.h" |
124 #include "core/testing/MockHyphenation.h" | 124 #include "core/testing/MockHyphenation.h" |
125 #include "core/testing/PrivateScriptTest.h" | 125 #include "core/testing/PrivateScriptTest.h" |
126 #include "core/testing/TypeConversions.h" | 126 #include "core/testing/TypeConversions.h" |
127 #include "core/testing/UnionTypesTest.h" | 127 #include "core/testing/UnionTypesTest.h" |
128 #include "core/workers/WorkerThread.h" | 128 #include "core/workers/WorkerThread.h" |
129 #include "gpu/command_buffer/client/gles2_interface.h" | 129 #include "gpu/command_buffer/client/gles2_interface.h" |
130 #include "platform/Cursor.h" | 130 #include "platform/Cursor.h" |
131 #include "platform/Language.h" | 131 #include "platform/Language.h" |
| 132 #include "platform/LayoutLocale.h" |
132 #include "platform/PlatformKeyboardEvent.h" | 133 #include "platform/PlatformKeyboardEvent.h" |
133 #include "platform/RuntimeEnabledFeatures.h" | 134 #include "platform/RuntimeEnabledFeatures.h" |
134 #include "platform/TraceEvent.h" | 135 #include "platform/TraceEvent.h" |
135 #include "platform/geometry/IntRect.h" | 136 #include "platform/geometry/IntRect.h" |
136 #include "platform/geometry/LayoutRect.h" | 137 #include "platform/geometry/LayoutRect.h" |
137 #include "platform/graphics/GraphicsLayer.h" | 138 #include "platform/graphics/GraphicsLayer.h" |
138 #include "platform/heap/Handle.h" | 139 #include "platform/heap/Handle.h" |
139 #include "platform/inspector_protocol/FrontendChannel.h" | 140 #include "platform/inspector_protocol/FrontendChannel.h" |
140 #include "platform/scroll/ProgrammaticScrollAnimator.h" | 141 #include "platform/scroll/ProgrammaticScrollAnimator.h" |
141 #include "platform/weborigin/SchemeRegistry.h" | 142 #include "platform/weborigin/SchemeRegistry.h" |
(...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1552 { | 1553 { |
1553 if (!contextDocument() || !contextDocument()->frame()) | 1554 if (!contextDocument() || !contextDocument()->frame()) |
1554 return; | 1555 return; |
1555 | 1556 |
1556 if (enabled != contextDocument()->frame()->spellChecker().isContinuousSpellC
heckingEnabled()) | 1557 if (enabled != contextDocument()->frame()->spellChecker().isContinuousSpellC
heckingEnabled()) |
1557 contextDocument()->frame()->spellChecker().toggleContinuousSpellChecking
(); | 1558 contextDocument()->frame()->spellChecker().toggleContinuousSpellChecking
(); |
1558 } | 1559 } |
1559 | 1560 |
1560 bool Internals::canHyphenate(const AtomicString& locale) | 1561 bool Internals::canHyphenate(const AtomicString& locale) |
1561 { | 1562 { |
1562 return Hyphenation::get(locale); | 1563 return LayoutLocale::valueOrDefault(LayoutLocale::get(locale)) |
| 1564 .getHyphenation(); |
1563 } | 1565 } |
1564 | 1566 |
1565 void Internals::setMockHyphenation(const AtomicString& locale) | 1567 void Internals::setMockHyphenation(const AtomicString& locale) |
1566 { | 1568 { |
1567 Hyphenation::setForTesting(locale, adoptRef(new MockHyphenation)); | 1569 LayoutLocale::setHyphenationForTesting(locale, adoptRef(new MockHyphenation)
); |
1568 } | 1570 } |
1569 | 1571 |
1570 bool Internals::isOverwriteModeEnabled(Document* document) | 1572 bool Internals::isOverwriteModeEnabled(Document* document) |
1571 { | 1573 { |
1572 ASSERT(document); | 1574 ASSERT(document); |
1573 if (!document->frame()) | 1575 if (!document->frame()) |
1574 return false; | 1576 return false; |
1575 | 1577 |
1576 return document->frame()->editor().isOverwriteModeEnabled(); | 1578 return document->frame()->editor().isOverwriteModeEnabled(); |
1577 } | 1579 } |
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2611 } | 2613 } |
2612 | 2614 |
2613 String Internals::getProgrammaticScrollAnimationState(Node* node) const | 2615 String Internals::getProgrammaticScrollAnimationState(Node* node) const |
2614 { | 2616 { |
2615 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 2617 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
2616 return scrollableArea->programmaticScrollAnimator().runStateAsText(); | 2618 return scrollableArea->programmaticScrollAnimator().runStateAsText(); |
2617 return String(); | 2619 return String(); |
2618 } | 2620 } |
2619 | 2621 |
2620 } // namespace blink | 2622 } // namespace blink |
OLD | NEW |