Changeset 123424 in webkit
- Timestamp:
- Jul 23, 2012 10:05:25 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 2 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r123369 r123424 1701 1701 platform/KillRingNone.cpp 1702 1702 platform/Language.cpp 1703 platform/LayoutTestSupport.cpp 1703 1704 platform/Length.cpp 1704 1705 platform/LengthBox.cpp -
trunk/Source/WebCore/ChangeLog
r123421 r123424 1 2012-07-23 Mark Pilgrim <pilgrim@chromium.org> 2 3 [Chromium] Move layoutTestMode to WebCore 4 https://bugs.webkit.org/show_bug.cgi?id=92010 5 6 Reviewed by Adam Barth. 7 8 Part of a refactoring series. See tracking bug 82948. 9 10 * CMakeLists.txt: 11 * GNUmakefile.list.am: 12 * Target.pri: 13 * WebCore.gypi: 14 * WebCore.vcproj/WebCore.vcproj: 15 * WebCore.xcodeproj/project.pbxproj: 16 * bindings/generic/RuntimeEnabledFeatures.h: 17 (RuntimeEnabledFeatures): 18 * platform/LayoutTestSupport.cpp: Added. 19 (WebCore): 20 (WebCore::isRunningLayoutTest): 21 (WebCore::setIsRunningLayoutTest): 22 * platform/LayoutTestSupport.h: Added. 23 (WebCore): 24 * platform/chromium/PlatformSupport.h: 25 (PlatformSupport): 26 * platform/chromium/ScrollbarThemeChromiumAndroid.cpp: 27 (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness): 28 (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground): 29 * platform/chromium/ScrollbarThemeChromiumWin.cpp: 30 (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness): 31 (WebCore::ScrollbarThemeChromiumWin::buttonSize): 32 * platform/graphics/chromium/FontCacheChromiumWin.cpp: 33 (WebCore): 34 (WebCore::LookupAltName): 35 (WebCore::fontContainsCharacter): 36 (WebCore::FillLogFont): 37 (WebCore::FontCache::getFontDataForCharacters): 38 (WebCore::FontCache::createFontPlatformData): 39 * platform/graphics/skia/FontCustomPlatformData.cpp: 40 (WebCore::FontCustomPlatformData::fontPlatformData): 41 * platform/graphics/skia/FontSkia.cpp: 42 (WebCore::Font::drawGlyphs): 43 * rendering/RenderThemeChromiumAndroid.cpp: 44 (WebCore::RenderThemeChromiumAndroid::systemColor): 45 (WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle): 46 * rendering/RenderThemeChromiumMac.mm: 47 (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor): 48 * rendering/RenderThemeChromiumSkia.cpp: 49 (WebCore::RenderThemeChromiumSkia::caretBlinkInterval): 50 * rendering/RenderThemeChromiumWin.cpp: 51 (WebCore): 52 (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor): 53 (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor): 54 (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor): 55 (WebCore::RenderThemeChromiumWin::systemColor): 56 (WebCore::menuListButtonWidth): 57 (WebCore::RenderThemeChromiumWin::determineClassicState): 58 1 59 2012-07-23 Dave Tu <dtu@chromium.org> 2 60 -
trunk/Source/WebCore/GNUmakefile.list.am
r123330 r123424 3509 3509 Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp \ 3510 3510 Source/WebCore/platform/image-decoders/png/PNGImageDecoder.h \ 3511 Source/WebCore/platform/LayoutTestSupport.cpp \ 3512 Source/WebCore/platform/LayoutTestSupport.h \ 3511 3513 Source/WebCore/platform/linux/GamepadDeviceLinux.cpp \ 3512 3514 Source/WebCore/platform/linux/GamepadDeviceLinux.h \ … … 6269 6271 6270 6272 endif # END ENABLE_QUOTA 6271 -
trunk/Source/WebCore/Target.pri
r123219 r123424 998 998 platform/KURL.cpp \ 999 999 platform/Language.cpp \ 1000 platform/LayoutTestSupport.cpp \ 1000 1001 platform/Length.cpp \ 1001 1002 platform/LengthBox.cpp \ -
trunk/Source/WebCore/WebCore.gypi
r123326 r123424 288 288 'platform/KURLHash.h', 289 289 'platform/Language.h', 290 'platform/LayoutTestSupport.cpp', 291 'platform/LayoutTestSupport.h', 290 292 'platform/Length.h', 291 293 'platform/LengthBox.h', -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r123223 r123424 28164 28164 </File> 28165 28165 <File 28166 RelativePath="..\platform\LayoutTestSupport.cpp" 28167 > 28168 </File> 28169 <File 28170 RelativePath="..\platform\LayoutTestSupport.h" 28171 > 28172 </File> 28173 <File 28166 28174 RelativePath="..\platform\Length.cpp" 28167 28175 > -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r123181 r123424 5896 5896 D630E2AC149BF344005B2F95 /* MemoryUsageSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = D630E2AB149BF344005B2F95 /* MemoryUsageSupport.h */; }; 5897 5897 D630E2AC149BF344005B2F96 /* EventTracer.h in Headers */ = {isa = PBXBuildFile; fileRef = D630E2AB149BF344005B2F96 /* EventTracer.h */; }; 5898 D630E2AC149BF344005B2F93 /* LayoutTestSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = D630E2AB149BF344005B2F97 /* LayoutTestSupport.h */; }; 5898 5899 D6E276AF14637455001D280A /* MutationObserverRegistration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6E276AD14637455001D280A /* MutationObserverRegistration.cpp */; }; 5899 5900 D6E276B014637455001D280A /* MutationObserverRegistration.h in Headers */ = {isa = PBXBuildFile; fileRef = D6E276AE14637455001D280A /* MutationObserverRegistration.h */; }; … … 5904 5905 D6FDAEF3149C06190037B1E3 /* MemoryUsageSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6FDAEF2149C06190037B1E3 /* MemoryUsageSupport.cpp */; }; 5905 5906 D6FDAEF3149C06190037B1E4 /* EventTracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6FDAEF2149C06190037B1E4 /* EventTracer.cpp */; }; 5907 D6FDAEF3149C06190037B1E5 /* LayoutTestSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6FDAEF2149C06190037B1E5 /* LayoutTestSupport.cpp */; }; 5906 5908 D70AD65713E1342B005B50B4 /* RenderRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D70AD65513E1342B005B50B4 /* RenderRegion.cpp */; }; 5907 5909 D70AD65813E1342B005B50B4 /* RenderRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = D70AD65613E1342B005B50B4 /* RenderRegion.h */; }; … … 13147 13149 D630E2AB149BF344005B2F95 /* MemoryUsageSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryUsageSupport.h; sourceTree = "<group>"; }; 13148 13150 D630E2AB149BF344005B2F96 /* EventTracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventTracer.h; sourceTree = "<group>"; }; 13151 D630E2AB149BF344005B2F97 /* HistogramSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutTestSupport.h; sourceTree = "<group>"; }; 13149 13152 D6E276AD14637455001D280A /* MutationObserverRegistration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MutationObserverRegistration.cpp; sourceTree = "<group>"; }; 13150 13153 D6E276AE14637455001D280A /* MutationObserverRegistration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MutationObserverRegistration.h; sourceTree = "<group>"; }; … … 13155 13158 D6FDAEF2149C06190037B1E3 /* MemoryUsageSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryUsageSupport.cpp; sourceTree = "<group>"; }; 13156 13159 D6FDAEF2149C06190037B1E4 /* EventTracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventTracer.cpp; sourceTree = "<group>"; }; 13160 D6FDAEF2149C06190037B1E5 /* LayoutTestSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutTestSupport.cpp; sourceTree = "<group>"; }; 13157 13161 D70AD65513E1342B005B50B4 /* RenderRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderRegion.cpp; sourceTree = "<group>"; }; 13158 13162 D70AD65613E1342B005B50B4 /* RenderRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderRegion.h; sourceTree = "<group>"; }; … … 20572 20576 E18772F0126E2629003DD586 /* Language.cpp */, 20573 20577 85EC9AF90A71A2C600EEEAED /* Language.h */, 20578 D6FDAEF2149C06190037B1E5 /* LayoutTestSupport.cpp */, 20579 D630E2AB149BF344005B2F97 /* LayoutTestSupport.h */, 20574 20580 BCE65BE80EACDF16007E4533 /* Length.cpp */, 20575 20581 BCE65BE90EACDF16007E4533 /* Length.h */, … … 24071 24077 A12538D413F9B60A00024754 /* LayoutRepainter.h in Headers */, 24072 24078 2D9066070BE141D400956998 /* LayoutState.h in Headers */, 24079 D630E2AC149BF344005B2F97 /* LayoutTestSupport.h in Headers */, 24073 24080 BACF290113B2A0D500781F90 /* LayoutTypes.h in Headers */, 24074 24081 512DD8F50D91E6AF000F89EE /* LegacyWebArchive.h in Headers */, … … 27353 27360 A120ACA413F998CA00FE4AC7 /* LayoutRepainter.cpp in Sources */, 27354 27361 2D9066060BE141D400956998 /* LayoutState.cpp in Sources */, 27362 D6FDAEF3149C06190037B1E5 /* LayoutTestSupport.cpp in Sources */, 27355 27363 512DD8F40D91E6AF000F89EE /* LegacyWebArchive.cpp in Sources */, 27356 27364 51B2417B0D931F3F00E83F5C /* LegacyWebArchiveMac.mm in Sources */, -
trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
r122195 r123424 149 149 static bool deviceMotionEventEnabled() { return isDeviceMotionEnabled; } 150 150 static bool ondevicemotionEnabled() { return isDeviceMotionEnabled; } 151 151 152 152 static void setDeviceOrientationEnabled(bool isEnabled) { isDeviceOrientationEnabled = isEnabled; } 153 153 static bool deviceOrientationEnabled() { return isDeviceOrientationEnabled; } -
trunk/Source/WebCore/platform/chromium/PlatformSupport.h
r123014 r123424 129 129 static bool allowScriptDespiteSettings(const KURL& documentURL); 130 130 131 // LayoutTestMode -----------------------------------------------------132 static bool layoutTestMode();133 134 131 // Plugin ------------------------------------------------------------- 135 132 static bool plugins(bool refresh, Vector<PluginInfo>*); -
trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumAndroid.cpp
r123402 r123424 27 27 #include "ScrollbarThemeChromiumAndroid.h" 28 28 29 #include "LayoutTestSupport.h" 29 30 #include "PlatformContextSkia.h" 30 31 #include "PlatformMouseEvent.h" 31 #include "PlatformSupport.h"32 32 #include "Scrollbar.h" 33 33 #include "TransformationMatrix.h" … … 50 50 int ScrollbarThemeChromiumAndroid::scrollbarThickness(ScrollbarControlSize controlSize) 51 51 { 52 if ( PlatformSupport::layoutTestMode()) {52 if (isRunningLayoutTest()) { 53 53 // Match Chromium-Linux for DumpRenderTree, so the layout test results 54 54 // can be shared. The width of scrollbar down arrow should equal the … … 149 149 // Paint black background in DumpRenderTree, otherwise the pixels in the scrollbar area depend 150 150 // on their previous state, which makes the dumped result undetermined. 151 if ( PlatformSupport::layoutTestMode())151 if (isRunningLayoutTest()) 152 152 context->fillRect(scrollbar->frameRect(), Color::black, ColorSpaceDeviceRGB); 153 153 } -
trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumWin.cpp
r121212 r123424 32 32 33 33 #include "GraphicsContext.h" 34 #include "LayoutTestSupport.h" 34 35 #include "PlatformContextSkia.h" 35 36 #include "PlatformMouseEvent.h" … … 62 63 static int thickness; 63 64 if (!thickness) { 64 if ( PlatformSupport::layoutTestMode())65 if (isRunningLayoutTest()) 65 66 return kMacScrollbarSize[controlSize]; 66 67 thickness = GetSystemMetrics(SM_CXVSCROLL); … … 257 258 // preserving this hack avoids having to rebaseline pixel tests. 258 259 const int kLayoutTestModeGirth = 17; 259 int girth = PlatformSupport::layoutTestMode() ? kLayoutTestModeGirth : thickness;260 int girth = isRunningLayoutTest() ? kLayoutTestModeGirth : thickness; 260 261 261 262 if (scrollbar->orientation() == HorizontalScrollbar) { -
trunk/Source/WebCore/platform/graphics/chromium/FontCacheChromiumWin.cpp
r111344 r123424 2 2 * Copyright (C) 2006, 2007 Apple Computer, Inc. 3 3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved. 4 * 4 * 5 5 * Redistribution and use in source and binary forms, with or without 6 6 * modification, are permitted provided that the following conditions are 7 7 * met: 8 * 8 * 9 9 * * Redistributions of source code must retain the above copyright 10 10 * notice, this list of conditions and the following disclaimer. … … 16 16 * contributors may be used to endorse or promote products derived from 17 17 * this software without specific prior written permission. 18 * 18 * 19 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT … … 36 36 #include "FontUtilsChromiumWin.h" 37 37 #include "HWndDC.h" 38 #include "LayoutTestSupport.h" 38 39 #include "PlatformSupport.h" 39 40 #include "SimpleFontData.h" … … 56 57 // |GetTextFace| (after |CreateFont*|) returns a 'bogus' value (e.g. Arial). 57 58 // This is not consistent with what MSDN says !! 58 // Therefore, before we call |CreateFont*|, we have to map a Romanized name to 59 // the corresponding native name under a CJK locale and vice versa 59 // Therefore, before we call |CreateFont*|, we have to map a Romanized name to 60 // the corresponding native name under a CJK locale and vice versa 60 61 // under a non-CJK locale. 61 // See the corresponding gecko bugs at 62 // See the corresponding gecko bugs at 62 63 // https://bugzilla.mozilla.org/show_bug.cgi?id=373952 63 64 // https://bugzilla.mozilla.org/show_bug.cgi?id=231426 … … 207 208 } 208 209 209 bool isAscii = false; 210 bool isAscii = false; 210 211 String n; 211 // use |lower| only for ASCII names 212 // For non-ASCII names, we don't want to invoke an expensive 213 // and unnecessary |lower|. 212 // use |lower| only for ASCII names 213 // For non-ASCII names, we don't want to invoke an expensive 214 // and unnecessary |lower|. 214 215 if (name.containsOnlyASCII()) { 215 216 isAscii = true; … … 258 259 // characters. Because it's family names rather than font faces we use 259 260 // as keys, there might be edge cases where one face of a font family 260 // has a different repertoire from another face of the same family. 261 // has a different repertoire from another face of the same family. 261 262 typedef HashMap<const wchar_t*, icu::UnicodeSet*> FontCmapCache; 262 263 … … 276 277 277 278 HashMap<const wchar_t*, icu::UnicodeSet*>::iterator it = fontCmapCache->find(family); 278 if (it != fontCmapCache->end()) 279 if (it != fontCmapCache->end()) 279 280 return it->second->contains(character); 280 281 HFONT hfont = fontData->hfont(); 281 282 HFONT hfont = fontData->hfont(); 282 283 HWndDC hdc(0); 283 284 HGDIOBJ oldFont = static_cast<HFONT>(SelectObject(hdc, hfont)); … … 295 296 GLYPHSET* glyphset = reinterpret_cast<GLYPHSET*>(glyphsetBuffer.data()); 296 297 // In addition, refering to the OS/2 table and converting the codepage list 297 // to the coverage map might be faster. 298 // to the coverage map might be faster. 298 299 count = GetFontUnicodeRanges(hdc, glyphset); 299 300 ASSERT(count > 0); … … 306 307 icu::UnicodeSet* cmap = new icu::UnicodeSet; 307 308 while (i < glyphset->cRanges) { 308 WCHAR start = glyphset->ranges[i].wcLow; 309 WCHAR start = glyphset->ranges[i].wcLow; 309 310 cmap->add(start, start + glyphset->ranges[i].cGlyphs - 1); 310 311 i++; … … 312 313 cmap->freeze(); 313 314 // We don't lowercase |family| because all of them are under our control 314 // and they're already lowercased. 315 fontCmapCache->set(family, cmap); 315 // and they're already lowercased. 316 fontCmapCache->set(family, cmap); 316 317 return cmap->contains(character); 317 318 } … … 355 356 winfont->lfCharSet = DEFAULT_CHARSET; 356 357 winfont->lfOutPrecision = OUT_TT_ONLY_PRECIS; 357 winfont->lfQuality = PlatformSupport::layoutTestMode() ? NONANTIALIASED_QUALITY : DEFAULT_QUALITY; // Honor user's desktop settings.358 winfont->lfQuality = isRunningLayoutTest() ? NONANTIALIASED_QUALITY : DEFAULT_QUALITY; // Honor user's desktop settings. 358 359 winfont->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE; 359 360 winfont->lfItalic = fontDescription.italic(); … … 434 435 FontPlatformData* data = 0; 435 436 if (family) 436 data = getCachedFontPlatformData(font.fontDescription(), AtomicString(family, wcslen(family)), false); 437 data = getCachedFontPlatformData(font.fontDescription(), AtomicString(family, wcslen(family)), false); 437 438 438 439 // Last resort font list : PanUnicode. CJK fonts have a pretty … … 493 494 int i; 494 495 for (i = 0; (!data || !fontContainsCharacter(data, family, c)) && i < numFonts; ++i) { 495 family = panUniFonts[i]; 496 family = panUniFonts[i]; 496 497 data = getCachedFontPlatformData(font.fontDescription(), AtomicString(family, wcslen(family))); 497 498 } … … 604 605 FillLogFont(fontDescription, &winfont); 605 606 606 // Windows will always give us a valid pointer here, even if the face name 607 // is non-existent. We have to double-check and see if the family name was607 // Windows will always give us a valid pointer here, even if the face name 608 // is non-existent. We have to double-check and see if the family name was 608 609 // really used. 609 610 String winName; … … 615 616 // when we're running in layout-test mode? 616 617 if (!equalIgnoringCase(family, winName)) { 617 // For CJK fonts with both English and native names, 618 // For CJK fonts with both English and native names, 618 619 // GetTextFace returns a native name under the font's "locale" 619 // and an English name under other locales regardless of 620 // and an English name under other locales regardless of 620 621 // lfFaceName field of LOGFONT. As a result, we need to check 621 622 // if a font has an alternate name. If there is, we need to 622 623 // compare it with what's requested in the first place. 623 624 String altName; 624 if (!LookupAltName(family, altName) || 625 !equalIgnoringCase(altName, winName)) { 625 if (!LookupAltName(family, altName) || !equalIgnoringCase(altName, winName)) { 626 626 DeleteObject(hfont); 627 627 return 0; -
trunk/Source/WebCore/platform/graphics/skia/FontCustomPlatformData.cpp
r122652 r123424 3 3 * Copyright (c) 2007, 2008, 2009, Google Inc. All rights reserved. 4 4 * Copyright (C) 2010 Company 100, Inc. 5 * 5 * 6 6 * Redistribution and use in source and binary forms, with or without 7 7 * modification, are permitted provided that the following conditions are 8 8 * met: 9 * 9 * 10 10 * * Redistributions of source code must retain the above copyright 11 11 * notice, this list of conditions and the following disclaimer. … … 17 17 * contributors may be used to endorse or promote products derived from 18 18 * this software without specific prior written permission. 19 * 19 * 20 20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT … … 36 36 #if OS(WINDOWS) 37 37 #include "OpenTypeUtilities.h" 38 #include "PlatformSupport.h"39 38 #elif OS(UNIX) 40 39 #include "SkStream.h" … … 42 41 43 42 #include "FontPlatformData.h" 43 #include "LayoutTestSupport.h" 44 44 #include "NotImplemented.h" 45 45 #include "OpenTypeSanitizer.h" … … 84 84 85 85 // FIXME: almost identical to FillLogFont in FontCacheWin.cpp. 86 // Need to refactor. 86 // Need to refactor. 87 87 logFont.lfHeight = -size; 88 88 logFont.lfWidth = 0; … … 93 93 logFont.lfCharSet = DEFAULT_CHARSET; 94 94 logFont.lfOutPrecision = OUT_TT_ONLY_PRECIS; 95 logFont.lfQuality = PlatformSupport::layoutTestMode() ?95 logFont.lfQuality = isRunningLayoutTest() ? 96 96 NONANTIALIASED_QUALITY : 97 97 DEFAULT_QUALITY; // Honor user's desktop settings. -
trunk/Source/WebCore/platform/graphics/skia/FontSkia.cpp
r114607 r123424 1 1 /* 2 2 * Copyright (c) 2011 Google Inc. All rights reserved. 3 * 3 * 4 4 * Redistribution and use in source and binary forms, with or without 5 5 * modification, are permitted provided that the following conditions are 6 6 * met: 7 * 7 * 8 8 * * Redistributions of source code must retain the above copyright 9 9 * notice, this list of conditions and the following disclaimer. … … 15 15 * contributors may be used to endorse or promote products derived from 16 16 * this software without specific prior written permission. 17 * 17 * 18 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT … … 34 34 #include "GlyphBuffer.h" 35 35 #include "GraphicsContext.h" 36 #include "LayoutTestSupport.h" 36 37 #include "PlatformContextSkia.h" 37 #include "PlatformSupport.h"38 38 #include "SimpleFontData.h" 39 39 … … 84 84 bool shouldSmoothFonts = true; 85 85 bool shouldAntialias = true; 86 86 87 87 switch (fontDescription().fontSmoothing()) { 88 88 case Antialiased: … … 97 97 case AutoSmoothing: 98 98 // For the AutoSmooth case, don't do anything! Keep the default settings. 99 break; 99 break; 100 100 } 101 102 if (!shouldUseSmoothing() || PlatformSupport::layoutTestMode())101 102 if (!shouldUseSmoothing() || isRunningLayoutTest()) 103 103 shouldSmoothFonts = false; 104 104 -
trunk/Source/WebCore/rendering/RenderThemeChromiumAndroid.cpp
r122740 r123424 29 29 #include "CSSValueKeywords.h" 30 30 #include "Color.h" 31 #include "LayoutTestSupport.h" 31 32 #include "PaintInfo.h" 32 33 #include "PlatformSupport.h" … … 57 58 Color RenderThemeChromiumAndroid::systemColor(int cssValueId) const 58 59 { 59 if ( PlatformSupport::layoutTestMode() && cssValueId == CSSValueButtonface) {60 if (isRunningLayoutTest() && cssValueId == CSSValueButtonface) { 60 61 // Match Chromium Linux' button color in layout tests. 61 62 static const Color linuxButtonGrayColor(0xffdddddd); … … 78 79 void RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle* style, Element*) const 79 80 { 80 if ( PlatformSupport::layoutTestMode()) {81 if (isRunningLayoutTest()) { 81 82 // Match Chromium Linux spin button style in layout tests. 82 83 // FIXME: Consider removing the conditional if a future Android theme matches this. -
trunk/Source/WebCore/rendering/RenderThemeChromiumMac.mm
r120414 r123424 22 22 23 23 #import "CalendarPickerMac.h" 24 #import "LayoutTestSupport.h" 24 25 #import "LocalCurrentGraphicsContext.h" 25 26 #import "RenderThemeChromiumMac.h" 26 27 #import "PaintInfo.h" 27 #import "PlatformSupport.h"28 28 #import "RenderMediaControlsChromium.h" 29 29 #import "WebCoreSystemInterface.h" … … 81 81 bool RenderThemeChromiumMac::usesTestModeFocusRingColor() const 82 82 { 83 return PlatformSupport::layoutTestMode();83 return isRunningLayoutTest(); 84 84 } 85 85 -
trunk/Source/WebCore/rendering/RenderThemeChromiumSkia.cpp
r123300 r123424 30 30 #include "HTMLNames.h" 31 31 #include "Image.h" 32 #include "LayoutTestSupport.h" 32 33 #include "MediaControlElements.h" 33 34 #include "PaintInfo.h" 34 #include "PlatformSupport.h"35 35 #include "PlatformContextSkia.h" 36 36 #include "RenderBox.h" … … 161 161 // Disable the blinking caret in layout test mode, as it introduces 162 162 // a race condition for the pixel tests. http://b/1198440 163 if ( PlatformSupport::layoutTestMode())163 if (isRunningLayoutTest()) 164 164 return 0; 165 165 -
trunk/Source/WebCore/rendering/RenderThemeChromiumWin.cpp
r123300 r123424 37 37 #include "HTMLNames.h" 38 38 #include "HWndDC.h" 39 #include "LayoutTestSupport.h" 39 40 #include "MediaControlElements.h" 40 41 #include "PaintInfo.h" … … 248 249 Color RenderThemeChromiumWin::platformActiveSelectionBackgroundColor() const 249 250 { 250 if ( PlatformSupport::layoutTestMode())251 if (isRunningLayoutTest()) 251 252 return Color(0x00, 0x00, 0xff); // Royal blue. 252 253 COLORREF color = GetSysColor(COLOR_HIGHLIGHT); … … 256 257 Color RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor() const 257 258 { 258 if ( PlatformSupport::layoutTestMode())259 if (isRunningLayoutTest()) 259 260 return Color(0x99, 0x99, 0x99); // Medium gray. 260 261 COLORREF color = GetSysColor(COLOR_GRAYTEXT); … … 264 265 Color RenderThemeChromiumWin::platformActiveSelectionForegroundColor() const 265 266 { 266 if ( PlatformSupport::layoutTestMode())267 if (isRunningLayoutTest()) 267 268 return Color(0xff, 0xff, 0xcc); // Pale yellow. 268 269 COLORREF color = GetSysColor(COLOR_HIGHLIGHTTEXT); … … 385 386 { 386 387 int sysColorIndex = cssValueIdToSysColorIndex(cssValueId); 387 if ( PlatformSupport::layoutTestMode() || (sysColorIndex == -1))388 if (isRunningLayoutTest() || (sysColorIndex == -1)) 388 389 return RenderTheme::systemColor(cssValueId); 389 390 … … 480 481 static int menuListButtonWidth() 481 482 { 482 static int width = PlatformSupport::layoutTestMode() ? kStandardMenuListButtonWidth : GetSystemMetrics(SM_CXVSCROLL);483 static int width = isRunningLayoutTest() ? kStandardMenuListButtonWidth : GetSystemMetrics(SM_CXVSCROLL); 483 484 return width; 484 485 } … … 604 605 // So are readonly text fields. 605 606 if (isReadOnlyControl(o) && (part == TextFieldPart || part == TextAreaPart || part == SearchFieldPart)) 606 return result; 607 return result; 607 608 608 609 if (part == SliderThumbHorizontalPart || part == SliderThumbVerticalPart) { -
trunk/Source/WebKit/chromium/ChangeLog
r123421 r123424 1 2012-07-23 Mark Pilgrim <pilgrim@chromium.org> 2 3 [Chromium] Move layoutTestMode to WebCore 4 https://bugs.webkit.org/show_bug.cgi?id=92010 5 6 Reviewed by Adam Barth. 7 8 Part of a refactoring series. See tracking bug 82948. 9 10 * src/PlatformSupport.cpp: 11 (WebCore): 12 * src/WebKit.cpp: 13 (WebKit::setLayoutTestMode): 14 (WebKit::layoutTestMode): 15 1 16 2012-07-23 Dave Tu <dtu@chromium.org> 2 17 -
trunk/Source/WebKit/chromium/src/PlatformSupport.cpp
r123014 r123424 303 303 } 304 304 305 // LayoutTestMode -------------------------------------------------------------306 307 bool PlatformSupport::layoutTestMode()308 {309 return WebKit::layoutTestMode();310 }311 312 305 // Plugin --------------------------------------------------------------------- 313 306 -
trunk/Source/WebKit/chromium/src/WebKit.cpp
r122159 r123424 32 32 #include "WebKit.h" 33 33 34 #include "LayoutTestSupport.h" 34 35 #include "Logging.h" 35 36 #include "MutationObserver.h" … … 82 83 83 84 static WebKitPlatformSupport* s_webKitPlatformSupport = 0; 84 static bool s_layoutTestMode = false;85 85 86 86 static bool generateEntropy(unsigned char* buffer, size_t length) … … 177 177 void setLayoutTestMode(bool value) 178 178 { 179 s_layoutTestMode = value;179 WebCore::setIsRunningLayoutTest(value); 180 180 } 181 181 182 182 bool layoutTestMode() 183 183 { 184 return s_layoutTestMode;184 return WebCore::isRunningLayoutTest(); 185 185 } 186 186
Note: See TracChangeset
for help on using the changeset viewer.