WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Address Comment 83 for WebCore
Bugzilla-21810-WC.patch.txt (text/plain), 22.89 KB, created by
Greg Bolsinga
on 2008-11-16 15:05:19 PST
(
hide
)
Description:
Address Comment 83 for WebCore
Filename:
MIME Type:
Creator:
Greg Bolsinga
Created:
2008-11-16 15:05:19 PST
Size:
22.89 KB
patch
obsolete
>Index: WebCore/ChangeLog >=================================================================== >--- WebCore/ChangeLog (revision 38456) >+++ WebCore/ChangeLog (working copy) >@@ -1,3 +1,50 @@ >+2008-11-16 Greg Bolsinga <bolsinga@apple.com> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ https://bugs.webkit.org/show_bug.cgi?id=21810 >+ Remove use of static C++ objects that are destroyed at exit time (destructors) >+ >+ Use DEFINE_STATIC_LOCAL for static RetainPtr<T>, RefPtr<T>. Add additional >+ uses of DEFINE_STATIC_LOCAL where appropriate. >+ >+ * html/HTMLTableElement.cpp: >+ (WebCore::HTMLTableElement::addSharedCellBordersDecl): new the AtomicStrings >+ * loader/CachedImage.cpp: >+ (WebCore::brokenImage): >+ (WebCore::nullImage): >+ * loader/FTPDirectoryDocument.cpp: >+ (WebCore::_createTemplateDocumentData): Created so accessor has one line initialization >+ (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate): >+ * loader/icon/IconDatabase.cpp: >+ (WebCore::loadDefaultIconRecord): >+ * page/AccessibilityObject.cpp: >+ (WebCore::AccessibilityObject::actionVerb): >+ * page/AccessibilityRenderObject.cpp: >+ (WebCore::AccessibilityRenderObject::actionVerb): >+ * page/mac/EventHandlerMac.mm: >+ (WebCore::currentEvent): >+ * platform/ScrollView.cpp: >+ (WebCore::ScrollView::paint): >+ * platform/graphics/Image.cpp: >+ (WebCore::Image::nullImage): >+ * platform/graphics/mac/ColorMac.mm: >+ (WebCore::nsColor): >+ * platform/graphics/mac/FontCacheMac.mm: new the Strings >+ (WebCore::FontCache::getSimilarFontPlatformData): >+ * platform/graphics/mac/GraphicsContextMac.mm: >+ (WebCore::_createPatternColor): Created so accessor has one line initialization >+ (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar): >+ * platform/graphics/mac/SimpleFontDataMac.mm: >+ (WebCore::webFallbackFontFamily): >+ * platform/mac/PasteboardMac.mm: >+ (WebCore::writableTypesForURL): >+ (WebCore::createWritableTypesForImage): Created so accessor has one line initialization >+ (WebCore::writableTypesForImage): >+ (WebCore::stripAttachmentCharacters): >+ * rendering/RenderLayer.cpp: >+ (WebCore::RenderLayer::paintResizer): >+ > 2008-11-16 Holger Hans Peter Freyther <zecke@selfish.org> > > Reviewed by Darin Adler. >Index: WebCore/html/HTMLTableElement.cpp >=================================================================== >--- WebCore/html/HTMLTableElement.cpp (revision 38456) >+++ WebCore/html/HTMLTableElement.cpp (working copy) >@@ -520,8 +520,8 @@ void HTMLTableElement::addSharedCellBord > { > CellBorders borders = cellBorders(); > >- static const AtomicString cellBorderNames[] = { "none", "solid", "inset", "solid-cols", "solid-rows" }; >- const AtomicString& cellborderValue = cellBorderNames[borders]; >+ static const AtomicString* cellBorderNames[] = { new AtomicString("none"), new AtomicString("solid"), new AtomicString("inset"), new AtomicString("solid-cols"), new AtomicString("solid-rows") }; >+ const AtomicString& cellborderValue = *cellBorderNames[borders]; > CSSMappedAttributeDeclaration* decl = getMappedAttributeDecl(ePersistent, cellborderAttr, cellborderValue); > if (!decl) { > decl = CSSMappedAttributeDeclaration::create().releaseRef(); // This single ref pins us in the table until the document dies. >@@ -565,7 +565,7 @@ void HTMLTableElement::addSharedCellBord > break; > } > >- setMappedAttributeDecl(ePersistent, cellborderAttr, cellBorderNames[borders], decl); >+ setMappedAttributeDecl(ePersistent, cellborderAttr, *cellBorderNames[borders], decl); > decl->setParent(0); > decl->setNode(0); > decl->setMappedState(ePersistent, cellborderAttr, cellborderValue); >Index: WebCore/loader/CachedImage.cpp >=================================================================== >--- WebCore/loader/CachedImage.cpp (revision 38456) >+++ WebCore/loader/CachedImage.cpp (working copy) >@@ -34,6 +34,7 @@ > #include "Request.h" > #include "Settings.h" > #include "SystemTime.h" >+#include <wtf/StdLibExtras.h> > #include <wtf/Vector.h> > > #if PLATFORM(CG) >@@ -107,15 +108,13 @@ void CachedImage::allClientsRemoved() > > static Image* brokenImage() > { >- static RefPtr<Image> brokenImage; >- if (!brokenImage) >- brokenImage = Image::loadPlatformResource("missingImage"); >+ DEFINE_STATIC_LOCAL(RefPtr<Image>, brokenImage, (Image::loadPlatformResource("missingImage"))); > return brokenImage.get(); > } > > static Image* nullImage() > { >- static RefPtr<BitmapImage> nullImage = BitmapImage::create(); >+ DEFINE_STATIC_LOCAL(RefPtr<BitmapImage>, nullImage, (BitmapImage::create()));; > return nullImage.get(); > } > >Index: WebCore/loader/FTPDirectoryDocument.cpp >=================================================================== >--- WebCore/loader/FTPDirectoryDocument.cpp (revision 38456) >+++ WebCore/loader/FTPDirectoryDocument.cpp (working copy) >@@ -38,6 +38,7 @@ > #include "Settings.h" > #include "SharedBuffer.h" > #include "Text.h" >+#include <wtf/StdLibExtras.h> > > #if PLATFORM(QT) > #include <QDateTime> >@@ -323,20 +324,22 @@ void FTPDirectoryTokenizer::parseAndAppe > appendEntry(filename, processFilesizeString(result.fileSize, result.type == FTPDirectoryEntry), processFileDateString(result.modifiedTime), result.type == FTPDirectoryEntry); > } > >+static inline SharedBuffer* _createTemplateDocumentData(Settings *settings) >+{ >+ SharedBuffer* buffer = 0; >+ if (settings) >+ buffer = SharedBuffer::createWithContentsOfFile(settings->ftpDirectoryTemplatePath()).releaseRef(); >+ if (buffer) >+ LOG(FTP, "Loaded FTPDirectoryTemplate of length %i\n", templateDocumentData->size()); >+ return buffer; >+} >+ > bool FTPDirectoryTokenizer::loadDocumentTemplate() > { >- static RefPtr<SharedBuffer> templateDocumentData; >+ DEFINE_STATIC_LOCAL(RefPtr<SharedBuffer>, templateDocumentData, (_createTemplateDocumentData(m_doc->settings()))); > // FIXME: Instead of storing the data, we'd rather actually parse the template data into the template Document once, > // store that document, then "copy" it whenever we get an FTP directory listing. There are complexities with this > // approach that make it worth putting this off. >- >- if (!templateDocumentData) { >- Settings* settings = m_doc->settings(); >- if (settings) >- templateDocumentData = SharedBuffer::createWithContentsOfFile(settings->ftpDirectoryTemplatePath()); >- if (templateDocumentData) >- LOG(FTP, "Loaded FTPDirectoryTemplate of length %i\n", templateDocumentData->size()); >- } > > if (!templateDocumentData) { > LOG_ERROR("Could not load templateData"); >Index: WebCore/loader/icon/IconDatabase.cpp >=================================================================== >--- WebCore/loader/icon/IconDatabase.cpp (revision 38456) >+++ WebCore/loader/icon/IconDatabase.cpp (working copy) >@@ -381,7 +381,7 @@ static inline void loadDefaultIconRecord > 0x00, 0x00, 0x01, 0x52, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x0A, > 0xFC, 0x80, 0x00, 0x00, 0x27, 0x10, 0x00, 0x0A, 0xFC, 0x80, 0x00, 0x00, 0x27, 0x10 }; > >- static RefPtr<SharedBuffer> defaultIconBuffer(SharedBuffer::create(defaultIconData, sizeof(defaultIconData))); >+ DEFINE_STATIC_LOCAL(RefPtr<SharedBuffer>, defaultIconBuffer, (SharedBuffer::create(defaultIconData, sizeof(defaultIconData)))); > defaultIconRecord->setImageData(defaultIconBuffer); > } > #endif >Index: WebCore/page/AccessibilityObject.cpp >=================================================================== >--- WebCore/page/AccessibilityObject.cpp (revision 38456) >+++ WebCore/page/AccessibilityObject.cpp (working copy) >@@ -51,6 +51,7 @@ > #include "TextIterator.h" > #include "htmlediting.h" > #include "visible_units.h" >+#include <wtf/StdLibExtras.h> > > using namespace std; > >@@ -1001,13 +1002,13 @@ void AccessibilityObject::removeAXObject > const String& AccessibilityObject::actionVerb() const > { > // FIXME: Need to add verbs for select elements. >- static const String buttonAction = AXButtonActionVerb(); >- static const String textFieldAction = AXTextFieldActionVerb(); >- static const String radioButtonAction = AXRadioButtonActionVerb(); >- static const String checkedCheckBoxAction = AXCheckedCheckBoxActionVerb(); >- static const String uncheckedCheckBoxAction = AXUncheckedCheckBoxActionVerb(); >- static const String linkAction = AXLinkActionVerb(); >- static const String noAction; >+ DEFINE_STATIC_LOCAL(const String, buttonAction, (AXButtonActionVerb())); >+ DEFINE_STATIC_LOCAL(const String, textFieldAction, (AXTextFieldActionVerb())); >+ DEFINE_STATIC_LOCAL(const String, radioButtonAction, (AXRadioButtonActionVerb())); >+ DEFINE_STATIC_LOCAL(const String, checkedCheckBoxAction, (AXCheckedCheckBoxActionVerb())); >+ DEFINE_STATIC_LOCAL(const String, uncheckedCheckBoxAction, (AXUncheckedCheckBoxActionVerb())); >+ DEFINE_STATIC_LOCAL(const String, linkAction, (AXLinkActionVerb())); >+ DEFINE_STATIC_LOCAL(const String, noAction, ()); > > switch (roleValue()) { > case ButtonRole: >Index: WebCore/page/AccessibilityRenderObject.cpp >=================================================================== >--- WebCore/page/AccessibilityRenderObject.cpp (revision 38456) >+++ WebCore/page/AccessibilityRenderObject.cpp (working copy) >@@ -70,6 +70,7 @@ > #include "TextIterator.h" > #include "htmlediting.h" > #include "visible_units.h" >+#include <wtf/StdLibExtras.h> > > using namespace std; > >@@ -2351,13 +2352,13 @@ void AccessibilityRenderObject::removeAX > const String& AccessibilityRenderObject::actionVerb() const > { > // FIXME: Need to add verbs for select elements. >- static const String buttonAction = AXButtonActionVerb(); >- static const String textFieldAction = AXTextFieldActionVerb(); >- static const String radioButtonAction = AXRadioButtonActionVerb(); >- static const String checkedCheckBoxAction = AXCheckedCheckBoxActionVerb(); >- static const String uncheckedCheckBoxAction = AXUncheckedCheckBoxActionVerb(); >- static const String linkAction = AXLinkActionVerb(); >- static const String noAction; >+ DEFINE_STATIC_LOCAL(const String, buttonAction, (AXButtonActionVerb())); >+ DEFINE_STATIC_LOCAL(const String, textFieldAction, (AXTextFieldActionVerb())); >+ DEFINE_STATIC_LOCAL(const String, radioButtonAction, (AXRadioButtonActionVerb())); >+ DEFINE_STATIC_LOCAL(const String, checkedCheckBoxAction, (AXCheckedCheckBoxActionVerb())); >+ DEFINE_STATIC_LOCAL(const String, uncheckedCheckBoxAction, (AXUncheckedCheckBoxActionVerb())); >+ DEFINE_STATIC_LOCAL(const String, linkAction, (AXLinkActionVerb())); >+ DEFINE_STATIC_LOCAL(const String, noAction, ()); > > switch (roleValue()) { > case ButtonRole: >Index: WebCore/page/mac/EventHandlerMac.mm >=================================================================== >--- WebCore/page/mac/EventHandlerMac.mm (revision 38456) >+++ WebCore/page/mac/EventHandlerMac.mm (working copy) >@@ -43,6 +43,7 @@ > #include "RenderWidget.h" > #include "Scrollbar.h" > #include "Settings.h" >+#include <wtf/StdLibExtras.h> > > namespace WebCore { > >@@ -50,7 +51,7 @@ const double EventHandler::TextDragDelay > > static RetainPtr<NSEvent>& currentEvent() > { >- static RetainPtr<NSEvent> event; >+ DEFINE_STATIC_LOCAL(RetainPtr<NSEvent>, event, ()); > return event; > } > >Index: WebCore/platform/ScrollView.cpp >=================================================================== >--- WebCore/platform/ScrollView.cpp (revision 38456) >+++ WebCore/platform/ScrollView.cpp (working copy) >@@ -32,6 +32,7 @@ > #include "PlatformWheelEvent.h" > #include "Scrollbar.h" > #include "ScrollbarTheme.h" >+#include <wtf/StdLibExtras.h> > > using std::max; > >@@ -668,10 +669,8 @@ void ScrollView::paint(GraphicsContext* > } > > // Paint the panScroll Icon >- static RefPtr<Image> panScrollIcon; > if (m_drawPanScrollIcon) { >- if (!panScrollIcon) >- panScrollIcon = Image::loadPlatformResource("panIcon"); >+ DEFINE_STATIC_LOCAL(RefPtr<Image>, panScrollIcon, (Image::loadPlatformResource("panIcon"))); > context->drawImage(panScrollIcon.get(), m_panScrollIconPoint); > } > } >Index: WebCore/platform/graphics/Image.cpp >=================================================================== >--- WebCore/platform/graphics/Image.cpp (revision 38456) >+++ WebCore/platform/graphics/Image.cpp (working copy) >@@ -32,6 +32,7 @@ > #include "GraphicsContext.h" > #include "IntRect.h" > #include "MIMETypeRegistry.h" >+#include <wtf/StdLibExtras.h> > > #include <math.h> > >@@ -52,7 +53,7 @@ Image::~Image() > > Image* Image::nullImage() > { >- static RefPtr<Image> nullImage = BitmapImage::create(); >+ DEFINE_STATIC_LOCAL(RefPtr<Image>, nullImage, (BitmapImage::create()));; > return nullImage.get(); > } > >Index: WebCore/platform/graphics/mac/ColorMac.mm >=================================================================== >--- WebCore/platform/graphics/mac/ColorMac.mm (revision 38456) >+++ WebCore/platform/graphics/mac/ColorMac.mm (working copy) >@@ -28,6 +28,7 @@ > #import "ColorMac.h" > > #import <wtf/Assertions.h> >+#import <wtf/StdLibExtras.h> > #import <wtf/RetainPtr.h> > > @interface WebCoreControlTintObserver : NSObject >@@ -59,21 +60,21 @@ NSColor* nsColor(const Color& color) > switch (c) { > case 0: { > // Need this to avoid returning nil because cachedRGBAValues will default to 0. >- static RetainPtr<NSColor> clearColor = [NSColor clearColor]; >+ DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, clearColor, ([NSColor clearColor])); > return clearColor.get(); > } > case Color::black: { >- static RetainPtr<NSColor> blackColor = [NSColor blackColor]; >+ DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, blackColor, ([NSColor blackColor])); > return blackColor.get(); > } > case Color::white: { >- static RetainPtr<NSColor> whiteColor = [NSColor whiteColor]; >+ DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, whiteColor, ([NSColor whiteColor])); > return whiteColor.get(); > } > default: { > const int cacheSize = 32; > static unsigned cachedRGBAValues[cacheSize]; >- static RetainPtr<NSColor> cachedColors[cacheSize]; >+ static RetainPtr<NSColor>* cachedColors = new RetainPtr<NSColor>[cacheSize]; > > for (int i = 0; i != cacheSize; ++i) > if (cachedRGBAValues[i] == c) >Index: WebCore/platform/graphics/mac/FontCacheMac.mm >=================================================================== >--- WebCore/platform/graphics/mac/FontCacheMac.mm (revision 38456) >+++ WebCore/platform/graphics/mac/FontCacheMac.mm (working copy) >@@ -140,10 +140,10 @@ FontPlatformData* FontCache::getSimilarF > const FontFamily* currFamily = &font.fontDescription().family(); > while (currFamily && !platformData) { > if (currFamily->family().length()) { >- static String matchWords[3] = { String("Arabic"), String("Pashto"), String("Urdu") }; >+ static String* matchWords[3] = { new String("Arabic"), new String("Pashto"), new String("Urdu") }; > DEFINE_STATIC_LOCAL(AtomicString, geezaStr, ("Geeza Pro")); > for (int j = 0; j < 3 && !platformData; ++j) >- if (currFamily->family().contains(matchWords[j], false)) >+ if (currFamily->family().contains(*matchWords[j], false)) > platformData = getCachedFontPlatformData(font.fontDescription(), geezaStr); > } > currFamily = currFamily->next(); >Index: WebCore/platform/graphics/mac/GraphicsContextMac.mm >=================================================================== >--- WebCore/platform/graphics/mac/GraphicsContextMac.mm (revision 38456) >+++ WebCore/platform/graphics/mac/GraphicsContextMac.mm (working copy) >@@ -27,6 +27,7 @@ > #import "GraphicsContext.h" > > #import "../cg/GraphicsContextPlatformPrivateCG.h" >+#import <wtf/StdLibExtras.h> > > #import "WebCoreSystemInterface.h" > >@@ -80,53 +81,42 @@ void GraphicsContext::setCompositeOperat > [pool drain]; > } > #endif >- >+ >+static inline NSColor* _createPatternColor(NSString* name, NSColor* defaultColor, bool& usingDot) >+{ >+ NSImage *image = [NSImage imageNamed:name]; >+ ASSERT(image); // if image is not available, we want to know >+ NSColor *color = (image ? [NSColor colorWithPatternImage:image] : nil); >+ if (color) >+ usingDot = true; >+ else >+ color = defaultColor; >+ return color; >+} >+ > void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint& point, int width, bool grammar) > { > if (paintingDisabled()) > return; > >- // Constants for spelling pattern color >- static RetainPtr<NSColor> spellingPatternColor = nil; >- static bool usingDotForSpelling = false; >- >- // Constants for grammar pattern color >- static RetainPtr<NSColor> grammarPatternColor = nil; >- static bool usingDotForGrammar = false; >- > // These are the same for misspelling or bad grammar > int patternHeight = cMisspellingLineThickness; > int patternWidth = cMisspellingLinePatternWidth; > >- // Initialize pattern color if needed >- if (!grammar && !spellingPatternColor) { >- NSImage *image = [NSImage imageNamed:@"SpellingDot"]; >- ASSERT(image); // if image is not available, we want to know >- NSColor *color = (image ? [NSColor colorWithPatternImage:image] : nil); >- if (color) >- usingDotForSpelling = true; >- else >- color = [NSColor redColor]; >- spellingPatternColor = color; >- } >- >- if (grammar && !grammarPatternColor) { >- NSImage *image = [NSImage imageNamed:@"GrammarDot"]; >- ASSERT(image); // if image is not available, we want to know >- NSColor *color = (image ? [NSColor colorWithPatternImage:image] : nil); >- if (color) >- usingDotForGrammar = true; >- else >- color = [NSColor greenColor]; >- grammarPatternColor = color; >- } >- > bool usingDot; > NSColor *patternColor; > if (grammar) { >+ // Constants for grammar pattern color >+ static bool usingDotForGrammar = false; >+ DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, grammarPatternColor, (_createPatternColor(@"GrammarDot", [NSColor greenColor], usingDotForGrammar))); >+ > usingDot = usingDotForGrammar; > patternColor = grammarPatternColor.get(); > } else { >+ // Constants for spelling pattern color >+ static bool usingDotForSpelling = false; >+ DEFINE_STATIC_LOCAL(RetainPtr<NSColor>, spellingPatternColor, (_createPatternColor(@"SpellingDot", [NSColor redColor], usingDotForSpelling))); >+ > usingDot = usingDotForSpelling; > patternColor = spellingPatternColor.get(); > } >Index: WebCore/platform/graphics/mac/SimpleFontDataMac.mm >=================================================================== >--- WebCore/platform/graphics/mac/SimpleFontDataMac.mm (revision 38456) >+++ WebCore/platform/graphics/mac/SimpleFontDataMac.mm (working copy) >@@ -42,6 +42,7 @@ > #import <float.h> > #import <unicode/uchar.h> > #import <wtf/Assertions.h> >+#import <wtf/StdLibExtras.h> > #import <wtf/RetainPtr.h> > > @interface NSFont (WebAppKitSecretAPI) >@@ -92,9 +93,7 @@ bool initFontData(SimpleFontData* fontDa > > static NSString *webFallbackFontFamily(void) > { >- static RetainPtr<NSString> webFallbackFontFamily = nil; >- if (!webFallbackFontFamily) >- webFallbackFontFamily = [[NSFont systemFontOfSize:16.0f] familyName]; >+ DEFINE_STATIC_LOCAL(RetainPtr<NSString>, webFallbackFontFamily, ([[NSFont systemFontOfSize:16.0f] familyName])); > return webFallbackFontFamily.get(); > } > >Index: WebCore/platform/mac/PasteboardMac.mm >=================================================================== >--- WebCore/platform/mac/PasteboardMac.mm (revision 38456) >+++ WebCore/platform/mac/PasteboardMac.mm (working copy) >@@ -44,6 +44,7 @@ > #import "WebCoreNSStringExtras.h" > #import "markup.h" > >+#import <wtf/StdLibExtras.h> > #import <wtf/RetainPtr.h> > > @interface NSAttributedString (AppKitSecretsIKnowAbout) >@@ -78,27 +79,27 @@ static NSArray* selectionPasteboardTypes > > static NSArray* writableTypesForURL() > { >- static RetainPtr<NSArray> types = nil; >- if (!types) { >- types = [[NSArray alloc] initWithObjects: >+ DEFINE_STATIC_LOCAL(RetainPtr<NSArray>, types, ([[NSArray alloc] initWithObjects: > WebURLsWithTitlesPboardType, > NSURLPboardType, > WebURLPboardType, > WebURLNamePboardType, > NSStringPboardType, >- nil]; >- } >+ nil])); > return types.get(); > } > >+static inline NSArray* createWritableTypesForImage() >+{ >+ NSMutableArray *types = [[NSMutableArray alloc] initWithObjects:NSTIFFPboardType, nil]; >+ [types addObjectsFromArray:writableTypesForURL()]; >+ [types addObject:NSRTFDPboardType]; >+ return types; >+} >+ > static NSArray* writableTypesForImage() > { >- static RetainPtr<NSMutableArray> types = nil; >- if (!types) { >- types = [[NSMutableArray alloc] initWithObjects:NSTIFFPboardType, nil]; >- [types.get() addObjectsFromArray:writableTypesForURL()]; >- [types.get() addObject:NSRTFDPboardType]; >- } >+ DEFINE_STATIC_LOCAL(RetainPtr<NSArray>, types, (createWritableTypesForImage())); > return types.get(); > } > >@@ -121,7 +122,7 @@ void Pasteboard::clear() > static NSAttributedString *stripAttachmentCharacters(NSAttributedString *string) > { > const unichar attachmentCharacter = NSAttachmentCharacter; >- static RetainPtr<NSString> attachmentCharacterString = [NSString stringWithCharacters:&attachmentCharacter length:1]; >+ DEFINE_STATIC_LOCAL(RetainPtr<NSString>, attachmentCharacterString, ([NSString stringWithCharacters:&attachmentCharacter length:1])); > NSMutableAttributedString *result = [[string mutableCopy] autorelease]; > NSRange attachmentRange = [[result string] rangeOfString:attachmentCharacterString.get()]; > while (attachmentRange.location != NSNotFound) { >Index: WebCore/rendering/RenderLayer.cpp >=================================================================== >--- WebCore/rendering/RenderLayer.cpp (revision 38456) >+++ WebCore/rendering/RenderLayer.cpp (working copy) >@@ -74,6 +74,7 @@ > #include "ScrollbarTheme.h" > #include "SelectionController.h" > #include "TranslateTransformOperation.h" >+#include <wtf/StdLibExtras.h> > > #if ENABLE(SVG) > #include "SVGNames.h" >@@ -1518,9 +1519,7 @@ void RenderLayer::paintResizer(GraphicsC > } > > // Paint the resizer control. >- static RefPtr<Image> resizeCornerImage; >- if (!resizeCornerImage) >- resizeCornerImage = Image::loadPlatformResource("textAreaResizeCorner"); >+ DEFINE_STATIC_LOCAL(RefPtr<Image>, resizeCornerImage, (Image::loadPlatformResource("textAreaResizeCorner"))); > IntPoint imagePoint(absRect.right() - resizeCornerImage->width(), absRect.bottom() - resizeCornerImage->height()); > context->drawImage(resizeCornerImage.get(), imagePoint); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 21810
:
24896
|
24917
|
24920
|
24956
|
24975
|
25008
|
25029
|
25102
|
25143
|
25144
|
25145
|
25146
|
25189
|
25190
|
25191
|
25194
| 25200 |
25201
|
25207
|
25208