Regression(r129406): Fix the scope of the WidgetHierarchyUpdateSuspensionScope in...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-11-27  Tom Sepez  <tsepez@chromium.org>
2
3         Regression(r129406): Fix the scope of the WidgetHierarchyUpdateSuspensionScope in Element::Attach().
4         https://bugs.webkit.org/show_bug.cgi?id=100803
5
6         Reviewed by Abhishek Arya.
7
8         Ensures that the suspension scope has gone out of scope before calling into
9         resumePostAttachCallbacks().
10         
11         Test: fast/dom/adopt-node-crash-2.html
12
13         * dom/Element.cpp:
14         (WebCore::Element::attach):
15
16 2012-11-27  Tony Chang  <tony@chromium.org>
17
18         Remove hidden limiter div in the input slider shadow DOM
19         https://bugs.webkit.org/show_bug.cgi?id=102993
20
21         Reviewed by Ojan Vafai.
22
23         The shadow DOM for input sliders would have a hidden div (the TrackLimiterElement)
24         the size of the thumb which would limit the position of thumb since the width of
25         the thumb takes up space in the track. This patch simplifies the shadow DOM by
26         removing this hidden div and computing the position of the thumb taking the size of
27         the thumb into account.
28
29         No new tests, covered by existing tests in fast/forms.
30
31         * css/mediaControlsChromium.css:
32         (input[type="range"]::-webkit-media-slider-container > div): We were depending on the behavior of the limiter having negative margins, causing the slider div
33         to overflow. Moving the negative margin to the slider produces the same effect.
34         * css/mediaControlsChromiumAndroid.css:
35         (input[type="range"]::-webkit-media-slider-container > div): Ditto.
36         * html/RangeInputType.cpp:
37         (WebCore::RangeInputType::createShadowSubtree): Remove limiter div.
38         * html/shadow/SliderThumbElement.cpp:
39         (WebCore::RenderSliderContainer::layout): Adjust the available space for the thumb and correctly position in the vertical case.
40         (WebCore::SliderThumbElement::setPositionFromPoint): Adjust the usable track size and simplify RTL code (no need to account for the limiter).
41         (WebCore): Delete limiter code.
42         * html/shadow/SliderThumbElement.h:
43         (WebCore): Delete limiter code.
44         * rendering/RenderSlider.cpp:
45         (WebCore::RenderSlider::layout): Delete limiter code.
46         * rendering/RenderTheme.cpp:
47         (WebCore::RenderTheme::paintSliderTicks): Simplify code for painting tick marks.
48
49 2012-11-27  Alpha Lam  <hclam@chromium.org>
50
51         [chromium] Implement full-featured image cache
52         https://bugs.webkit.org/show_bug.cgi?id=99784
53
54         Reviewed by Stephen White.
55
56         Implement a thread-safe image cache to be used with deferred image
57         decoding. Image cache can now be accessed on any thread.
58
59         The patch implements the following logic:
60         1. Mutex to protect all cache operations.
61         2. Cache indexing using key (ImageFrameGenerator*, SkISize scaledSize)
62         3. Cache lookup.
63         4. Cache insertion.
64         5. Generation of cache entry by scaling full size image.
65         6. Generation of cache entries by decoding and scaling.
66
67         Classes involved:
68
69         ImageDecodingStore
70
71         Responsible for owning cache entries and indexing. Pruning and memory
72         management will be added later.
73
74         ImageFrameGenerator
75
76         Responsible for generating new cache enties and insert them into
77         ImageDecodingStore.
78
79         LazyDecodingPixelRef
80
81         Responsible for cache lookup and lazy generation of cache entries
82         using ImageFrameGenerator. There is a mutex to protect concurrent
83         lock operations.
84
85         These items are not implemented in this patch:
86         1. Cache pruning.
87         2. Setting cache memory limit.
88         3. Cache deletion.
89         4. Caching incomplete images and ImageDecoder.
90
91         Unit tests added in ImageFrameGeneratorTest.cpp.
92         Layout tests are under platform/chromium/virtual/fast/images.
93
94         * platform/graphics/chromium/DeferredImageDecoder.cpp:
95         (WebCore::DeferredImageDecoder::~DeferredImageDecoder):
96         (WebCore::DeferredImageDecoder::createResizedLazyDecodingBitmap):
97         (WebCore::DeferredImageDecoder::setEnabled):
98         (WebCore):
99         (WebCore::DeferredImageDecoder::frameBufferAtIndex):
100         (WebCore::DeferredImageDecoder::createLazyDecodingBitmap):
101         * platform/graphics/chromium/DeferredImageDecoder.h:
102         (DeferredImageDecoder):
103         * platform/graphics/chromium/ImageDecodingStore.cpp:
104         (WebCore::ImageDecodingStore::instance):
105         (WebCore::ImageDecodingStore::initializeOnce):
106         (WebCore::ImageDecodingStore::shutdown):
107         (WebCore::ImageDecodingStore::lockCompleteCache):
108         Lookup complete cache entry using hash key, increment use count.
109         (WebCore::ImageDecodingStore::lockIncompleteCache): TODO.
110         (WebCore::ImageDecodingStore::unlockCache):
111         Lookup cache entry using hash key, decrement use count.
112         (WebCore):
113         (WebCore::ImageDecodingStore::insertAndLockCache):
114         Insert new cache entry and increment use count.
115         (WebCore::ImageDecodingStore::prune): TODO.
116         * platform/graphics/chromium/ImageDecodingStore.h:
117         (WebCore):
118         (ImageDecodingStore):
119         (WebCore::ImageDecodingStore::CacheEntry::create):
120         (WebCore::ImageDecodingStore::CacheEntry::createAndUse):
121         (CacheEntry):
122         (WebCore::ImageDecodingStore::CacheEntry::CacheEntry):
123         (WebCore::ImageDecodingStore::CacheEntry::~CacheEntry):
124         * platform/graphics/chromium/ImageFrameGenerator.cpp:
125         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
126         (WebCore::ImageFrameGenerator::setData):
127         (WebCore::ImageFrameGenerator::decodeAndScale):
128         Method for creating new cache entries. This is protected by a mutex
129         to prevent concurrent operations. Which means only one thread can
130         generate new cache entries for a set of encoded data.
131         (WebCore):
132         (WebCore::ImageFrameGenerator::tryToLockCache):
133         Tries to lookup a cache entry.
134         (WebCore::ImageFrameGenerator::tryToScale):
135         Tries to lookup a full size cache entry and generate a scaled version.
136         (WebCore::ImageFrameGenerator::tryToDecodeAndScale):
137         Tries to decode and scale.
138         * platform/graphics/chromium/ImageFrameGenerator.h:
139         (WebCore):
140         (ImageDecoderFactory):
141         (WebCore::ImageFrameGenerator::create):
142         (ImageFrameGenerator):
143         (WebCore::ImageFrameGenerator::setImageDecoderFactoryForTesting):
144         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
145         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
146         (WebCore::LazyDecodingPixelRef::onLockPixels):
147         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
148         * platform/graphics/chromium/LazyDecodingPixelRef.h:
149         (WebCore):
150         (LazyDecodingPixelRef):
151         * platform/graphics/chromium/ScaledImageFragment.cpp:
152         (WebCore::ScaledImageFragment::ScaledImageFragment):
153         * platform/graphics/chromium/ScaledImageFragment.h:
154         (WebCore):
155         (WebCore::ScaledImageFragment::create):
156         (ScaledImageFragment):
157         (WebCore::ScaledImageFragment::scaledSize):
158         * platform/graphics/chromium/SkSizeHash.h: Added.
159         (WTF):
160
161 2012-11-27  Mike West  <mkwst@chromium.org>
162
163         Expanding variable names in ConsoleMessage.
164         https://bugs.webkit.org/show_bug.cgi?id=103436
165
166         Reviewed by Adam Barth.
167
168         Variable names like 'm' should be replaced with full words, like
169         'myOhMyThisIsAnAwesomeVariable' (or something more descriptive).
170
171         * inspector/ConsoleMessage.cpp:
172         (WebCore::ConsoleMessage::ConsoleMessage):
173         * inspector/ConsoleMessage.h:
174         (ConsoleMessage):
175
176 2012-11-27  Aaron Colwell  <acolwell@chromium.org>
177
178         Use-after-free in media player handling
179         https://bugs.webkit.org/show_bug.cgi?id=103426
180
181         Reviewed by Eric Carlson.
182
183         Fixed use-after-free bugs caused by the MediaSource not being closed before the HTMLMediaElement or the MediaPlayer
184         is destroyed. Closing the MediaSource causes it to clear its reference to the MediaPlayer which prevents
185         the use-after-free problems from happening.
186
187         Test: http/tests/media/media-source/video-media-source-closed-on-htmlmediaelement-destruction.html
188
189         * html/HTMLMediaElement.cpp:
190         (WebCore::HTMLMediaElement::~HTMLMediaElement):
191         (WebCore::HTMLMediaElement::clearMediaPlayer):
192
193 2012-11-27  David Grogan  <dgrogan@chromium.org>
194
195         IndexedDB: Remove IDBDatabase.setVersion API
196         https://bugs.webkit.org/show_bug.cgi?id=94972
197
198         Reviewed by Tony Chang.
199
200         This has been out of the spec for over a year. No other browser has
201         implemented it for close to a year.
202
203         Tests - removed.html
204
205         * Modules/indexeddb/IDBCallbacks.h:
206         (IDBCallbacks):
207         * Modules/indexeddb/IDBDatabase.cpp:
208         (WebCore::IDBDatabase::IDBDatabase):
209         * Modules/indexeddb/IDBDatabase.h:
210         (IDBDatabase):
211         * Modules/indexeddb/IDBDatabase.idl:
212         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
213         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
214         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
215         (IDBDatabaseBackendImpl):
216         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
217         (IDBDatabaseBackendInterface):
218         * Modules/indexeddb/IDBRequest.cpp:
219         * Modules/indexeddb/IDBRequest.h:
220
221 2012-11-27  Mike West  <mkwst@chromium.org>
222
223         Log to console when autofocus is blocked by sandbox attribute.
224         https://bugs.webkit.org/show_bug.cgi?id=103255
225
226         Reviewed by Ojan Vafai.
227
228         Adding a short log message when autofocus is blocked by a document's
229         sandbox flags, as it's currently a black box.
230
231         Test: fast/forms/autofocus-in-sandbox-without-allow-scripts.html
232
233         * html/HTMLFormControlElement.cpp:
234         (WebCore::shouldAutofocus):
235
236 2012-11-27  Dean Jackson  <dino@apple.com>
237
238         Attempted build fix after http://trac.webkit.org/changeset/135888.
239
240         * WebCore.exp.in:
241         * WebCore.order:
242
243 2012-11-27  Ryosuke Niwa  <rniwa@webkit.org>
244
245         Build fix after r135890. #else, not #elif.
246
247         * platform/graphics/ca/PlatformCALayer.h:
248         (PlatformCALayer):
249
250 2012-11-27  Ryosuke Niwa  <rniwa@webkit.org>
251
252         HTMLCollection on Document should be stored on NodeListsNodeData like other HTMLCollections and LiveNodeLists
253         https://bugs.webkit.org/show_bug.cgi?id=103364
254
255         Reviewed by Anders Carlsson.
256
257         Replaced the HTMLCollection storage in Document by NodeListsNodeData used by other HTMLCollection's
258         and LiveNodeList's. Now NodeListsNodeData is the only storage for HTMLCollection and LiveNodeList.
259
260         * dom/Document.cpp:
261         (WebCore::Document::Document): Removed code for m_collection since it has been removed.
262         (WebCore::Document::~Document): Ditto.
263         (WebCore::Document::registerNodeList): Renamed. 
264         (WebCore::Document::unregisterNodeList): Ditto.
265         (WebCore::Document::ensureCachedCollection): Renamed from cachedCollection to match the convetion
266         used elsewhere. Also use NodeListNodeData::addCacheWithAtomicName now that m_collection is gone.
267         (WebCore::Document::images):
268         (WebCore::Document::applets):
269         (WebCore::Document::embeds):
270         (WebCore::Document::plugins):
271         (WebCore::Document::scripts):
272         (WebCore::Document::links):
273         (WebCore::Document::forms):
274         (WebCore::Document::anchors):
275         (WebCore::Document::all):
276         (WebCore::Document::windowNamedItems): Use addCacheWithAtomicName.
277         (WebCore::Document::documentNamedItems): Ditto.
278         (WebCore::Document::reportMemoryUsage): Removed code for m_collection since it has been removed.
279         * dom/Document.h:
280         (WebCore::Document): Removed m_collections, m_documentNamedItemCollections, and
281         m_windowNamedItemCollections.
282         * dom/Element.cpp:
283         (WebCore::Element::ensureCachedHTMLCollection): Merged ElementRareData::ensureCachedHTMLCollection.
284         (WebCore::Element::cachedHTMLCollection): Merged ElementRareData::cachedHTMLCollection.
285         * Source/WebCore/dom/ElementRareData.h: Removed ensureCachedHTMLCollection, cachedHTMLCollection,
286         and removeCachedHTMLCollection since they're no longer used.
287         * dom/LiveNodeList.h:
288         (WebCore::LiveNodeListBase::LiveNodeListBase): Call registerNodeList now that LiveNodeList
289         and HTMLCollection share the same storage in all nodes.
290         (WebCore::LiveNodeListBase::~LiveNodeListBase): Ditto about unregisterNodeList.
291         (WebCore::LiveNodeList): Removed the calls to registerNodeList and unregisterNodeList since they
292         are now called in the base class.
293         * dom/NameNodeList.h:
294         (WebCore::NameNodeList::create):
295         * dom/NodeRareData.h:
296         (WebCore::NodeListsNodeData::addCacheWithAtomicName): Pass in CollectionType as the second argument
297         to T::create. This is used in HTMLNameCollection::create. Sevearl LiveNodeList constructors and
298         create functions have been modified to support this.
299         (WebCore::NodeListsNodeData::adoptTreeScope):
300         (WebCore::NodeListsNodeData::namedNodeListKey): CollectionType is no longer restricted in its range.
301         * dom/TagNodeList.h:
302         (WebCore::TagNodeList::create):
303         (WebCore::HTMLTagNodeList::create):
304         * html/CollectionType.h: Deleted a bunch of unused inline functions and constants, and cleanup enum.
305         * html/HTMLCollection.cpp:
306         (WebCore::HTMLCollection::HTMLCollection): Removed the call to registerNodeListCache since it's called
307         in LiveNodeListBase now.
308         (WebCore::HTMLCollection::~HTMLCollection): Ditto. Also replaced calls to removeCachedHTMLCollection
309         of Element and Document by a call to NodeListsNodeData::removeCacheWithAtomicName.
310         * html/HTMLFormControlsCollection.cpp:
311         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
312         (WebCore::HTMLFormControlsCollection::create):
313         * html/HTMLFormControlsCollection.h:
314         (HTMLFormControlsCollection):
315         * html/HTMLNameCollection.cpp:
316         (WebCore::HTMLNameCollection::HTMLNameCollection):
317         (WebCore::HTMLNameCollection::~HTMLNameCollection):
318         * html/HTMLNameCollection.h:
319         (WebCore::HTMLNameCollection::create):
320         (HTMLNameCollection):
321         * html/HTMLOptionsCollection.cpp:
322         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
323         (WebCore::HTMLOptionsCollection::create):
324         * html/HTMLOptionsCollection.h:
325         (HTMLOptionsCollection):
326         * html/HTMLTableRowsCollection.cpp:
327         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
328         (WebCore::HTMLTableRowsCollection::create):
329         * html/HTMLTableRowsCollection.h:
330         (HTMLTableRowsCollection):
331         * html/LabelsNodeList.h:
332         (WebCore::LabelsNodeList::create):
333         * html/RadioNodeList.h:
334         (WebCore::RadioNodeList::create):
335
336 2012-11-27  Pravin D  <pravind.2k4@gmail.com>
337
338         max-height property not respected in case of tables
339         https://bugs.webkit.org/show_bug.cgi?id=98633
340
341         Reviewed by Julien Chaffraix.
342
343         The max-height property determines the maximum computed height an element can have. In case of tables
344         the computed height was not being limited by the max-height property. The current patch fixes the same.
345
346         Test: fast/table/css-table-max-height.html
347
348         * rendering/RenderTable.cpp:
349         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
350           Helper function to compute height from the given style height.
351           This function handles style height of type fixed, percent and viewport percent.
352           As height of type 'calculated' gets internally resolved to either fixed or percent
353           there is no special handling required for the same.
354
355         (WebCore):
356         (WebCore::RenderTable::layout):
357           Logic to compute the logical height of an element such that it does not exceed the max-height value given that
358           min-width < Content height < max-height, when min-height < max-height.
359           However max-height value is not respected if either min-height > max-height or Content height > max-height.
360
361         * rendering/RenderTable.h:
362         (RenderTable):
363           Function definition for the newly add function convertStyleLogicalHeightToComputedHeight().
364
365 2012-11-27  Roger Fong  <roger_fong@apple.com>
366
367         Windows specific implementation of usesTileCacheLayer needed after r133056.
368         https://bugs.webkit.org/show_bug.cgi?id=103321
369
370         Reviewed by Simon Fraser.
371
372         After r133056 it no longer suffices to use the existing usesTileCacheLayer method on Windows.
373         The change resulted in 3 crashing tests:
374         compositing/rotated-tiled-clamped
375         compositing/rotated-tiled-preserve3d-clamped
376         fast/events/tabindex-focus-blur-all
377
378         * platform/graphics/ca/PlatformCALayer.h:
379         (WebCore::PlatformCALayer::usesTileCacheLayer):
380         (PlatformCALayer): 
381         Adding in platform specific method for Windows that returns false for this method.
382
383 2012-11-27  Christophe Dumez  <christophe.dumez@intel.com>
384
385         Canvas does not draw any text if the font is not fully loaded yet
386         https://bugs.webkit.org/show_bug.cgi?id=103392
387
388         Reviewed by Kenneth Rohde Christiansen.
389
390         Update CanvasRenderingContext2D::drawTextInternal() so that the
391         text is being drawn, even if custom fonts are still being loaded.
392         Without this, WebKit was not drawing any text on the canvas if
393         the needed font is custom and is not fully loaded yet. This seems
394         broken.
395
396         The new behavior is according to specification:
397         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html
398
399         The specification says: "If a font is used before it is fully
400         loaded, or if the font style source object does not have that
401         font in scope at the time the font is to be used, then it must be
402         treated as if it was an unknown font, falling back to another as
403         described by the relevant CSS specifications."
404
405         Test: http/tests/canvas/canvas-slow-font-loading.html
406
407         * html/canvas/CanvasRenderingContext2D.cpp:
408         (WebCore::CanvasRenderingContext2D::drawTextInternal):
409         * platform/graphics/Font.cpp:
410         (WebCore::Font::drawText): Add argument to specify the behavior
411         when custom fonts are not ready. By default, it will not draw
412         anything (same behavior as before). However, the Canvas code
413         can now request that a fallback font is used if the custom
414         font is not fully loaded yet.
415         * platform/graphics/Font.h: #undef Complex if defined to avoid
416         conflicting with Complex value in CodePath enum. X11/X.h is
417         defining Complex to 0.
418         * platform/graphics/GraphicsContext.cpp:
419         (WebCore::GraphicsContext::drawBidiText):
420         * platform/graphics/GraphicsContext.h:
421         (WebCore):
422         (GraphicsContext):
423
424 2012-11-27  Dean Jackson  <dino@apple.com>
425
426         No need for ExceptionCode in HTMLMediaElement::load
427         https://bugs.webkit.org/show_bug.cgi?id=103438
428
429         Reviewed by Eric Carlson.
430
431         After https://bugs.webkit.org/show_bug.cgi?id=103318, there is no
432         need for the ExceptionCode parameter in load(). The HTML5 spec says
433         that all errors in loading are communicated via state.
434         http://dev.w3.org/html5/spec/media-elements.html#dom-media-load
435
436         Of the 29 tests exercising load(), none of them were exercising
437         exceptions (obviously).
438
439         * html/HTMLMediaElement.cpp:
440         (WebCore::HTMLMediaElement::load):
441         (WebCore::HTMLMediaElement::resume):
442         * html/HTMLMediaElement.h:
443         * html/HTMLMediaElement.idl:
444
445 2012-11-27  Robert Hogan  <robert@webkit.org>
446
447         REGRESSION (r125578): word-wrapping in absolute position with nbsp, word-spacing and custom font
448         https://bugs.webkit.org/show_bug.cgi?id=101443
449
450         Reviewed by David Hyatt.
451
452         Leading non-breaking space in a text run should always get word-spacing applied. When RenderText
453         calculates the preferred with of a run of text it breaks it up into word segments that contain
454         no breaking spaces and calculates the width of each. So when calculating the width of '&nbsp;b' 
455         it needs to add word-spacing to the leading non-breaking space as it does not get collapsed away.
456
457         Test: fast/text/word-space-nbsp.html
458
459         * platform/graphics/WidthIterator.cpp:
460         (WebCore::WidthIterator::advanceInternal):
461
462 2012-11-27  Yong Li  <yoli@rim.com>
463
464         [BlackBerry] EventLoop should end when WebKit thread is exiting
465         https://bugs.webkit.org/show_bug.cgi?id=103301
466
467         Reviewed by Rob Buis.
468         RIM PR# 194379.
469         Internally reviewed by Joe Mason.
470
471         Break the nested event loop when WebKit thread has been asked to quit.
472
473         * platform/blackberry/EventLoopBlackBerry.cpp:
474         (WebCore::EventLoop::cycle):
475
476 2012-11-27  Pratik Solanki  <psolanki@apple.com>
477
478         objc/objc-runtime.h does not exist on all PLATFORM(MAC)
479         https://bugs.webkit.org/show_bug.cgi?id=101780
480
481         Reviewed by Brent Fulgham.
482
483         Clean up header includes so we don't include objc/objc-runtime.h.
484
485         No new tests because no functional changes.
486
487         * bridge/objc/objc_header.h:
488         * page/mac/EventHandlerMac.mm:
489         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
490         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
491         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
492         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
493         * platform/graphics/mac/WebLayer.mm:
494         * platform/mac/WebCoreObjCExtras.mm:
495         * platform/mac/WebVideoFullscreenController.mm:
496
497 2012-11-27  Eberhard Graether  <egraether@google.com>
498
499         Plumbing showPaintRects out of InspectorPageAgent to use a different drawing implementation if available.
500         https://bugs.webkit.org/show_bug.cgi?id=102452
501
502         Reviewed by Pavel Feldman.
503
504         This change makes the showPaintRects setting in the Web Inspector's settings notify InspectorClient
505         when changed. And the default paint rects drawing is not used if an alternative is available.
506         This allows Chromium to draw the paint rects in the compositor's HUDLayer.
507
508         No new tests.
509
510         * inspector/InspectorClient.h:
511         (WebCore::InspectorClient::overridesShowPaintRects):
512         (WebCore::InspectorClient::setShowPaintRects):
513         (InspectorClient):
514         * inspector/InspectorPageAgent.cpp:
515         (PageAgentState):
516         (WebCore::InspectorPageAgent::restore):
517         (WebCore::InspectorPageAgent::disable):
518         (WebCore::InspectorPageAgent::setShowPaintRects):
519         (WebCore::InspectorPageAgent::didPaint):
520
521 2012-11-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
522
523         Unreviewed cleanup.
524
525         Remove leftover file that was replaced by PlatformScreenQt.cpp 4 years ago.
526
527         * platform/qt/ScreenQt.cpp: Removed.
528
529 2012-11-27  Istiaque Ahmed  <lazyboy@chromium.org>
530
531         freeV8NPObject: Skip trying to remove object from per context data's ObjectMap if the object does not exist in the map.
532         https://bugs.webkit.org/show_bug.cgi?id=103356
533
534         Reviewed by Adam Barth.
535
536         Before introducing per context data, it used to be the case that we would ignore removing v8 object
537         from context data's map if we couldn't find it. With perContextData change, this turned into an ASSERT
538         instead and we had crash reports.
539         Related crbug.com/154462.
540
541         Test: platform/chromium/plugins/release-frame-content-window.html
542
543         * bindings/v8/NPV8Object.cpp:
544         (WebCore::freeV8NPObject):
545
546 2012-11-27  Marja Hölttä  <marja@chromium.org>
547
548         Add callbacks to the FrameLoaderClient when a resource is requested
549         https://bugs.webkit.org/show_bug.cgi?id=92761
550
551         Reviewed by Adam Barth.
552
553         In Chromium, when an extension script cancels a network
554         request (which happens out of process), we'd like to
555         notify content scripts running on the current page about
556         which elements failed to load because the requests were
557         cancelled (as opposed to e.g. the network request just
558         didn't work). Since the resource request itself does not
559         carry any information what DOM element is was made for,
560         currently a content script has to search the DOM tree and
561         guess which requests will be cancelled by its counter
562         part. By adding these callbacks, the embedder can make
563         this connection explictly.
564
565         Test: platform/chromium/fast/loader/resource-request-callbacks.html
566
567         * loader/FrameLoaderClient.h:
568         (WebCore):
569         (WebCore::FrameLoaderClient::dispatchWillRequestResource):
570         (FrameLoaderClient):
571         * loader/cache/CachedResourceLoader.cpp:
572         (WebCore::CachedResourceLoader::requestResource):
573
574 2012-11-27  Dean Jackson  <dino@apple.com>
575
576         Unreviewed build fix for r135866.
577
578         * html/HTMLMediaElement.cpp:
579         (WebCore::HTMLMediaElement::load):
580
581 2012-11-27  Leo Yang  <leoyang@rim.com>
582
583         [BlackBerry] Adapt to the change of BlackBerry::Platform::FilterStream::notifyHeadersReceived
584         https://bugs.webkit.org/show_bug.cgi?id=103425
585
586         Reviewed by Yong Li.
587
588         A const has been added for HeaderList parameter of BlackBerry::Platform::FilterStream::notifyHeadersReceived.
589         The patch is adapting to this change.
590
591         No functionalities changed no new tests.
592
593         * platform/network/blackberry/NetworkJob.cpp:
594         (WebCore::NetworkJob::notifyHeadersReceived):
595         * platform/network/blackberry/NetworkJob.h:
596         (NetworkJob):
597         * platform/network/blackberry/rss/RSSFilterStream.cpp:
598         (WebCore::RSSFilterStream::notifyHeadersReceived):
599         * platform/network/blackberry/rss/RSSFilterStream.h:
600
601 2012-11-27  Min Qin  <qinmin@chromium.org>
602
603         Don't throw an exception if user gesture is required for load
604         https://bugs.webkit.org/show_bug.cgi?id=103318
605
606         Reviewed by Eric Carlson.
607
608         There is no need to throw an exception if media load requires user gesture.
609         Since chrome does not render the poster and media control after an exception is thrown, throwing an exception may break a lot of sites on android.
610         Change a current test to match the new behavior: media/video-load-require-user-gesture.html
611
612         * html/HTMLMediaElement.cpp:
613         (WebCore::HTMLMediaElement::load):
614
615 2012-11-27  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
616
617         [GStreamer] Verify if GStreamer was previously initialized
618         https://bugs.webkit.org/show_bug.cgi?id=103151
619
620         Reviewed by Philippe Normand.
621
622         This patch calls gst_is_initialized() before calling gst_init_check()
623         in order to verify if GStreamer has not been initialized before.
624
625         This is useful particularly for WebKit1 so the applications could
626         initialize GStreamer before.
627
628         As the API call was added in GStreamer v0.10.31, the patch fences the
629         call only in that version of GStreamer or above.
630
631         No new tests, existing media tests cover this change.
632
633         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
634         (WebCore::initializeGStreamer):
635
636 2012-11-27  Kentaro Hara  <haraken@chromium.org>
637
638         [V8] Remove V8StringResource::m_string
639         https://bugs.webkit.org/show_bug.cgi?id=103367
640
641         Reviewed by Adam Barth.
642
643         This patch cleans up V8StringResource and removes V8StringResource::m_string.
644         This patch won't change performance. (This patch just adds one redundant IsString()
645         check and one IsInt32() check.) I confirmed no performance regression in micro benchmarks
646         (https://bugs.webkit.org/attachment.cgi?id=176178).
647
648         No tests. No change in behavior.
649
650         * bindings/v8/V8Binding.cpp:
651         (WebCore::v8NonStringValueToWebCoreString):
652         * bindings/v8/V8StringResource.cpp:
653         (WebCore::int32ToWebCoreStringFast):
654         (WebCore::String):
655         (WebCore::AtomicString):
656         (WebCore):
657         * bindings/v8/V8StringResource.h:
658         (WebCore::V8StringResource::V8StringResource):
659         (WebCore::V8StringResource::prepareBase):
660         (WebCore::V8StringResource::toString):
661         (V8StringResource):
662         (WebCore::::prepare):
663
664 2012-11-27  Alec Flett  <alecflett@chromium.org>
665
666         IndexedDB: stub out IDBDatabaseBackendInterface::createTransaction
667         https://bugs.webkit.org/show_bug.cgi?id=102730
668
669         Reviewed by Darin Fisher.
670
671         Stub out and support passing a 64-bit transaction id
672         so the frontend can refer to transactions by id rather than
673         a proxy object or a direct pointer reference. This will ultimately
674         loosen ownership and lifetime of transactions from the frontend
675         and backend.
676
677         No new tests, this is just part of a refactor.
678
679         * Modules/indexeddb/IDBDatabase.cpp:
680         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
681         (WebCore):
682         (WebCore::IDBDatabaseBackendImpl::transaction):
683         (WebCore::IDBDatabaseBackendImpl::createTransaction):
684         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
685         (IDBDatabaseBackendImpl):
686         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
687         (IDBDatabaseBackendInterface):
688         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
689         (WebCore::IDBTransactionBackendImpl::create):
690         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
691         * Modules/indexeddb/IDBTransactionBackendImpl.h:
692         (IDBTransactionBackendImpl):
693         (WebCore::IDBTransactionBackendImpl::id):
694
695 2012-11-27  Andrei Bucur  <abucur@adobe.com>
696
697         [CSS Regions] Crash when dispatching regionlayoutupdate
698         https://bugs.webkit.org/show_bug.cgi?id=102944
699
700         Reviewed by Andreas Kling.
701
702         The event dispatch function was incorrectly assuming the RenderNamedFlowThread is valid. Because the event is asynchronous it's
703         possible for the flow to be in the "NULL" state (the renderer is 0) while the regionlayoutupdate event is dispatched.
704
705         Test: fast/regions/webkit-named-flow-event-crash.html
706
707         * dom/WebKitNamedFlow.cpp:
708         (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent): Remove the ASSERT and don't dispatch the event if the flow is
709             in the "NULL" state.
710
711 2012-11-27  Mihnea Ovidenie  <mihnea@adobe.com>
712
713         [CSS Regions] Absolutely positioned regions do not expand to fill their container
714         https://bugs.webkit.org/show_bug.cgi?id=102385
715
716         Reviewed by Julien Chaffraix.
717
718         In the case of an absolutely positioned region with height auto, height computation should follow
719         the path of block elements instead of replaced elements.
720
721         Tests: fast/regions/autosize-abspos-anchoredregion-vertlr.html
722                fast/regions/autosize-abspos-anchoredregion.html
723
724         * rendering/RenderBox.cpp:
725         (WebCore::RenderBox::computePositionedLogicalHeight): Skip replaced element height computation when a region has height auto.
726         * rendering/RenderRegion.h:
727         (WebCore::RenderRegion::shouldHaveAutoLogicalHeight): Make it private since it is not accessed from outside.
728
729 2012-11-27  Alexander Pavlov  <apavlov@chromium.org>
730
731         Incorrect value of CSSStyleDeclaration#length when a shorthand property is inherit or initial
732         https://bugs.webkit.org/show_bug.cgi?id=73002
733
734         Reviewed by Alexis Menard.
735
736         Before the patch, "inherit" and "initial" shorthands would get added to the StylePropertySet as-is, their longhands unspecified.
737         This patch tackles two aspects of the problem:
738         - When parsing "initial" and "inherit" shorthands, their longhands are added to the property set with the corresponding values.
739         - When querying "initial" and "inherit" shorthands, their values are reconstructed from the longhands as usual, but if all of the longhands
740           are found to have the same explicit "initial" or "inherit" value, the respective single value is returned as the shorthand value.
741
742         When reconstructing shorthands, a "common value" is tracked. If all longhands involved have the same explicit value, it becomes the
743         "common value", otherwise it is a String(). The "inherit" or "initial" common value ultimately becomes the shorthand value
744         (except for the "background-position" shorthand, which is a special case).
745
746         * css/CSSParser.cpp:
747         (WebCore::parseKeywordValue): Parse shorthands' "initial" and "inherit" values using the CSSParser.
748         (WebCore::CSSParser::addExpandedPropertyForValue): Add simple property or all sharthand's longhands with given value and priority.
749         (WebCore::CSSParser::parseValue): For "initial" and "inherit" shorthands, add their longhands with the respective value, not the shorthands proper.
750         * css/CSSParser.h: Add addExpandedPropertyForValue().
751         * css/StylePropertySet.cpp:
752         (WebCore::isInitialOrInherit): Check if the value is "initial" or "inherit".
753         (WebCore):
754         (WebCore::StylePropertySet::appendFontLonghandValueIfExplicit): Modified to track the common value for the "font" shorthand.
755         (WebCore::StylePropertySet::fontValue): Ditto.
756         (WebCore::StylePropertySet::get4Values): Return "inherit" or "initial" if all 4 values are explicitly "inherit" or "initial".
757         (WebCore::StylePropertySet::getLayeredShorthandValue): Use the common value approach for layered shorthands.
758         (WebCore::StylePropertySet::getShorthandValue): Ditto for ordinary shorthands.
759         (WebCore::StylePropertySet::borderPropertyValue): Ditto for the "border" shorthand.
760         * css/StylePropertySet.h: Modify the appendFontLonghandValueIfExplicit() signature.
761         * html/canvas/CanvasRenderingContext2D.cpp:
762         (WebCore::CanvasRenderingContext2D::setFont): Now that "inherit" and "initial" shorthands are represented by their longhands,
763         we need to check the string value of the "font" shorthand for being "inherit" or "initial" instead: getPropertyCSSValue() no longer works,
764         since the shorthand itself is no longer added to the StylePropertySet.
765
766 2012-11-27  Kentaro Hara  <haraken@chromium.org>
767
768         Unreviewed. Renamed TRYCATCH => V8TRYCATCH.
769         (I forgot to apply reviewer's comment in bug 103352 when landing r135817.)
770
771         * bindings/scripts/CodeGeneratorV8.pm:
772         (GenerateParametersCheck):
773         (GenerateEventConstructorCallback):
774         (ConvertToV8StringResource):
775         * bindings/scripts/test/V8/V8Float64Array.cpp:
776         (WebCore::Float64ArrayV8Internal::fooCallback):
777         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
778         (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
779         (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
780         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
781         (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
782         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
783         (WebCore::V8TestEventConstructor::constructorCallback):
784         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
785         (WebCore::TestEventTargetV8Internal::itemCallback):
786         (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
787         * bindings/scripts/test/V8/V8TestInterface.cpp:
788         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrSetter):
789         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrSetter):
790         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
791         (WebCore::V8TestInterface::constructorCallback):
792         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
793         (WebCore::TestMediaQueryListListenerV8Internal::methodCallback):
794         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
795         (WebCore::V8TestNamedConstructorConstructorCallback):
796         * bindings/scripts/test/V8/V8TestObj.cpp:
797         (WebCore::TestObjV8Internal::staticStringAttrAttrSetter):
798         (WebCore::TestObjV8Internal::stringAttrAttrSetter):
799         (WebCore::TestObjV8Internal::reflectedStringAttrAttrSetter):
800         (WebCore::TestObjV8Internal::reflectedURLAttrAttrSetter):
801         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrSetter):
802         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrSetter):
803         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter):
804         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
805         (WebCore::TestObjV8Internal::longMethodWithArgsCallback):
806         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
807         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
808         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
809         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
810         (WebCore::TestObjV8Internal::idbKeyCallback):
811         (WebCore::TestObjV8Internal::optionsObjectCallback):
812         (WebCore::TestObjV8Internal::methodWithOptionalArgCallback):
813         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback):
814         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
815         (WebCore::TestObjV8Internal::methodWithOptionalStringCallback):
816         (WebCore::TestObjV8Internal::methodWithOptionalStringIsUndefinedCallback):
817         (WebCore::TestObjV8Internal::methodWithOptionalStringIsNullStringCallback):
818         (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):
819         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
820         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
821         (WebCore::TestObjV8Internal::overloadedMethod3Callback):
822         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
823         (WebCore::TestObjV8Internal::overloadedMethod6Callback):
824         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
825         (WebCore::TestObjV8Internal::overloadedMethod8Callback):
826         (WebCore::TestObjV8Internal::overloadedMethod9Callback):
827         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
828         (WebCore::TestObjV8Internal::overloadedMethod11Callback):
829         (WebCore::TestObjV8Internal::classMethodWithOptionalCallback):
830         (WebCore::TestObjV8Internal::overloadedMethod12Callback):
831         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
832         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
833         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
834         (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
835         (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
836         (WebCore::TestObjV8Internal::stringArrayFunctionCallback):
837         (WebCore::TestObjV8Internal::convert1Callback):
838         (WebCore::TestObjV8Internal::convert2Callback):
839         (WebCore::TestObjV8Internal::convert4Callback):
840         (WebCore::TestObjV8Internal::convert5Callback):
841         (WebCore::TestObjV8Internal::strictFunctionCallback):
842         (WebCore::TestObjV8Internal::variadicStringMethodCallback):
843         (WebCore::TestObjV8Internal::variadicDoubleMethodCallback):
844         (WebCore::TestObjV8Internal::variadicNodeMethodCallback):
845         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
846         (WebCore::V8TestOverloadedConstructors::constructor1Callback):
847         (WebCore::V8TestOverloadedConstructors::constructor2Callback):
848         (WebCore::V8TestOverloadedConstructors::constructor3Callback):
849         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
850         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
851         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
852         * bindings/v8/V8Binding.h:
853         (WebCore::toV8Sequence):
854         * bindings/v8/V8BindingMacros.h:
855         * bindings/v8/custom/V8BlobCustom.cpp:
856         (WebCore::V8Blob::constructorCallbackCustom):
857         * bindings/v8/custom/V8ConsoleCustom.cpp:
858         (WebCore::V8Console::profileCallback):
859         (WebCore::V8Console::profileEndCallback):
860         * bindings/v8/custom/V8DOMWindowCustom.cpp:
861         (WebCore::handlePostMessageCallback):
862         * bindings/v8/custom/V8DataViewCustom.cpp:
863         (WebCore::V8DataView::getInt8Callback):
864         (WebCore::V8DataView::getUint8Callback):
865         (WebCore::V8DataView::setInt8Callback):
866         (WebCore::V8DataView::setUint8Callback):
867         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
868         (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallback):
869         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
870         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
871         * bindings/v8/custom/V8DocumentCustom.cpp:
872         (WebCore::V8Document::evaluateCallback):
873         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
874         (WebCore::V8HTMLOptionsCollection::addCallback):
875         * bindings/v8/custom/V8HistoryCustom.cpp:
876         (WebCore::V8History::pushStateCallback):
877         (WebCore::V8History::replaceStateCallback):
878         * bindings/v8/custom/V8IntentCustom.cpp:
879         (WebCore::V8Intent::constructorCallbackCustom):
880         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
881         (WebCore::V8SQLTransaction::executeSqlCallback):
882         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
883         (WebCore::V8SQLTransactionSync::executeSqlCallback):
884         * bindings/v8/custom/V8SVGLengthCustom.cpp:
885         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
886         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
887         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
888         * bindings/v8/custom/V8WorkerContextCustom.cpp:
889         (WebCore::V8WorkerContext::importScriptsCallback):
890
891 2012-11-27  Dan Carney  <dcarney@google.com>
892
893         [V8] add contextForWorld helper function to ScriptController
894         https://bugs.webkit.org/show_bug.cgi?id=103376
895
896         Reviewed by Kentaro Hara.
897
898         Reducing some commonly occuring code with an inline function.
899
900         No new tests. No change in functionality.
901
902         * bindings/v8/ScriptController.cpp:
903         (WebCore::ScriptController::contextForWorld):
904         (WebCore):
905         (WebCore::ScriptController::currentWorldContext):
906         (WebCore::ScriptController::mainWorldContext):
907         * bindings/v8/ScriptController.h:
908         (ScriptController):
909
910 2012-11-26  Allan Sandfeld Jensen  <allan.jensen@digia.com>
911
912         [Qt] Implement the mimetype icon methods
913         https://bugs.webkit.org/show_bug.cgi?id=103260
914
915         Reviewed by Simon Hausmann.
916
917         * platform/graphics/Icon.h:
918         (Icon):
919         * platform/graphics/qt/IconQt.cpp:
920         (WebCore::Icon::createIconForFiles):
921         (WebCore::Icon::paint):
922
923 2012-09-17  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
924
925         Incorrect rect-based hit-test result when hit-test region includes culled inlines
926         https://bugs.webkit.org/show_bug.cgi?id=88376
927
928         Reviewed by Dave Hyatt.
929
930         Move the handling of culled inlines from HitTestResult::addNodeToRectBasedTestResult to 
931         InlineFlowBox::nodeAtPoint. This makes it possible to fix a number of bugs with how
932         culled inlines were handled. They are now checked after all their children, and may
933         terminate area-based hit-testing if they contain the whole area.
934
935         Tests: fast/dom/nodesFromRect/nodesFromRect-culled-inlines.html
936                fast/dom/nodesFromRect/nodesFromRect-culled-inline-with-linebreak.html
937
938         * rendering/HitTestResult.cpp:
939         (WebCore::HitTestLocation::HitTestLocation):
940         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
941         * rendering/HitTestResult.h:
942         (HitTestLocation):
943         * rendering/InlineFlowBox.cpp:
944         (WebCore::InlineFlowBox::nodeAtPoint):
945         * rendering/RenderInline.cpp:
946         (WebCore::RenderInline::hitTestCulledInline):
947         * rendering/RenderInline.h:
948         (RenderInline):
949
950 2012-11-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
951
952         REGRESSION(134887) [Qt][EFL][WK2] Repaint counter not working
953         https://bugs.webkit.org/show_bug.cgi?id=103261
954
955         Reviewed by Noam Rosenthal.
956
957         Fixed regression introduced in 134887, which introduced the
958         updateContentsNoSwizzle method and called it directly from
959         the repaint counter.
960
961         This method obviously needs to bind the texture.
962
963         * platform/graphics/texmap/TextureMapperGL.cpp:
964         (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
965
966 2012-11-27  Sheriff Bot  <webkit.review.bot@gmail.com>
967
968         Unreviewed, rolling out r135786.
969         http://trac.webkit.org/changeset/135786
970         https://bugs.webkit.org/show_bug.cgi?id=103379
971
972         It made 3 plugin tests timeout on several platforms (Requested
973         by Ossy on #webkit).
974
975         * CMakeLists.txt:
976         * GNUmakefile.list.am:
977         * Target.pri:
978         * WebCore.exp.in:
979         * WebCore.gypi:
980         * WebCore.vcproj/WebCore.vcproj:
981         * WebCore.xcodeproj/project.pbxproj:
982         * loader/FrameLoadRequest.cpp: Removed.
983         * loader/FrameLoadRequest.h:
984         (WebCore::FrameLoadRequest::FrameLoadRequest):
985         (FrameLoadRequest):
986         * loader/FrameLoader.cpp:
987         (WebCore::FrameLoader::load):
988         * loader/FrameLoader.h:
989         (FrameLoader):
990         * page/DragController.cpp:
991         (WebCore::DragController::performDrag):
992         * plugins/PluginView.cpp:
993         (WebCore::PluginView::performRequest):
994
995 2012-11-27  Kent Tamura  <tkent@chromium.org>
996
997         Implement ValidityState::badInput
998         https://bugs.webkit.org/show_bug.cgi?id=102861
999
1000         Reviewed by Hajime Morita.
1001
1002         Add ValidityState::badInput, add hasBadInput, which always returns
1003         false, to FormAssociatedElement, HTMLInputElement, and InputType.
1004
1005         For NumberInputType, we had hasUnacceptableValue, which was a hack to
1006         make an input element match to :invalid if the element had non-number
1007         strings. We don't need the hack any more because badInput affects :invalid
1008         style. hasUnacceptableValue is re-used for hasBadInput implementation.
1009         We cleared invalid numbers when elements lost focus to tell users that
1010         the element had invalid numbers. We don't need this behavior because the
1011         interactive validation tells it.
1012
1013         For date/time input types, we should make an input badInput when the
1014         input has empty value but its sub-fields have values. It covers both of
1015         partial input cases such as 12/--/2012 and invalid dates such as
1016         02/31/2012.
1017
1018         For other types, ValidityState::badInput always returns false.
1019
1020         This patch doesn't contain tests for badInput validation messages. They
1021         will be added later.
1022
1023         Tests: fast/forms/date-multiple-fields/date-multiple-fields-validity-badinput.html
1024                fast/forms/datetime-multiple-fields/datetime-multiple-fields-validity-badinput.html
1025                fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-validity-badinput.html
1026                fast/forms/month-multiple-fields/month-multiple-fields-validity-badinput.html
1027                fast/forms/number/number-validity-badinput.html
1028                fast/forms/time-multiple-fields/time-multiple-fields-validity-badinput.html
1029                fast/forms/week-multiple-fields/week-multiple-fields-validity-badinput.html
1030
1031         * html/ValidityState.idl: Add badInput IDL attribute.
1032         * html/ValidityState.h:
1033         (ValidityState): Add badInput.
1034         * html/ValidityState.cpp:
1035         (WebCore::ValidityState::badInput):
1036         Added. Calls FormAssociatedElement::hasBadInput.
1037
1038         * html/FormAssociatedElement.h:
1039         (FormAssociatedElement): Add hasBadInput.
1040         * html/FormAssociatedElement.cpp:
1041         (WebCore::FormAssociatedElement::hasBadInput):
1042         Added. It always returns false.
1043         (WebCore::FormAssociatedElement::valid): Takes account of hasBadInput().
1044
1045         * html/HTMLInputElement.h:
1046         (HTMLInputElement):
1047         Remove hasUnacceptableValue, and add hasBadInput override.
1048         * html/HTMLInputElement.cpp:
1049         (WebCore::HTMLInputElement::hasBadInput):
1050         Added. Delegate to InputType::hasBadInput.
1051         (WebCore): Remove hasUnacceptableValue.
1052
1053         * html/InputType.h:
1054         (InputType): Add hasBadInput and badInputText, and remove
1055         hasUnacceptableValue.
1056         * html/InputType.cpp:
1057         (WebCore::InputType::hasBadInput): Added. Returns false.
1058         (WebCore::InputType::badInputText):
1059         Added. This function should not be called because hasBadInput always
1060         returns false.
1061         (WebCore::InputType::validationMessage):
1062         Supports badInput. This returns badInputText if hasBadInput is true.
1063
1064         * html/NumberInputType.h:
1065         (NumberInputType): Add hasBadInput and badInputTest. Remove
1066         handleBlurEvent and hasUnacceptableValue.
1067         * html/NumberInputType.cpp:
1068         Remove handleBlurEvent, which cleared invalid number strings.
1069         (WebCore::NumberInputType::hasBadInput):
1070         Added. We don't need to check existence of a renderer. The standard form
1071         validation feature doesn't care of it.
1072         (WebCore::NumberInputType::badInputText): Returns
1073         validationMessageBadInputForNumberText defined in LocalizedStrings.h.
1074         * css/SelectorChecker.cpp:
1075         (WebCore::SelectorChecker::checkOneSelector):
1076         Remove a hack for hasUnacceptableValue. isValidFormControlElement takes
1077         account of badInput.
1078         * dom/Element.h: Remove hasUnacceptableValue.
1079
1080         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1081         (BaseMultipleFieldsDateAndTimeInputType): Add hasBadInput and badInputText.
1082         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1083         (WebCore::BaseMultipleFieldsDateAndTimeInputType::badInputText):
1084         Returns validationMessageBadInputForDateTimeText defined in LocalizedStrings.h.
1085         (WebCore::BaseMultipleFieldsDateAndTimeInputType::hasBadInput):
1086         Added.
1087         (WebCore::BaseMultipleFieldsDateAndTimeInputType::setValue):
1088         Add setNeedsValidityCheck call. It is needed because
1089         updateInnerTextValue can modify subfields empty state.
1090
1091         * html/TextFieldInputType.cpp:
1092         (WebCore::TextFieldInputType::subtreeHasChanged): Update a comment.
1093         * platform/LocalizedStrings.h:
1094         (WebCore): Add validationMessageBadInputForNumberText and
1095         validationMessageBadInputForDateTimeText.
1096         * platform/LocalizedStrings.cpp:
1097         (WebCore::validationMessageBadInputForNumberText):
1098         Added a placeholder implementation. This should be fixed later.
1099         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1100         (WebCore::validationMessageBadInputForNumberText): Ditto.
1101         * platform/efl/LocalizedStringsEfl.cpp:
1102         (WebCore::validationMessageBadInputForNumberText): Ditto.
1103         * platform/qt/LocalizedStringsQt.cpp:
1104         (WebCore::validationMessageBadInputForNumberText): Ditto.
1105
1106 2012-11-27  Hajime Morrita  <morrita@google.com>
1107
1108         [Refactoring] NodeFlags::IsShadowRootFlag should be Node::IsDocumentFragmentFlag
1109         https://bugs.webkit.org/show_bug.cgi?id=103370
1110
1111         Reviewed by Kentaro Hara.
1112
1113         This chagne introduces Node::IsDocumentFragmentFlag so that we can
1114         have fast Node::isDocumentFragment().
1115
1116         Note that Node::isShadowRoot() can become slightly slower when it
1117         returns true, but that is minor in terms of the number of calls at runtime.
1118
1119         No new tests. No behavior change.
1120
1121         * dom/DocumentFragment.cpp:
1122         (WebCore::DocumentFragment::create):
1123         * dom/DocumentFragment.h:
1124         * dom/Node.cpp:
1125         (WebCore::Node::documentFragmentIsShadowRoot):
1126         (WebCore):
1127         * dom/Node.h:
1128         (Node):
1129         (WebCore::Node::isDocumentFragment):
1130         (WebCore::Node::isShadowRoot):
1131         (WebCore::Node::parentNode):
1132         (WebCore::Node::parentNodeGuaranteedHostFree):
1133         * dom/ShadowRoot.h:
1134
1135 2012-11-26  Kent Tamura  <tkent@chromium.org>
1136
1137         :read-only selector should match to date/time input types
1138         https://bugs.webkit.org/show_bug.cgi?id=103350
1139
1140         Reviewed by Kentaro Hara.
1141
1142         We supported :read-only and :read-write only for text form controls;
1143         i.e. <textarea> and text-field <input>. According to [1], we should
1144         support them for date/time types. So, this patch removes
1145         isTextFormControl check in SelectorChecker, and just relies on
1146         shouldMatchRead{Only,Write}Selector virtual functions.
1147
1148         Tests: Update fast/forms/*/*-appearance-pseudo-classes.html.
1149
1150         [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
1151
1152         * css/SelectorChecker.cpp:
1153         (WebCore::SelectorChecker::checkOneSelector):
1154         Remove isFormControlElement check and isTextFormControl check.
1155
1156         * html/HTMLFormControlElement.cpp:
1157         Remove shouldMatchRead{Only,Write}Selector functions. We don't need
1158         common implementations any more.
1159         * html/HTMLFormControlElement.h: Ditto.
1160
1161         * html/HTMLTextAreaElement.h:
1162         (HTMLTextAreaElement): Add shouldMatchRead{Only,Write}Selector overrides.
1163         * html/HTMLTextAreaElement.cpp:
1164         (WebCore::HTMLTextAreaElement::shouldMatchReadOnlySelector): Added.
1165         (WebCore::HTMLTextAreaElement::shouldMatchReadWriteSelector): Added.
1166
1167         * html/HTMLInputElement.h:
1168         (HTMLInputElement): Add shouldMatchRead{Only,Write}Selector overrides.
1169         * html/HTMLInputElement.cpp:
1170         (WebCore::HTMLInputElement::shouldMatchReadOnlySelector):
1171         Added. This checks InputType::supportsReadOnly and readOnly.
1172         (WebCore::HTMLInputElement::shouldMatchReadWriteSelector): Ditto.
1173
1174         * html/InputType.h:
1175         (InputType): Add supportsReadOnly.
1176         * html/InputType.cpp:
1177         (WebCore::InputType::supportsReadOnly): Added. Returns false by default.
1178
1179         * html/BaseDateAndTimeInputType.h:
1180         (BaseDateAndTimeInputType): Add supportsReadOnly.
1181         * html/BaseDateAndTimeInputType.cpp:
1182         (WebCore::BaseDateAndTimeInputType::supportsReadOnly): Added. Returns true.
1183         * html/TextFieldInputType.h:
1184         (TextFieldInputType): Add supportsReadOnly.
1185         * html/TextFieldInputType.cpp:
1186         (WebCore::TextFieldInputType::supportsReadOnly): Added. Returns true.
1187
1188 2012-11-26  Sheriff Bot  <webkit.review.bot@gmail.com>
1189
1190         Unreviewed, rolling out r135822.
1191         http://trac.webkit.org/changeset/135822
1192         https://bugs.webkit.org/show_bug.cgi?id=103369
1193
1194         Undo the revert of r135818, since that change does not affect
1195         code used by Chromium (Requested by apavlov on #webkit).
1196
1197         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1198         (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
1199         (WebCore::GraphicsLayerTextureMapper::setContentsVisible):
1200
1201 2012-11-26  Michael Pruett  <michael@68k.org>
1202
1203         [GTK] Fix build error on GTK due to r135749
1204         https://bugs.webkit.org/show_bug.cgi?id=103365
1205
1206         Reviewed by Dean Jackson.
1207
1208         In r135749, many files which were already included
1209         in webcore_built_sources were erroneously added to
1210         webcore_svg_built_sources in GNUmakefile.list.am.
1211
1212         * GNUmakefile.list.am:
1213
1214 2012-11-26  Sheriff Bot  <webkit.review.bot@gmail.com>
1215
1216         Unreviewed, rolling out r135818.
1217         http://trac.webkit.org/changeset/135818
1218         https://bugs.webkit.org/show_bug.cgi?id=103368
1219
1220         platform/chromium/virtual/threaded/compositing/visibility
1221         /visibility-simple-webgl-layer.html crash on Mountain Lion
1222         (Requested by apavlov on #webkit).
1223
1224         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1225         (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
1226         (WebCore::GraphicsLayerTextureMapper::setContentsVisible):
1227
1228 2012-11-26  Huang Dongsung  <luxtella@company100.net>
1229
1230         Coordinated Graphics: Set visibility to a mask layer in GraphicsLayer::setContentsVisible().
1231         https://bugs.webkit.org/show_bug.cgi?id=103297
1232
1233         Reviewed by Noam Rosenthal.
1234
1235         GraphicsLayerTextureMapper and CoordinatedGraphicsLayer set the visibility of a
1236         mask layer in setContentsVisible() and setMaskLayer() like setting a size.
1237         This patch is needed because RenderLayerBacking does not set the visibility to a
1238         mask layer like the size.
1239
1240         This patch does not change user experience because an invisible layer is not
1241         rendered although the mask layer is rendered. In that sense, it is an
1242         optimization patch.
1243
1244         No new tests. It is an optimization patch.
1245
1246         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1247         (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
1248         (WebCore::GraphicsLayerTextureMapper::setContentsVisible):
1249
1250 2012-11-26  Kentaro Hara  <haraken@chromium.org>
1251
1252         [V8] Rename EXCEPTION_BLOCK() macros
1253         https://bugs.webkit.org/show_bug.cgi?id=103352
1254
1255         Reviewed by Adam Barth.
1256
1257         Since V8Parameter was renamed to V8StringResource,
1258         we rename macros that use V8Parameter.
1259
1260         EXCEPTION_BLOCK() => V8TRYCATCH()
1261         STRING_TO_V8PARAMETER_EXCEPTION_BLOCK() => V8TRYCATCH_FOR_V8STRINGRESOURCE()
1262         STRING_TO_V8PARAMETER_EXCEPTION_BLOCK_VOID() => V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID()
1263
1264         No tests. No change in behavior.
1265
1266         * bindings/scripts/CodeGeneratorV8.pm:
1267         (GenerateParametersCheck):
1268         (GenerateEventConstructorCallback):
1269         (ConvertToV8StringResource):
1270         * bindings/scripts/test/V8/V8Float64Array.cpp:
1271         (WebCore::Float64ArrayV8Internal::fooCallback):
1272         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1273         (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
1274         (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
1275         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1276         (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
1277         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1278         (WebCore::V8TestEventConstructor::constructorCallback):
1279         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1280         (WebCore::TestEventTargetV8Internal::itemCallback):
1281         (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
1282         * bindings/scripts/test/V8/V8TestInterface.cpp:
1283         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrSetter):
1284         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrSetter):
1285         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
1286         (WebCore::V8TestInterface::constructorCallback):
1287         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1288         (WebCore::TestMediaQueryListListenerV8Internal::methodCallback):
1289         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1290         (WebCore::V8TestNamedConstructorConstructorCallback):
1291         * bindings/scripts/test/V8/V8TestObj.cpp:
1292         (WebCore::TestObjV8Internal::staticStringAttrAttrSetter):
1293         (WebCore::TestObjV8Internal::stringAttrAttrSetter):
1294         (WebCore::TestObjV8Internal::reflectedStringAttrAttrSetter):
1295         (WebCore::TestObjV8Internal::reflectedURLAttrAttrSetter):
1296         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrSetter):
1297         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrSetter):
1298         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter):
1299         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
1300         (WebCore::TestObjV8Internal::longMethodWithArgsCallback):
1301         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
1302         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
1303         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
1304         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
1305         (WebCore::TestObjV8Internal::idbKeyCallback):
1306         (WebCore::TestObjV8Internal::optionsObjectCallback):
1307         (WebCore::TestObjV8Internal::methodWithOptionalArgCallback):
1308         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback):
1309         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
1310         (WebCore::TestObjV8Internal::methodWithOptionalStringCallback):
1311         (WebCore::TestObjV8Internal::methodWithOptionalStringIsUndefinedCallback):
1312         (WebCore::TestObjV8Internal::methodWithOptionalStringIsNullStringCallback):
1313         (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):
1314         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
1315         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
1316         (WebCore::TestObjV8Internal::overloadedMethod3Callback):
1317         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
1318         (WebCore::TestObjV8Internal::overloadedMethod6Callback):
1319         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
1320         (WebCore::TestObjV8Internal::overloadedMethod8Callback):
1321         (WebCore::TestObjV8Internal::overloadedMethod9Callback):
1322         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
1323         (WebCore::TestObjV8Internal::overloadedMethod11Callback):
1324         (WebCore::TestObjV8Internal::classMethodWithOptionalCallback):
1325         (WebCore::TestObjV8Internal::overloadedMethod12Callback):
1326         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
1327         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
1328         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
1329         (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
1330         (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
1331         (WebCore::TestObjV8Internal::stringArrayFunctionCallback):
1332         (WebCore::TestObjV8Internal::convert1Callback):
1333         (WebCore::TestObjV8Internal::convert2Callback):
1334         (WebCore::TestObjV8Internal::convert4Callback):
1335         (WebCore::TestObjV8Internal::convert5Callback):
1336         (WebCore::TestObjV8Internal::strictFunctionCallback):
1337         (WebCore::TestObjV8Internal::variadicStringMethodCallback):
1338         (WebCore::TestObjV8Internal::variadicDoubleMethodCallback):
1339         (WebCore::TestObjV8Internal::variadicNodeMethodCallback):
1340         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
1341         (WebCore::V8TestOverloadedConstructors::constructor1Callback):
1342         (WebCore::V8TestOverloadedConstructors::constructor2Callback):
1343         (WebCore::V8TestOverloadedConstructors::constructor3Callback):
1344         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
1345         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1346         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
1347         * bindings/v8/V8Binding.h:
1348         (WebCore::toV8Sequence):
1349         * bindings/v8/V8BindingMacros.h:
1350         * bindings/v8/custom/V8BlobCustom.cpp:
1351         (WebCore::V8Blob::constructorCallbackCustom):
1352         * bindings/v8/custom/V8ConsoleCustom.cpp:
1353         (WebCore::V8Console::profileCallback):
1354         (WebCore::V8Console::profileEndCallback):
1355         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1356         (WebCore::handlePostMessageCallback):
1357         * bindings/v8/custom/V8DataViewCustom.cpp:
1358         (WebCore::V8DataView::getInt8Callback):
1359         (WebCore::V8DataView::getUint8Callback):
1360         (WebCore::V8DataView::setInt8Callback):
1361         (WebCore::V8DataView::setUint8Callback):
1362         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1363         (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallback):
1364         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1365         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
1366         * bindings/v8/custom/V8DocumentCustom.cpp:
1367         (WebCore::V8Document::evaluateCallback):
1368         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1369         (WebCore::V8HTMLOptionsCollection::addCallback):
1370         * bindings/v8/custom/V8HistoryCustom.cpp:
1371         (WebCore::V8History::pushStateCallback):
1372         (WebCore::V8History::replaceStateCallback):
1373         * bindings/v8/custom/V8IntentCustom.cpp:
1374         (WebCore::V8Intent::constructorCallbackCustom):
1375         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
1376         (WebCore::V8SQLTransaction::executeSqlCallback):
1377         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
1378         (WebCore::V8SQLTransactionSync::executeSqlCallback):
1379         * bindings/v8/custom/V8SVGLengthCustom.cpp:
1380         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
1381         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1382         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
1383         * bindings/v8/custom/V8WorkerContextCustom.cpp:
1384         (WebCore::V8WorkerContext::importScriptsCallback):
1385
1386 2012-11-26  Andreas Kling  <akling@apple.com>
1387
1388         Node: Move AreSVGAttributesValidFlag to ElementAttributeData.
1389         <http://webkit.org/b/103349>
1390
1391         Reviewed by Anders Carlsson.
1392
1393         Moved AreSVGAttributesValidFlag to ElementAttributeData and change it to use "dirty" semantics.
1394         This frees up a bit on Node, and we will always have ElementAttributeData if the animated
1395         attributes are dirty anyway.
1396
1397         * dom/Element.cpp:
1398         (WebCore::Element::getAttribute):
1399         * dom/Element.h:
1400         (WebCore::Element::updateInvalidAttributes):
1401         * dom/ElementAttributeData.cpp:
1402         (WebCore::ElementAttributeData::ElementAttributeData):
1403         * dom/ElementAttributeData.h:
1404         (WebCore::ElementAttributeData::ElementAttributeData):
1405         (ElementAttributeData):
1406         * dom/Node.h:
1407         (Node):
1408         * svg/SVGElement.cpp:
1409         (WebCore::SVGElement::updateAnimatedSVGAttribute):
1410         * svg/SVGElement.h:
1411         (WebCore::SVGElement::invalidateSVGAttributes):
1412
1413 2012-11-26  Sheriff Bot  <webkit.review.bot@gmail.com>
1414
1415         Unreviewed, rolling out r135798.
1416         http://trac.webkit.org/changeset/135798
1417         https://bugs.webkit.org/show_bug.cgi?id=103354
1418
1419         Broke the chrome mac build (Requested by noel_ on #webkit).
1420
1421         * platform/graphics/chromium/DeferredImageDecoder.cpp:
1422         (WebCore::DeferredImageDecoder::~DeferredImageDecoder):
1423         (WebCore::DeferredImageDecoder::createResizedLazyDecodingBitmap):
1424         (WebCore::DeferredImageDecoder::frameBufferAtIndex):
1425         (WebCore::DeferredImageDecoder::createLazyDecodingBitmap):
1426         * platform/graphics/chromium/DeferredImageDecoder.h:
1427         (DeferredImageDecoder):
1428         * platform/graphics/chromium/ImageDecodingStore.cpp:
1429         (WebCore::ImageDecodingStore::instanceOnMainThread):
1430         (WebCore::ImageDecodingStore::initializeOnMainThread):
1431         (WebCore::ImageDecodingStore::shutdown):
1432         (WebCore::ImageDecodingStore::calledOnValidThread):
1433         (WebCore::ImageDecodingStore::lookupFrameCache):
1434         (WebCore::ImageDecodingStore::deleteFrameCache):
1435         * platform/graphics/chromium/ImageDecodingStore.h:
1436         (WebCore):
1437         (ImageDecodingStore):
1438         * platform/graphics/chromium/ImageFrameGenerator.cpp:
1439         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
1440         (WebCore::ImageFrameGenerator::~ImageFrameGenerator):
1441         (WebCore::ImageFrameGenerator::setData):
1442         (WebCore::ImageFrameGenerator::decodeAndScale):
1443         * platform/graphics/chromium/ImageFrameGenerator.h:
1444         (WebCore):
1445         (WebCore::ImageFrameGenerator::create):
1446         (ImageFrameGenerator):
1447         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
1448         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
1449         (WebCore::LazyDecodingPixelRef::onLockPixels):
1450         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
1451         * platform/graphics/chromium/LazyDecodingPixelRef.h:
1452         (WebCore):
1453         (LazyDecodingPixelRef):
1454         * platform/graphics/chromium/ScaledImageFragment.cpp:
1455         (WebCore::ScaledImageFragment::ScaledImageFragment):
1456         (WebCore::ScaledImageFragment::isEqual):
1457         (WebCore):
1458         * platform/graphics/chromium/ScaledImageFragment.h:
1459         (WebCore):
1460         (WebCore::ScaledImageFragment::create):
1461         (ScaledImageFragment):
1462         * platform/graphics/chromium/SkSizeHash.h: Removed.
1463
1464 2012-11-26  Huang Dongsung  <luxtella@company100.net>
1465
1466         [TexMap] GraphicsLayerTextureMapper::setSize() sets the size of a mask layer.
1467         https://bugs.webkit.org/show_bug.cgi?id=103297
1468
1469         Reviewed by Noam Rosenthal.
1470
1471         Currently, CoordinatedGraphicsLayer sets the size of a mask layer in setSize()
1472         and setMaksLayer(). GraphicsLayerTextureMapper follows the behavior. If so we
1473         don't have to check the size of the mask layer in TextureMapperLayer::flushCompositingState().
1474
1475         No new tests. Covered by existing tests.
1476
1477         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1478         (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
1479         (WebCore::GraphicsLayerTextureMapper::setSize):
1480         * platform/graphics/texmap/TextureMapperLayer.cpp:
1481         (WebCore::TextureMapperLayer::flushCompositingState):
1482
1483 2012-11-26  Kentaro Hara  <haraken@chromium.org>
1484
1485         [V8] Remove V8Parameter::object()
1486         https://bugs.webkit.org/show_bug.cgi?id=103340
1487
1488         Reviewed by Adam Barth.
1489
1490         V8Parameter can use m_v8Object directly.
1491
1492         No tests. No change in behavior.
1493
1494         * bindings/v8/V8StringResource.h:
1495         (WebCore::::prepare):
1496
1497 2012-11-26  Kentaro Hara  <haraken@chromium.org>
1498
1499         [V8] Rename V8Parameter to V8StringResource
1500         https://bugs.webkit.org/show_bug.cgi?id=103341
1501
1502         Reviewed by Adam Barth.
1503
1504         We can rename V8Parameter to V8StringResource. In a follow-up patch,
1505         I will rename macros around V8Parameter.
1506
1507         No tests. No change in behavior.
1508
1509         * bindings/scripts/CodeGeneratorV8.pm:
1510         (GenerateNormalAttrGetter):
1511         (GenerateNormalAttrSetter):
1512         (GenerateParametersCheck):
1513         (GenerateEventConstructorCallback):
1514         (GetNativeTypeFromSignature):
1515         (GetNativeType):
1516         (ConvertToV8StringResource):
1517         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1518         (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
1519         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1520         (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
1521         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1522         (WebCore::V8TestEventConstructor::constructorCallback):
1523         * bindings/scripts/test/V8/V8TestInterface.cpp:
1524         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrSetter):
1525         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrSetter):
1526         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
1527         (WebCore::V8TestInterface::constructorCallback):
1528         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1529         (WebCore::V8TestNamedConstructorConstructorCallback):
1530         * bindings/scripts/test/V8/V8TestObj.cpp:
1531         (WebCore::TestObjV8Internal::staticStringAttrAttrSetter):
1532         (WebCore::TestObjV8Internal::stringAttrAttrSetter):
1533         (WebCore::TestObjV8Internal::reflectedStringAttrAttrSetter):
1534         (WebCore::TestObjV8Internal::reflectedURLAttrAttrSetter):
1535         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrSetter):
1536         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrSetter):
1537         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter):
1538         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
1539         (WebCore::TestObjV8Internal::longMethodWithArgsCallback):
1540         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
1541         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
1542         (WebCore::TestObjV8Internal::methodWithOptionalStringCallback):
1543         (WebCore::TestObjV8Internal::methodWithOptionalStringIsUndefinedCallback):
1544         (WebCore::TestObjV8Internal::methodWithOptionalStringIsNullStringCallback):
1545         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
1546         (WebCore::TestObjV8Internal::overloadedMethod3Callback):
1547         (WebCore::TestObjV8Internal::overloadedMethod11Callback):
1548         (WebCore::TestObjV8Internal::overloadedMethod12Callback):
1549         (WebCore::TestObjV8Internal::strictFunctionCallback):
1550         (WebCore::TestObjV8Internal::variadicStringMethodCallback):
1551         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
1552         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
1553         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1554         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
1555         * bindings/v8/V8StringResource.h:
1556         (WebCore::V8StringResource::V8StringResource):
1557         (WebCore::::prepare):
1558         * bindings/v8/custom/V8ConsoleCustom.cpp:
1559         (WebCore::V8Console::profileCallback):
1560         (WebCore::V8Console::profileEndCallback):
1561         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1562         (WebCore::handlePostMessageCallback):
1563         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1564         (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallback):
1565         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1566         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
1567         * bindings/v8/custom/V8HistoryCustom.cpp:
1568         (WebCore::V8History::pushStateCallback):
1569         (WebCore::V8History::replaceStateCallback):
1570         * bindings/v8/custom/V8IntentCustom.cpp:
1571         (WebCore::V8Intent::constructorCallbackCustom):
1572         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
1573         (WebCore::V8SQLTransaction::executeSqlCallback):
1574         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
1575         (WebCore::V8SQLTransactionSync::executeSqlCallback):
1576         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1577         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
1578
1579 2012-11-26  Andreas Kling  <akling@apple.com>
1580
1581         HTMLOptionElement: Remove two unused members.
1582         <http://webkit.org/b/103337>
1583
1584         Reviewed by Kent Tamura.
1585
1586         Remove two unused members from HTMLOptionElement, m_value and m_label.
1587         40kB progression on Membuster3.
1588
1589         * html/HTMLOptionElement.h:
1590         (HTMLOptionElement):
1591
1592 2012-11-26  Stephen White  <senorblanco@chromium.org>
1593
1594         [Chromium] Shared graphics context should only pushGroupMarker() once
1595         https://bugs.webkit.org/show_bug.cgi?id=103082
1596
1597         Reviewed by James Robinson.
1598
1599         GraphicsContext3D's pushGroupMarkerEXT() is being called every time
1600         an ImageBuffer is created, leading to unlimited memory growth, since
1601         they share a common GraphicsContext3D.  It should be called only once,
1602         on context creation.
1603
1604         Tested by manually checking the memory usage in Chrome's TaskManager.
1605         (Sorry, I can't think of a way to test this automatically.)
1606
1607         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
1608         (WebCore::SharedGraphicsContext3DImpl::getOrCreateContext):
1609         * platform/graphics/skia/ImageBufferSkia.cpp:
1610         (WebCore::createAcceleratedCanvas):
1611
1612 2012-11-26  Kentaro Hara  <haraken@chromium.org>
1613
1614         [V8] Remove WorkerContextExecutionProxy.{h,cpp}
1615         https://bugs.webkit.org/show_bug.cgi?id=103325
1616
1617         Reviewed by Adam Barth.
1618
1619         Now WorkerContextExecutionProxy.{h,cpp} are empty.
1620
1621         No tests. No change in behavior.
1622
1623         * UseV8.cmake:
1624         * WebCore.gypi:
1625         * bindings/v8/ScheduledAction.cpp:
1626         * bindings/v8/V8AbstractEventListener.cpp:
1627         * bindings/v8/V8DOMWrapper.cpp:
1628         * bindings/v8/V8WorkerContextEventListener.h:
1629         (WebCore):
1630         * bindings/v8/WorkerContextExecutionProxy.cpp: Removed.
1631         * bindings/v8/WorkerContextExecutionProxy.h: Removed.
1632         * bindings/v8/WorkerScriptController.cpp:
1633         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
1634         * bindings/v8/custom/V8MessageChannelCustom.cpp:
1635         * bindings/v8/custom/V8MessagePortCustom.cpp:
1636         * bindings/v8/custom/V8WorkerCustom.cpp:
1637         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1638
1639 2012-11-26  Michael Saboff  <msaboff@apple.com>
1640
1641         Grapheme cluster functions can be simplified for 8 bit Strings
1642         https://bugs.webkit.org/show_bug.cgi?id=102996
1643
1644         Reviewed by Alexey Proskuryakov.
1645
1646         For 8 bit strings, check for the uncommon CR-LF by looking for any CR.  If there aren't any CR characters,
1647         the number of Extended Grapheme Clusters is equal to the string length.  If we need to handle Tailored
1648         Graheme Clusters, then this will need to change.
1649
1650         No new tests. No change in functionality.
1651
1652         * platform/text/TextBreakIterator.cpp:
1653         (WebCore::numGraphemeClusters):
1654         (WebCore::numCharactersInGraphemeClusters):
1655
1656 2012-11-26  Istiaque Ahmed  <lazyboy@chromium.org>
1657
1658         Check for empty perContextData while creating NP V8 Object.
1659         https://bugs.webkit.org/show_bug.cgi?id=98448
1660
1661         Reviewed by Adam Barth.
1662
1663         Fixes crash in npCreateV8ScriptObject(), if NP Invoke is called from a document
1664         that is no longer displayed in frame (isCurrentlyDisplayedInFrame() ==
1665         false), we have empty perContextData and this results in invalid memory access.
1666
1667         Test: platform/chromium/plugins/empty-per-context-data.html
1668
1669         * bindings/v8/NPV8Object.cpp:
1670         (WebCore::npCreateV8ScriptObject):
1671
1672 2012-11-26  Michael Saboff  <msaboff@apple.com>
1673
1674         HTML/XML parser helper unconsumeCharacters() can push back 8 bit text as 16 bit text
1675         https://bugs.webkit.org/show_bug.cgi?id=103317
1676
1677         Reviewed by Oliver Hunt.
1678
1679         Changed to use the String directly from the StringBuilder instead of creating our own.
1680         Used toStringPreserveCapacity() in case the caller may want to add to the StringBuilder
1681         even though current callers don't.
1682
1683         No new tests. No change in functionality.
1684
1685         * xml/parser/CharacterReferenceParserInlines.h:
1686         (WebCore::unconsumeCharacters):
1687
1688 2012-11-26  Noel Gordon  <noel.gordon@gmail.com>
1689
1690         PNG decode performance: avoid using frame buffer.setRGBA(x,y)
1691         https://bugs.webkit.org/show_bug.cgi?id=103216
1692
1693         Reviewed by Brent Fulgham.
1694
1695         Writing decoded row pixels to the frame buffer with buffer.setRGBA(x,y) is slow compared
1696         to writing direct to the frame buffer address. Use buffer.getAddr() to obtain the output
1697         pixel row address, write the decoded row pixels to that address.
1698
1699         No new tests. Covered by many existing tests.
1700
1701         * platform/image-decoders/ImageDecoder.h:
1702         (WebCore::ImageFrame::setRGBA): Make routine setRGBA(PixelData* dest, ...) public. Test
1703         m_premultiplyAlpha once to minimize code branching in this routine.
1704         * platform/image-decoders/png/PNGImageDecoder.cpp:
1705         (WebCore::PNGImageDecoder::rowAvailable): Write decoded row pixels to the frame buffer
1706         using the pixel address form: buffer.setRGBA(address++, ...).
1707
1708 2012-11-26  Alpha Lam  <hclam@chromium.org>
1709
1710         [chromium] Implement full-featured image cache
1711         https://bugs.webkit.org/show_bug.cgi?id=99784
1712
1713         Reviewed by James Robinson.
1714
1715         Implement a thread-safe image cache to be used with deferred image
1716         decoding. Image cache can now be accessed on any thread.
1717
1718         The patch implements the following logic:
1719         1. Mutex to protect all cache operations.
1720         2. Cache indexing using key (ImageFrameGenerator*, SkISize scaledSize)
1721         3. Cache lookup.
1722         4. Cache insertion.
1723         5. Generation of cache entry by scaling full size image.
1724         6. Generation of cache entries by decoding and scaling.
1725
1726         Classes involved:
1727
1728         ImageDecodingStore
1729
1730         Responsible for owning cache entries and indexing. Pruning and memory
1731         management will be added later.
1732
1733         ImageFrameGenerator
1734
1735         Responsible for generating new cache enties and insert them into
1736         ImageDecodingStore.
1737
1738         LazyDecodingPixelRef
1739
1740         Responsible for cache lookup and lazy generation of cache entries
1741         using ImageFrameGenerator. There is a mutex to protect concurrent
1742         lock operations.
1743
1744         These items are not implemented in this patch:
1745         1. Cache pruning.
1746         2. Setting cache memory limit.
1747         3. Cache deletion.
1748         4. Caching incomplete images and ImageDecoder.
1749
1750         Unit tests added in ImageFrameGeneratorTest.cpp.
1751         Layout tests are under platform/chromium/virtual/fast/images.
1752
1753         * platform/graphics/chromium/DeferredImageDecoder.cpp:
1754         (WebCore::DeferredImageDecoder::~DeferredImageDecoder):
1755         (WebCore::DeferredImageDecoder::createResizedLazyDecodingBitmap):
1756         (WebCore::DeferredImageDecoder::setEnabled):
1757         (WebCore):
1758         (WebCore::DeferredImageDecoder::frameBufferAtIndex):
1759         (WebCore::DeferredImageDecoder::createLazyDecodingBitmap):
1760         * platform/graphics/chromium/DeferredImageDecoder.h:
1761         (DeferredImageDecoder):
1762         * platform/graphics/chromium/ImageDecodingStore.cpp:
1763         (WebCore::ImageDecodingStore::instance):
1764         (WebCore::ImageDecodingStore::initializeOnce):
1765         (WebCore::ImageDecodingStore::shutdown):
1766         (WebCore::ImageDecodingStore::lockCompleteCache):
1767         Lookup complete cache entry using hash key, increment use count.
1768         (WebCore::ImageDecodingStore::lockIncompleteCache): TODO.
1769         (WebCore::ImageDecodingStore::unlockCache):
1770         Lookup cache entry using hash key, decrement use count.
1771         (WebCore):
1772         (WebCore::ImageDecodingStore::insertAndLockCache):
1773         Insert new cache entry and increment use count.
1774         (WebCore::ImageDecodingStore::prune): TODO.
1775         * platform/graphics/chromium/ImageDecodingStore.h:
1776         (WebCore):
1777         (ImageDecodingStore):
1778         (WebCore::ImageDecodingStore::CacheEntry::create):
1779         (WebCore::ImageDecodingStore::CacheEntry::createAndUse):
1780         (CacheEntry):
1781         (WebCore::ImageDecodingStore::CacheEntry::CacheEntry):
1782         (WebCore::ImageDecodingStore::CacheEntry::~CacheEntry):
1783         * platform/graphics/chromium/ImageFrameGenerator.cpp:
1784         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
1785         (WebCore::ImageFrameGenerator::setData):
1786         (WebCore::ImageFrameGenerator::decodeAndScale):
1787         Method for creating new cache entries. This is protected by a mutex
1788         to prevent concurrent operations. Which means only one thread can
1789         generate new cache entries for a set of encoded data.
1790         (WebCore):
1791         (WebCore::ImageFrameGenerator::tryToLockCache):
1792         Tries to lookup a cache entry.
1793         (WebCore::ImageFrameGenerator::tryToScale):
1794         Tries to lookup a full size cache entry and generate a scaled version.
1795         (WebCore::ImageFrameGenerator::tryToDecodeAndScale):
1796         Tries to decode and scale.
1797         * platform/graphics/chromium/ImageFrameGenerator.h:
1798         (WebCore):
1799         (ImageDecoderFactory):
1800         (WebCore::ImageFrameGenerator::create):
1801         (ImageFrameGenerator):
1802         (WebCore::ImageFrameGenerator::setImageDecoderFactoryForTesting):
1803         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
1804         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
1805         (WebCore::LazyDecodingPixelRef::onLockPixels):
1806         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
1807         * platform/graphics/chromium/LazyDecodingPixelRef.h:
1808         (WebCore):
1809         (LazyDecodingPixelRef):
1810         * platform/graphics/chromium/ScaledImageFragment.cpp:
1811         (WebCore::ScaledImageFragment::ScaledImageFragment):
1812         * platform/graphics/chromium/ScaledImageFragment.h:
1813         (WebCore):
1814         (WebCore::ScaledImageFragment::create):
1815         (ScaledImageFragment):
1816         (WebCore::ScaledImageFragment::scaledSize):
1817         * platform/graphics/chromium/SkSizeHash.h: Added.
1818         (WTF):
1819
1820 2012-11-26  Andreas Kling  <akling@apple.com>
1821
1822         Node: Remove IsSynchronizingSVGAttributesFlag.
1823         <http://webkit.org/b/103328>
1824
1825         Reviewed by Antti Koivisto.
1826
1827         Animated SVG attributes used to be synchronized by using DOM API which could use unwanted re-entrancy
1828         via callbacks below Element::attributeChanged(). The "is synchronizing SVG attributes" flag was used
1829         to protect against such re-entrancy.
1830
1831         These days, lazy attributes are synchronized using Element::setSynchronizedLazyAttribute() to avoid
1832         issues like this. The flag does nothing, so we can just remove it.
1833
1834         * dom/Node.h:
1835         (WebCore):
1836         * svg/SVGElement.cpp:
1837         (WebCore::SVGElement::attributeChanged):
1838         (WebCore::SVGElement::updateAnimatedSVGAttribute):
1839
1840 2012-11-26  Kentaro Hara  <haraken@chromium.org>
1841
1842         [V8] Refactor WorkerScriptController
1843         https://bugs.webkit.org/show_bug.cgi?id=103330
1844
1845         Reviewed by Adam Barth.
1846
1847         r135703 just moved methods from WorkerContextExecutionProxy
1848         to WorkerScriptController. We should refactor the methods as a follow-up.
1849
1850         No tests. No change in behavior.
1851
1852         * bindings/v8/WorkerScriptController.cpp:
1853         (WebCore::WorkerScriptController::~WorkerScriptController):
1854         (WebCore::WorkerScriptController::disposeContext):
1855         (WebCore::WorkerScriptController::initializeContextIfNeeded):
1856         (WebCore::WorkerScriptController::evaluate):
1857         (WebCore::WorkerScriptController::disableEval):
1858         * bindings/v8/WorkerScriptController.h:
1859         (WorkerScriptController):
1860
1861 2012-11-26  Varun Jain  <varunjain@chromium.org>
1862
1863         LongPress and LongTap gestures should start drag/drop and open context menu respectively.
1864         https://bugs.webkit.org/show_bug.cgi?id=101545
1865
1866         Reviewed by Antonio Gomes.
1867
1868         For LongPress, we simulate drag by sending a mouse down and mouse drag
1869         events. If a drag is not started (because maybe there is no draggable
1870         element), then we show context menu instead (which is the current
1871         behavior for LongPress). For LongTap, we use the existing functions that
1872         LongPress uses to summon the context menu. LongPress initiated drag and
1873         drop can be enabled/disabled by the platform using the Setting
1874         touchDragDropEnabled which is disabled by default.
1875
1876         Tests: fast/events/touch/gesture/context-menu-on-long-tap.html
1877                fast/events/touch/gesture/long-press-on-draggable-element-triggers-drag.html
1878
1879         * page/EventHandler.cpp:
1880         (WebCore::EventHandler::EventHandler):
1881         (WebCore::EventHandler::clear):
1882         (WebCore::EventHandler::handleMouseDraggedEvent):
1883         (WebCore::EventHandler::handleGestureEvent):
1884         (WebCore::EventHandler::handleGestureLongPress):
1885         (WebCore::EventHandler::handleGestureLongTap):
1886         (WebCore):
1887         (WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
1888         (WebCore::EventHandler::adjustGesturePosition):
1889         (WebCore::EventHandler::handleDrag):
1890         * page/EventHandler.h:
1891         (EventHandler):
1892         * page/Settings.in:
1893
1894 2012-11-26  Andreas Kling  <akling@apple.com>
1895
1896         RenderStyle: Move 'list-style-image' to rare inherited data.
1897         <http://webkit.org/b/103300>
1898
1899         Reviewed by Antti Koivisto.
1900
1901         list-style-image is not nearly common enough to merit a spot in StyleInheritedData.
1902         Move it to StyleRareInheritedData.
1903
1904         134kB progression on Membuster3.
1905
1906         * rendering/style/RenderStyle.cpp:
1907         (WebCore::RenderStyle::diff):
1908         (WebCore::RenderStyle::listStyleImage):
1909         (WebCore::RenderStyle::setListStyleImage):
1910         * rendering/style/StyleInheritedData.cpp:
1911         (WebCore::StyleInheritedData::StyleInheritedData):
1912         (WebCore::StyleInheritedData::operator==):
1913         * rendering/style/StyleInheritedData.h:
1914         (StyleInheritedData):
1915         * rendering/style/StyleRareInheritedData.h:
1916         * rendering/style/StyleRareInheritedData.cpp:
1917         (SameSizeAsStyleRareInheritedData):
1918         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1919         (WebCore::StyleRareInheritedData::operator==):
1920
1921 2012-11-26  James Simonsen  <simonjam@chromium.org>
1922
1923         Consolidate FrameLoader::load() into one function taking a FrameLoadRequest
1924         https://bugs.webkit.org/show_bug.cgi?id=102151
1925
1926         Reviewed by Adam Barth.
1927
1928         There's a FIXME that we have too many FrameLoader::load*() functions. This patch consolidates 3 into 1.
1929         There are still a few more load functions that will be consolidated later. Using FrameLoadRequest as
1930         the interface into FrameLoader will also provide a place to pass in the initiator. Finally, this matches
1931         the refactoring done with CachedResourceRequest and CachedResourceLoader.
1932
1933         No new tests. No change in functionality.
1934
1935         * WebCore.exp.in:
1936         * loader/FrameLoadRequest.h:
1937         (WebCore::FrameLoadRequest::FrameLoadRequest):
1938         (WebCore::FrameLoadRequest::setLockHistory): These are former arguments to load().
1939         (WebCore::FrameLoadRequest::lockHistory): Ditto.
1940         (FrameLoadRequest):
1941         (WebCore::FrameLoadRequest::setShouldCheckNewWindowPolicy): Ditto.
1942         (WebCore::FrameLoadRequest::shouldCheckNewWindowPolicy): Ditto.
1943         (WebCore::FrameLoadRequest::substituteData): Ditto.
1944         (WebCore::FrameLoadRequest::setSubstituteData): Ditto.
1945         (WebCore::FrameLoadRequest::hasSubstituteData): Ditto.
1946         * loader/FrameLoader.cpp:
1947         (WebCore::FrameLoader::load): No change in behavior, just merged it all into one function.
1948         * loader/FrameLoader.h:
1949         (FrameLoader):
1950         * page/DragController.cpp:
1951         (WebCore::DragController::performDrag):
1952
1953 2012-11-24 Genevieve Mak <gmak@rim.com>
1954
1955         [BlackBerry] Stop sending touch events to plugins.
1956         https://bugs.webkit.org/show_bug.cgi?id=103188
1957
1958         Reviewed by Rob Buis.
1959
1960         Reviewed internally by Jeff Rogers and Mike Lattanzio.
1961         No tests required.
1962         PR #248605
1963
1964         * plugins/blackberry/PluginViewBlackBerry.cpp:
1965         (WebCore::PluginView::handleTouchEvent):
1966         (WebCore::PluginView::handleMouseEvent):
1967
1968 2012-11-26  Adenilson Cavalcanti  <cavalcantii@gmail.com>
1969
1970         Removing unnecessary friend classes in RenderObject: LayoutRepainter, RenderSVGContainer
1971         https://bugs.webkit.org/show_bug.cgi?id=103164
1972
1973         Reviewed by Simon Fraser.
1974
1975         Removing some of classes marked as friend of RenderObject. This patch solves this issue
1976         for 2 classes: RenderSVGContainer (that is derived from RenderObject) and LayoutRepainter
1977         (that accesses one const member function in RenderObject that is now made public).
1978
1979         No new tests, no changes in functionality.
1980
1981         * rendering/RenderObject.h:
1982         (RenderObject):
1983         (WebCore::RenderObject::outlineBoundsForRepaint):
1984
1985 2012-11-26  Jon Lee  <jonlee@apple.com>
1986
1987         Pass clicks through to the restarted plugin
1988         https://bugs.webkit.org/show_bug.cgi?id=102150
1989         <rdar://problem/12695575>
1990
1991         Reviewed by Simon Fraser.
1992
1993         Add a new state to the machine for plugin snapshotting, called PlayingWithPendingMouseClick.
1994         This represents the state where the plugin is playing, but before the pending mouse click
1995         has been fired. Once the click is sent, the plugin state transitions to Playing. For
1996         situations where the plugin just runs normally without a simulated click, the plugin state
1997         jumps from DisplayingSnapshot straight to Playing, as before.
1998
1999         * html/HTMLPlugInElement.h: Add new display state to represent when the plugin is running,
2000         but a pending mouse click is about to be sent to the plugin.
2001         (WebCore::HTMLPlugInElement::dispatchPendingMouseClick): Called by the plugin when it is
2002         ok for the element to send the pending mouse click.
2003         * html/HTMLPlugInElement.cpp:
2004         (WebCore::HTMLPlugInElement::defaultEventHandler): Update the handler to pass the event
2005         to the renderer to handle if the state is before PlayingWithPendingMouseClick.
2006
2007         * html/HTMLPlugInImageElement.h:
2008         * html/HTMLPlugInImageElement.cpp: Add a click timer to delay the mouse click so that the
2009         plugin has some time to initialize.
2010         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initialize the mouse timer.
2011         (WebCore::HTMLPlugInImageElement::setPendingClickEvent): Keep track of the click event
2012         the user made to restart the plugin.
2013         (WebCore::HTMLPlugInImageElement::dispatchPendingMouseClick): Start the timer.
2014         (WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired): When the timer fires,
2015         dispatch the simulated click, with mouse over, mouse down, and mouse up events. Transition
2016         to the Playing state, and we no longer need the click event.
2017
2018         * rendering/RenderSnapshottedPlugIn.cpp: Change the threshold state to PlayingWithPendingMouseClick
2019         instead of Playing, since that is the earliest state where the plugin is playing.
2020         (WebCore::RenderSnapshottedPlugIn::paint):
2021         (WebCore::RenderSnapshottedPlugIn::paintReplaced):
2022         (WebCore::RenderSnapshottedPlugIn::getCursor):
2023         (WebCore::RenderSnapshottedPlugIn::handleEvent): If the user clicked on the button, jump to
2024         Playing, and don't send a simulated click. Otherwise, transition to PlayingWithPendingMouseClick,
2025         and keep track of that mouse event.
2026
2027         * WebCore.exp.in: Export MouseRelatedEvent::offsetX() and offsetY().
2028
2029 2012-11-26  Dan Carney  <dcarney@google.com>
2030
2031         Refactor V8 bindings to allow content scripts to access subframes
2032         https://bugs.webkit.org/show_bug.cgi?id=93646
2033
2034         Reviewed by Adam Barth.
2035
2036         Isolated window shells are now initialized on the fly
2037         as needed.
2038
2039         No new tests. Existing test modified.
2040
2041         * bindings/v8/DOMWrapperWorld.cpp:
2042         (WebCore::DOMWrapperWorld::ensureIsolatedWorld):
2043         * bindings/v8/DOMWrapperWorld.h:
2044         (WebCore::DOMWrapperWorld::createdFromUnitializedWorld):
2045         (DOMWrapperWorld):
2046         * bindings/v8/ScriptController.cpp:
2047         (WebCore::ScriptController::currentWorldContext):
2048
2049 2012-11-26  Alex Christensen  <alex.christensen@flexsim.com>
2050
2051         clipboardwin compile error for win64
2052         https://bugs.webkit.org/show_bug.cgi?id=94124
2053
2054         Reviewed by Brent Fulgham.
2055
2056         The clipboard utilities code uses std::min with one unsigned int parameter and one size_t parameter.
2057         This causes a problem when compiling for 64-bit Windows because the two types are not the same size.
2058         To resolve this issue, we specify the template type as the type the return value is being cast into
2059
2060         Fixed a few compile errors for Windows x64 by specifying template parameters.
2061
2062         * platform/win/ClipboardUtilitiesWin.cpp:
2063         (WebCore::setFileDescriptorData): Specify the types for the std::min macro to avoid compiler errors
2064         under 64-bit builds.
2065
2066 2012-11-26  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2067
2068         [GTK] GtkSocket is leaked until webview is destroyed.
2069         https://bugs.webkit.org/show_bug.cgi?id=102564
2070
2071         Reviewed by Martin Robinson.
2072
2073         Remove GtkSocket from its parent when pluginview is destroyed. Then,
2074         the GtkSocket and it's possible child widgets are realeased when it is
2075         no more needed.
2076
2077         No new tests, already covered by existing tests.
2078
2079         * plugins/gtk/PluginViewGtk.cpp:
2080         (WebCore::PluginView::platformDestroy):
2081
2082 2012-11-26  Luke Macpherson   <macpherson@chromium.org>
2083
2084         Make StyleResolver::applyProperty use isInherit in CSSPropertyWebkitMarquee instead of calculating equivalent in-place.
2085         https://bugs.webkit.org/show_bug.cgi?id=102446
2086
2087         Reviewed by Tony Chang.
2088
2089         !m_parentNode || !value->isInheritedValue() is equivalent to !isInherit (by De Morgan's law).
2090
2091         No new tests / code is provably equivalent.
2092
2093         * css/StyleResolver.cpp:
2094         (WebCore::StyleResolver::applyProperty):
2095
2096 2012-11-26  Pratik Solanki  <psolanki@apple.com>
2097
2098         Add ResourceBuffer::append(CFDataRef) to get code to compile with USE(NETWORK_CFDATA_ARRAY_CALLBACK)
2099         https://bugs.webkit.org/show_bug.cgi?id=102706
2100
2101         Reviewed by Brent Fulgham.
2102
2103         No new tests because the flag isn't enabled. Also the functionality should be covered by
2104         existing tests.
2105
2106         * loader/ResourceBuffer.cpp:
2107         (WebCore):
2108         (WebCore::ResourceBuffer::append):
2109         * loader/ResourceBuffer.h:
2110         (ResourceBuffer):
2111         * loader/mac/ResourceLoaderMac.mm:
2112
2113 2012-11-26  Tony Chang  <tony@chromium.org>
2114
2115         Move more functions from internals.settings to internals
2116         https://bugs.webkit.org/show_bug.cgi?id=102976
2117
2118         Reviewed by Adam Barth.
2119
2120         Move functions that don't have to do with Settings off of internals.settings.
2121         setPagination and configurationForViewport were defined on internals, so we
2122         can inline the functions (no test change).
2123
2124         setEnableMockPagePopup is moved to Internals.
2125
2126         No new tests, this is a refactor.
2127
2128         * testing/InternalSettings.cpp:
2129         (WebCore::InternalSettings::reset): Move reset code into Internals.
2130         * testing/InternalSettings.h:
2131         (InternalSettings): Remove code for setPagination, configurationForViewport and setEnableMockPagePopup.
2132         * testing/InternalSettings.idl: Remove setPagination and setEnableMockPagePopup.
2133         * testing/Internals.cpp:
2134         (WebCore): Use a static to keep track of the MockPagePopupDriver.
2135         (WebCore::Internals::resetToConsistentState): Code from InternalSettings::reset
2136         (WebCore::Internals::setEnableMockPagePopup): Code copied from InternalSettings.
2137         (WebCore::Internals::pagePopupController): Code copied from InternalSettings.
2138         (WebCore::Internals::setPagination): Code copied from InternalSettings.
2139         (WebCore::Internals::configurationForViewport): Code copied from InternalSettings.
2140         * testing/Internals.h:
2141         (Internals): Add setEnableMockPagePopup.
2142         * testing/Internals.idl: Add setEnableMockPagePopup.
2143
2144 2012-11-26  Andrei Bucur  <abucur@adobe.com>
2145
2146         [CSS Regions] Add Region info for RootLineBoxes and pack the pagination data
2147         https://bugs.webkit.org/show_bug.cgi?id=101332
2148
2149         Reviewed by David Hyatt.
2150
2151         Currently the pagination information for lines is spread between the RootInlineBox and InlineFlowBox classes, consuming memory even though
2152         the boxes were not the result of an pagination layout. To overcome this, a new struct (LineFragmentationData) is created that wraps all the data,
2153         including two new members, the containing Region for the line and a boolean that states if the line was laid out in a Region or not.
2154         The flag is necessary because the sanitize function on LineFragmentationData resets the containing Region to 0 if the Region was removed from
2155         chain (so a value of 0 for the containing Region means two things). The sanitize function should prevent access to an invalid address.
2156         The containing Region is used to detect if a line changed the Region where it resides. This will be helpful especially when implementing region
2157         styling for layout properties (e.g. the font-size property https://bugs.webkit.org/show_bug.cgi?id=95559 ).
2158         A line can change the region when it is shifted inside the containing block or if the entire block moves. This means it's better to delegate
2159         the task of updating the containing Region to the block.
2160
2161         Tests: fast/regions/line-containing-region-crash.html
2162
2163         * rendering/InlineFlowBox.cpp:
2164         (SameSizeAsInlineFlowBox):
2165         * rendering/InlineFlowBox.h:
2166         (WebCore::InlineFlowBox::InlineFlowBox):
2167         (InlineFlowBox):
2168         * rendering/RenderBlock.cpp:
2169         (WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
2170         * rendering/RenderBlockLineLayout.cpp:
2171         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
2172         (WebCore::RenderBlock::linkToEndLineIfNeeded):
2173         (WebCore::RenderBlock::determineStartPosition):
2174         * rendering/RootInlineBox.cpp:
2175         (WebCore::RootInlineBox::RootInlineBox):
2176         (WebCore::RootInlineBox::setContainingRegion):
2177         (WebCore):
2178         (WebCore::RootInlineBox::LineFragmentationData::sanitize): This is an O(1) function that checks if the containig Region is still valid pointer.
2179         * rendering/RootInlineBox.h:
2180         (WebCore):
2181         (WebCore::RootInlineBox::paginationStrut):
2182         (WebCore::RootInlineBox::setPaginationStrut):
2183         (WebCore::RootInlineBox::isFirstAfterPageBreak):
2184         (WebCore::RootInlineBox::setIsFirstAfterPageBreak):
2185         (WebCore::RootInlineBox::paginatedLineWidth):
2186         (WebCore::RootInlineBox::setPaginatedLineWidth):
2187         (RootInlineBox):
2188         (WebCore::RootInlineBox::containingRegion):
2189         (WebCore::RootInlineBox::hasContainingRegion): Use this to determine if the line has a region or not.
2190         (WebCore::RootInlineBox::ensureLineFragmentationData):
2191         (LineFragmentationData):
2192         (WebCore::RootInlineBox::LineFragmentationData::LineFragmentationData):
2193
2194
2195 2012-11-26  Michelangelo De Simone  <michelangelo@webkit.org>
2196
2197         [CSS Shaders] Add IDL file and bindings for mix function
2198         https://bugs.webkit.org/show_bug.cgi?id=93011
2199
2200         Reviewed by Dean Jackson.
2201
2202         JavaScript bindings have been added for the Custom Filter mix()
2203         function (WebKitCSSMixFunctionValue). As of now, this is only a
2204         placeholder that extends CSSValueList without adding any new
2205         property.
2206
2207         Test: css3/filters/custom/custom-filter-mix-bindings.html
2208
2209         * CMakeLists.txt: mix() IDL has been added to the Generator;
2210         DerivedSources have been included.
2211         * DerivedSources.cpp: Ditto.
2212         * DerivedSources.make: Ditto.
2213         * DerivedSources.pri: Ditto.
2214         * GNUmakefile.list.am: Ditto.
2215         * WebCore.gypi: Ditto.
2216         * WebCore.vcproj/WebCore.vcproj: Ditto.
2217         * WebCore.xcodeproj/project.pbxproj: Ditto.
2218         * bindings/js/JSCSSValueCustom.cpp:
2219         (WebCore::toJS): return a JSC DOM wrapper for WebKitCSSMixFunctionValue.
2220         * bindings/v8/custom/V8CSSValueCustom.cpp:
2221         (WebCore::V8CSSValue::dispatchWrapCustom): Ditto, for V8.
2222         * css/WebKitCSSMixFunctionValue.idl: Added.
2223
2224 2012-11-26  Simon Fraser  <simon.fraser@apple.com>
2225
2226         Optimize layer updates after scrolling
2227         https://bugs.webkit.org/show_bug.cgi?id=102635
2228
2229         Reviewed by Sam Weinig.
2230
2231         updateLayerPositionsAfterScroll() previously unconditionally cleared clip
2232         rects, and recomputed repaint rects too often. Recomputing both of these
2233         can be very expensive, as they involve tree walks up to the root.
2234         
2235         We can optimize layer updates after document scrolling by only clearing clip
2236         rects, and recomputing repaint rects, if we encounter a fixed- or sticky-position
2237         element. For overflow scroll, we have to clear clip rects and recompute repaint rects.
2238
2239         * page/FrameView.cpp:
2240         (WebCore::FrameView::repaintFixedElementsAfterScrolling): Call updateLayerPositionsAfterDocumentScroll().
2241         * rendering/RenderLayer.cpp:
2242         (WebCore::RenderLayer::updateLayerPositions): Call clearClipRects() because
2243         updateLayerPosition() no longer does.
2244         (WebCore::RenderLayer::updateLayerPositionsAfterDocumentScroll): Version of updateLayerPositionsAfterScroll()
2245         that is for document scrolls. It has no need to push layers to the geometry map.
2246         (WebCore::RenderLayer::updateLayerPositionsAfterOverflowScroll): Pushes layers to the geometry map,
2247         and calls updateLayerPositionsAfterScroll() with the IsOverflowScroll flag.
2248         (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Set the HasChangedAncestor flag
2249         if our location changed, and use that as a hint to clear cached rects. Be more conservative
2250         than before about when to clear cached clip rects.
2251         (WebCore::RenderLayer::updateLayerPosition):  Move responsibility for calling
2252         clearClipRects() ouf of this function and into callers.
2253         (The one caller outside RenderLayer will be removed via bug 102624).
2254         Return a bool indicating whether our position changed.
2255         (WebCore::RenderLayer::scrollTo): Call updateLayerPositionsAfterOverflowScroll().
2256         (WebCore::RenderLayer::updateClipRects): Added some #ifdeffed out code that is useful
2257         to verify that cached clips are correct; it's too slow to leave enabled in debug builds.
2258         * rendering/RenderLayer.h:
2259         (WebCore::RenderLayer::setLocation): Change to take a LayoutPoint, rather than separate
2260         x and y.
2261
2262 2012-11-26  Rafael Brandao  <rafael.lobo@openbossa.org>
2263
2264         [Cairo] Surface should not be destroyed before its usage
2265         https://bugs.webkit.org/show_bug.cgi?id=103273
2266
2267         Reviewed by Brent Fulgham.
2268
2269         * platform/graphics/texmap/TextureMapperGL.cpp:
2270         (WebCore::TextureMapperGL::drawRepaintCounter): There's some calls to get
2271         the bits and stride from surface right after its destructions. It should
2272         be postponed to avoid annoying bugs.
2273
2274 2012-11-26  Julien Chaffraix  <jchaffraix@webkit.org>
2275
2276         RenderBox::computePercentageLogicalHeight should use containingBlockLogicalWidthForContent
2277         https://bugs.webkit.org/show_bug.cgi?id=103075
2278
2279         Reviewed by Ojan Vafai.
2280
2281         Using the containing block's content logical block was working for most renderers but 2 renderers
2282         were special and were broken in orthogonal writing modes:
2283         - captions as they override containingBlockLogicalWidthForContent to return the table's logical width.
2284         - multi-column renderers as they override availableLogicalWidth to constrain the child to the column logical width.
2285
2286         By switching to containingBlockLogicalWidthForContent, we got those 2 cases covered.
2287
2288         Tests: fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode.html
2289                fast/table/caption-orthogonal-writing-mode-sizing.html
2290
2291         * rendering/RenderBox.cpp:
2292         (WebCore::RenderBox::computePercentageLogicalHeight):
2293         Updated the function to track which renderer's containing block we use and call
2294         containingBlockLogicalWidthForContent on it.
2295
2296 2012-11-26  Abhishek Arya  <inferno@chromium.org>
2297
2298         Crash in Frame::dispatchVisibilityStateChangeEvent.
2299         https://bugs.webkit.org/show_bug.cgi?id=102053
2300
2301         Reviewed by Adam Barth.
2302
2303         Child frame can go away inside webkitvisibilitychange
2304         event handler. Store it in a ref counted vector.
2305
2306         Test: fast/frames/page-visibility-crash.html
2307
2308         * page/Frame.cpp:
2309         (WebCore::Frame::dispatchVisibilityStateChangeEvent):
2310
2311 2012-11-26  Hurnjoo Lee  <hurnjoo.lee@samsung.com>
2312
2313         [Cairo] fillRectWithColor with Color::transparent doesn't perform anything
2314         https://bugs.webkit.org/show_bug.cgi?id=101911
2315
2316         Reviewed by Kenneth Rohde Christiansen.
2317
2318         fillRectWithColor with Color::transparent doesn't perform anything
2319         because fillRectWithColor does early-return if the alpha value of
2320         color is zero. But we expect that fill the rect with transparent color
2321         in case the cairo_operator is CAIRO_OPERATOR_SOURCE.
2322
2323         Covered by existing tests.
2324
2325         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2326         (WebCore::fillRectWithColor):Add condition to prevent early-return if
2327         cairo_operator is not CAIRO_OPERATOR_OVER
2328
2329 2012-11-26  Jae Hyun Park  <jae.park@company100.net>
2330
2331         Remove redundant assignment in TextureMapperLayer::flushCompositingStateSelf
2332         https://bugs.webkit.org/show_bug.cgi?id=103233
2333
2334         Reviewed by Noam Rosenthal.
2335
2336         This patch removes redundant assignment in TextureMapperLayer::flushCompositingStateSelf.
2337
2338         No new tests, because no change in bahavior.
2339
2340         * platform/graphics/texmap/TextureMapperLayer.cpp:
2341         (WebCore::TextureMapperLayer::flushCompositingStateSelf):
2342
2343 2012-11-26  Tamas Czene  <tczene@inf.u-szeged.hu>
2344
2345         OpenCL version of SourceAlpha, SourceGraphics and FETurbulence filter effects 
2346         https://bugs.webkit.org/show_bug.cgi?id=99829
2347
2348         Reviewed by Zoltan Herczeg.
2349
2350         This patch contains the OpenCL implementation of SourceAlpha, SourceGraphic, FETurbulence and a simple OpenCL environment. 
2351         At the moment only the Qt build system is supported 
2352         ~3x speed-up (depending on hardware configuration)
2353
2354         * Target.pri:
2355         * WebCore.pri:
2356         * platform/graphics/filters/FETurbulence.h: Added platformApplyOpenCL() virtual function.
2357         (FETurbulence):
2358         * platform/graphics/filters/FilterEffect.cpp: Added platform specific apply.
2359         (WebCore::FilterEffect::apply):
2360         (WebCore):
2361         (WebCore::FilterEffect::platformApplyOpenCL): A function to use software computing if a filter is not implemented on OpenCL. It will be deleted after all of the filters are implemented.
2362         (WebCore::FilterEffect::clearResult):
2363         (WebCore::FilterEffect::asImageBuffer):
2364         (WebCore::FilterEffect::openCLImageToImageBuffer): Gets the result of the filter from the OpenCL device and converts it to ImageBuffer type.
2365         (WebCore::FilterEffect::createOpenCLImageResult): Allocates memory on OpenCL device and if it gets an image as a parameter, it uploads the image to the OpenCL device.
2366         (WebCore::FilterEffect::transformResultColorSpace): 
2367         * platform/graphics/filters/FilterEffect.h:
2368         (FilterEffect):
2369         (WebCore::FilterEffect::openCLImage):
2370         (WebCore::FilterEffect::setOpenCLImage):
2371         (WebCore::FilterEffect::hasResult):
2372         * platform/graphics/filters/SourceAlpha.h:
2373         (SourceAlpha):
2374         * platform/graphics/filters/SourceGraphic.h:
2375         (SourceGraphic):
2376         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp: Added.
2377         (WebCore):
2378         (WebCore::FilterContextOpenCL::context): Configures the OpenCL environment.
2379         (WebCore::FilterContextOpenCL::createOpenCLImage): Allocates memory on OpenCL device.
2380         (WebCore::FilterContextOpenCL::openCLTransformColorSpace): OpenCL implementation of transformColorSpace.
2381         (WebCore::FilterContextOpenCL::compileProgram):
2382         * platform/graphics/gpu/opencl/FilterContextOpenCL.h: Added.
2383         (WebCore):
2384         (FilterContextOpenCL):
2385         (WebCore::FilterContextOpenCL::deviceId):
2386         (WebCore::FilterContextOpenCL::deviceContext):
2387         (WebCore::FilterContextOpenCL::commandQueue):
2388         (RunKernel):
2389         (WebCore::FilterContextOpenCL::RunKernel::RunKernel):
2390         (WebCore::FilterContextOpenCL::RunKernel::addArgument):
2391         (WebCore::FilterContextOpenCL::RunKernel::run):
2392         (WebCore::FilterContextOpenCL::kernelByName): Returns the reference of a function in the OpenCL program.
2393         * platform/graphics/gpu/opencl/OpenCLFESourceAlpha.cpp: Added.
2394         (WebCore):
2395         (WebCore::SourceAlpha::platformApplyOpenCL):
2396         * platform/graphics/gpu/opencl/OpenCLFESourceGraphic.cpp: Added.
2397         (WebCore):
2398         (WebCore::SourceGraphic::platformApplyOpenCL):
2399         * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp: Added.
2400         (WebCore):
2401         (WebCore::FilterContextOpenCL::compileFETurbulence):
2402         (WebCore::FilterContextOpenCL::applyFETurbulence):
2403         (WebCore::FETurbulence::platformApplyOpenCL):
2404         * platform/graphics/gpu/opencl/OpenCLHandle.h: Added.
2405         (WebCore):
2406         (OpenCLHandle):
2407         (WebCore::OpenCLHandle::OpenCLHandle):
2408         (WebCore::OpenCLHandle::operator cl_mem):
2409         (WebCore::OpenCLHandle::operator=):
2410         (WebCore::OpenCLHandle::operator UnspecifiedBoolType):
2411         (WebCore::OpenCLHandle::handleAddress):
2412         (WebCore::OpenCLHandle::clear):
2413
2414 2012-11-26  'Pavel Feldman'  <pfeldman@chromium.org>
2415
2416         Not reviewed: follow up for r135720, fixing node highlight.
2417
2418         * inspector/InspectorOverlayPage.html:
2419
2420 2012-11-26  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
2421
2422         [EFL] Crashes in compositing layout tests with AC on.
2423         https://bugs.webkit.org/show_bug.cgi?id=103144
2424
2425         Reviewed by Noam Rosenthal.
2426
2427         Application could leave texture packing parameters in non-zero state before
2428         texture mapper drawing/texture uploading. To avoid crash texture upload should
2429         specify packing parameters before each texture upload if packing is supported.
2430
2431         Covered by existing tests.
2432
2433         * platform/graphics/texmap/TextureMapperGL.cpp:
2434         (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
2435
2436 2012-11-26  George Staikos  <staikos@webkit.org>
2437
2438         [BlackBerry] Remove a lot of unnecessary and incorrect code causing crashes
2439         https://bugs.webkit.org/show_bug.cgi?id=103199
2440
2441         Reviewed by Yong Li.
2442
2443         This is the first big step to unforking this code.  It's very close to
2444         where it needs to be now, but the first step is to get rid of the
2445         crashes by deleting code that isn't needed and makes bad assumptions
2446         about object lifetime.  Crashes were found by automation without
2447         test case or reproduction steps.
2448
2449         * loader/blackberry/CookieJarBlackBerry.cpp:
2450         (WebCore::cookies): delete most code
2451         (WebCore::setCookies): delete most code
2452
2453 2012-11-26  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2454
2455         Viewport CSS rules should not clamp values like Viewport META
2456         https://bugs.webkit.org/show_bug.cgi?id=103068
2457
2458         Reviewed by Kenneth Rohde Christiansen.
2459
2460         CSS Device Adaption does not clamp the length and zoom values the
2461         same way as the Viewport META. In fact, they are not clamped at all,
2462         but instead, we just make sure that length values are at least 1px.
2463
2464         Tests: css3/device-adapt/opera/constrain-018.xhtml
2465                css3/device-adapt/opera/constrain-019.xhtml
2466                css3/device-adapt/opera/constrain-023.xhtml
2467                css3/device-adapt/opera/constrain-024.xhtml
2468
2469         * dom/ViewportArguments.cpp:
2470         (WebCore::ViewportArguments::resolve):
2471
2472 2012-11-26  Mike West  <mkwst@chromium.org>
2473
2474         Web Inspector: URLs containing '^' are improperly linked in console messages.
2475         https://bugs.webkit.org/show_bug.cgi?id=103248
2476
2477         Reviewed by Yury Semikhatsky.
2478
2479         This patch adds '^' to WebInspector's regex of acceptable characters for
2480         URLs that it knows how to display.
2481
2482         Test: http/tests/inspector/network/script-as-text-loading-with-caret.html
2483
2484         * inspector/front-end/ResourceUtils.js:
2485         (WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
2486
2487 2012-11-26  Yury Semikhatsky  <yurys@chromium.org>
2488
2489         Unreviewed. Fix Qt minimal compilation after r135713.
2490
2491         * inspector/InspectorController.h: hid file content behind ENABLE(INSPECTOR)
2492
2493 2012-11-26  Pavel Feldman  <pfeldman@chromium.org>
2494
2495         Web Inspector: object preview does not render node id, className; logs too many functions for jQuery.
2496         https://bugs.webkit.org/show_bug.cgi?id=103222
2497
2498         Reviewed by Yury Semikhatsky.
2499
2500         - Added node class name and id into the preview
2501         - Now keeps track of properties separately from array indexes.
2502
2503         * inspector/InjectedScriptSource.js:
2504         (.):
2505         * inspector/InspectorOverlayPage.html:
2506         * inspector/front-end/ConsoleMessage.js:
2507         (WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
2508         (WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreview):
2509
2510 2012-11-26  Florin Malita  <fmalita@chromium.org>
2511
2512         RenderSVGResourceContainer does not clear cached data on removal
2513         https://bugs.webkit.org/show_bug.cgi?id=102620
2514
2515         Reviewed by Dirk Schulze.
2516
2517         RenderSVGResourceContainer::removeClient needs to also remove the client from specialized
2518         caches, otherwise we can end up with stale references.
2519
2520         Test: svg/custom/stale-resource-data-crash.svg
2521
2522         * rendering/svg/RenderSVGResourceContainer.cpp:
2523         (WebCore::RenderSVGResourceContainer::removeClient):
2524
2525 2012-11-26  'Pavel Feldman'  <pfeldman@chromium.org>
2526
2527         Not reviewed: rolling out r135714 and r135712 for breaking debug tests.
2528
2529         * inspector/InjectedScriptSource.js:
2530         (.):
2531         * inspector/InspectorOverlayPage.html:
2532         * inspector/front-end/ConsoleMessage.js:
2533         (WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
2534
2535 2012-11-26  Zeno Albisser  <zeno@webkit.org>
2536
2537         [Qt][Win] buildfix after r135706.
2538         https://bugs.webkit.org/show_bug.cgi?id=103249
2539
2540         The Windows implementation of GraphicsSurface cannot use
2541         m_size anymore, as this member has been removed.
2542         Further it needs to implement a platformSize() function.
2543
2544         Reviewed by Kenneth Rohde Christiansen.
2545
2546         * platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp:
2547         (WebCore::GraphicsSurfacePrivate::size):
2548         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
2549         (WebCore::GraphicsSurface::platformSize):
2550         (WebCore):
2551
2552 2012-11-26  Yury Semikhatsky  <yurys@chromium.org>
2553
2554         Web Inspector: unify agents handling in Page and Worker inspector controllers
2555         https://bugs.webkit.org/show_bug.cgi?id=103238
2556
2557         Reviewed by Alexander Pavlov.
2558
2559         Introduced a class that represents a collection of inspector agents and allows
2560         to call methods declared on InspectorAgentBaseInterface for all registered agents.
2561         InspectorController and WorkerInspectorController switched to this class.
2562
2563         * inspector/InspectorBaseAgent.cpp:
2564         (WebCore::InspectorAgentRegistry::append):
2565         (WebCore):
2566         (WebCore::InspectorAgentRegistry::setFrontend):
2567         (WebCore::InspectorAgentRegistry::clearFrontend):
2568         (WebCore::InspectorAgentRegistry::restore):
2569         (WebCore::InspectorAgentRegistry::registerInDispatcher):
2570         (WebCore::InspectorAgentRegistry::discardAgents):
2571         * inspector/InspectorBaseAgent.h:
2572         (InspectorAgentRegistry):
2573         (WebCore):
2574         * inspector/InspectorController.cpp:
2575         (WebCore::InspectorController::~InspectorController):
2576         (WebCore::InspectorController::connectFrontend):
2577         (WebCore::InspectorController::disconnectFrontend):
2578         (WebCore::InspectorController::reconnectFrontend):
2579         * inspector/InspectorController.h:
2580         (InspectorController):
2581
2582 2012-11-26  Pavel Feldman  <pfeldman@chromium.org>
2583
2584         Web Inspector: object preview does not render node id, className; logs too many functions for jQuery.
2585         https://bugs.webkit.org/show_bug.cgi?id=103222
2586
2587         Reviewed by Yury Semikhatsky.
2588
2589         - Added node class name and id into the preview
2590         - Now keeps track of properties separately from array indexes.
2591
2592         * inspector/InjectedScriptSource.js:
2593         (.):
2594         * inspector/InspectorOverlayPage.html:
2595         * inspector/front-end/ConsoleMessage.js:
2596         (WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
2597         (WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreview):
2598
2599 2012-11-26  Andrey Adaikin  <aandrey@chromium.org>
2600
2601         Web Inspector: [WebGL] Save WebGL extensions and restore on replay
2602         https://bugs.webkit.org/show_bug.cgi?id=103141
2603
2604         Reviewed by Yury Semikhatsky.
2605
2606         Save WebGL extensions that were enabled by the application, and restore it before the replay.
2607         Drive-by: remove redundant if- checks in WebGL custom function wrappers (similar to 2D canvas).
2608
2609         * inspector/InjectedScriptCanvasModuleSource.js:
2610         (.):
2611
2612 2012-11-26  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2613
2614         HitTestResult should not be a HitTestLocation
2615         https://bugs.webkit.org/show_bug.cgi?id=101590
2616
2617         Reviewed by Sam Weinig.
2618
2619         Change HitTestResult from being a HitTestLocation to having a HitTestLocation. 
2620         A result of a test should not be a special case of the location of the test.
2621
2622         No change in functionality. No new tests.
2623
2624         * rendering/HitTestResult.cpp:
2625         (WebCore::HitTestResult::HitTestResult):
2626         (WebCore::HitTestResult::operator=):
2627         (WebCore::HitTestResult::isSelected):
2628         (WebCore::HitTestResult::spellingToolTip):
2629         (WebCore::HitTestResult::replacedString):
2630         * rendering/HitTestResult.h:
2631         (WebCore::HitTestResult::isRectBasedTest):
2632         (WebCore::HitTestResult::pointInInnerNodeFrame):
2633         (WebCore::HitTestResult::hitTestLocation):
2634         (HitTestResult):
2635
2636 2012-11-26  Marja Hölttä  <marja@chromium.org>
2637
2638         Circular reference between Document and MediaQueryMatcher.
2639         https://bugs.webkit.org/show_bug.cgi?id=103242
2640
2641         Reviewed by Kenneth Rohde Christiansen.
2642
2643         It's not enough to clean up listeners in MediaQueryMatcher in ~Document,
2644         since MediaQueryListListener keeps the Document alive. This caused
2645         www.crbug.com/113983.
2646
2647         No new tests: No visible change in behavior (except that it doesn't leak memory).
2648
2649         * dom/Document.cpp:
2650         (WebCore::Document::~Document):
2651         (WebCore::Document::detach):
2652
2653 2012-11-26  Eugene Klyuchnikov  <eustas@chromium.org>
2654
2655         Web Inspector: HeapProfiler: remove snapshotView reference from data-grids.
2656         https://bugs.webkit.org/show_bug.cgi?id=103240
2657
2658         Reviewed by Yury Semikhatsky.
2659
2660         Cleanup: remove redundant dependency.
2661
2662         * inspector/front-end/HeapSnapshotDataGrids.js: Do not store view ref.
2663         * inspector/front-end/HeapSnapshotGridNodes.js:
2664         Removed unused assignments.
2665         * inspector/front-end/HeapSnapshotView.js:
2666         Do not pass self to data-grids.
2667
2668 2012-11-26  Zeno Albisser  <zeno@webkit.org>
2669
2670         GraphicsSurface should only store its size in a single place.
2671         https://bugs.webkit.org/show_bug.cgi?id=103143
2672
2673         Reviewed by Kenneth Rohde Christiansen.
2674
2675         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2676         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2677             Cosmetics only.
2678         * platform/graphics/surfaces/GraphicsSurface.cpp:
2679         (WebCore::GraphicsSurface::size):
2680             Return the size as received from the platform abstraction.
2681         (WebCore):
2682         (WebCore::GraphicsSurface::GraphicsSurface):
2683         * platform/graphics/surfaces/GraphicsSurface.h:
2684         (GraphicsSurface):
2685             Remove data member m_size.
2686         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
2687         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2688             Always take the size of the GraphicsSurface as an argument.
2689         (WebCore::GraphicsSurfacePrivate::size):
2690         (GraphicsSurfacePrivate):
2691         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
2692             Retrieve the size from GraphicsSurfacePrivate where necessary.
2693         (WebCore::GraphicsSurface::platformSize):
2694         (WebCore):
2695         (WebCore::GraphicsSurface::platformImport):
2696         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
2697         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2698             Add a constructor that takes a window id as an argument
2699             for the receiving side of the GraphcisSurface.
2700             The GraphicsSurface can then determine its dimensions
2701             from the provided XWindow.
2702         (WebCore::GraphicsSurfacePrivate::createPixmap):
2703         (WebCore::GraphicsSurfacePrivate::size):
2704             Query the size of the GraphicsSurface backing from X.
2705         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
2706             Retrieve the size from GraphicsSurfacePrivate where necessary.
2707         (WebCore::GraphicsSurface::platformSize):
2708         (WebCore):
2709         (WebCore::GraphicsSurface::platformImport):
2710
2711 2012-11-26  Thiago Santos  <thiago.sousa.santos@collabora.com>
2712
2713         [GStreamer] Floating reference handling fix
2714         https://bugs.webkit.org/show_bug.cgi?id=101349
2715
2716         Reviewed by Philippe Normand.
2717
2718         GStreamer 0.10 and 1.0 differ when creating GstGhostPad from pad
2719         templates, the 1.0 doesn't take ownership on the passed
2720         GstPadTemplate, while 0.10 does. So this patch adds a
2721         GStreamerVersioning function to handle this different approach
2722         transparently in Webkit gstreamer elements.
2723
2724         Existing media tests cover this change.
2725
2726         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
2727         (webkit_web_audio_src_init):
2728         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
2729         (webkitGstGhostPadFromStaticTemplate):
2730         * platform/graphics/gstreamer/GStreamerVersioning.h:
2731         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2732         (webkit_web_src_init):
2733
2734 2012-11-26  Kentaro Hara  <haraken@chromium.org>
2735
2736         [V8] Remove WorkerContextExecutionProxy
2737         https://bugs.webkit.org/show_bug.cgi?id=103210
2738
2739         Reviewed by Adam Barth.
2740
2741         This patch moves all methods in WorkerContextExecutionProxy
2742         to WorkerScriptController.
2743
2744         Due to the dependency between WorkerContextExecutionProxy's methods,
2745         it is a bit difficult to split this patch into pieces.
2746         This patch simply moves methods without changing their logic.
2747         Also this patch doesn't remove empty WorkerContextExecutionProxy.{h,cpp}
2748         to keep the diff sane. I will address these issues in a follow-up patch.
2749
2750         Tests: fast/worker/*
2751
2752         * bindings/v8/ScriptState.cpp:
2753         (WebCore::scriptStateFromWorkerContext):
2754         * bindings/v8/V8Binding.cpp:
2755         (WebCore::toV8Context):
2756         * bindings/v8/V8WorkerContextEventListener.cpp:
2757         (WebCore::V8WorkerContextEventListener::handleEvent):
2758         * bindings/v8/WorkerContextExecutionProxy.cpp:
2759         * bindings/v8/WorkerContextExecutionProxy.h:
2760         * bindings/v8/WorkerScriptController.cpp:
2761         (WebCore::WorkerScriptController::WorkerScriptController):
2762         (WebCore::WorkerScriptController::~WorkerScriptController):
2763         (WebCore::WorkerScriptController::dispose):
2764         (WebCore):
2765         (WebCore::WorkerScriptController::initializeIfNeeded):
2766         (WebCore::WorkerScriptController::evaluate):
2767         (WebCore::WorkerScriptController::setEvalAllowed):
2768         (WebCore::WorkerScriptController::disableEval):
2769         * bindings/v8/WorkerScriptController.h:
2770         (WebCore):
2771         (WebCore::WorkerContextExecutionState::WorkerContextExecutionState):
2772         (WorkerContextExecutionState):
2773         (WorkerScriptController):
2774         (WebCore::WorkerScriptController::context):
2775         * bindings/v8/WorkerScriptDebugServer.cpp:
2776         (WebCore::WorkerScriptDebugServer::addListener):
2777         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2778         (WebCore::SetTimeoutOrInterval):
2779         (WebCore::toV8):
2780
2781 2012-11-26  Hajime Morrita  <morrita@google.com>
2782
2783         [Refactoring] Some Node::isDescendant calls can be replaced with Node::contains()
2784         https://bugs.webkit.org/show_bug.cgi?id=103211
2785
2786         Reviewed by Daniel Bates.
2787
2788         A couple of call sites of isDescendant() does same as Node::contains().
2789         This change replaces these locations with Node::contains().
2790
2791         No new tests, no behavior change.
2792
2793         * dom/Node.cpp:
2794         (WebCore::checkAcceptChild):
2795         * dom/Range.cpp:
2796         (WebCore::Range::surroundContents):
2797
2798 2012-11-26  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2799
2800         [Chromium] Enable input type datetime-local
2801         https://bugs.webkit.org/show_bug.cgi?id=103213
2802
2803         Reviewed by Kent Tamura.
2804
2805         This patch enables <input type=datetime-local> for Chromium.
2806
2807         No new tests. Covered by existing tests.
2808
2809         * bindings/generic/RuntimeEnabledFeatures.cpp:
2810         (WebCore): Changed RuntimeEnabledFeatures::isInputTypeDateTimeLocalEnabled to true
2811         if INPUT_TYPE_DATETIMELOCAL is enabled.
2812
2813 2012-11-26  Hajime Morrita  <morrita@google.com>
2814
2815         [Shadow DOM] Implement Element::createShadowRoot()
2816         https://bugs.webkit.org/show_bug.cgi?id=102911
2817
2818         Reviewed by Kentaro Hara.
2819
2820         Added an API implementation and exposed it.
2821
2822         This is basically an alias of the ShadowRoot constructor, which
2823         will be removed as bug 102913.
2824
2825         Test: fast/dom/shadow/shadow-aware-create-shdow-root.html
2826
2827         * bindings/gobject/GNUmakefile.am:
2828         * dom/Element.cpp:
2829         (WebCore::Element::createShadowRoot):
2830         (WebCore):
2831         * dom/Element.h:
2832         (Element):
2833         * dom/Element.idl:
2834
2835 2012-11-26  Jon Lee  <jonlee@apple.com>
2836
2837         Extend EventDispatcher::dispatchSimulatedClick to allow sending a mouseover event
2838         https://bugs.webkit.org/show_bug.cgi?id=102610
2839         <rdar://problem/12725663>
2840
2841         Reviewed by Darin Adler.
2842
2843         Update the dispatchSimulatedClick() to take option enums for dispatching events.
2844
2845         * dom/SimulatedClickOptions.h: Added. Define two options enums. One tracks which mouse
2846         events to send. The other determines whether to force the element to repaint.
2847
2848         * dom/EventDispatcher.cpp:
2849         (WebCore::EventDispatcher::dispatchSimulatedClick): Refactor to use the option enums.
2850         * dom/EventDispatcher.h:
2851         (EventDispatcher): Update function signature.
2852
2853         * dom/Node.cpp: Refactor parameters to use the options enums rather than booleans.
2854         (WebCore::Node::dispatchSimulatedClick):
2855         * dom/Node.h:
2856
2857         Refactor. Remove redundant comments.
2858         * html/BaseCheckableInputType.cpp:
2859         (WebCore::BaseCheckableInputType::accessKeyAction):
2860         * html/BaseClickableWithKeyInputType.cpp:
2861         (WebCore::BaseClickableWithKeyInputType::accessKeyAction):
2862         * html/HTMLAnchorElement.cpp:
2863         (WebCore::HTMLAnchorElement::accessKeyAction):
2864         * html/HTMLButtonElement.cpp:
2865         (WebCore::HTMLButtonElement::accessKeyAction):
2866         * html/HTMLElement.cpp:
2867         (WebCore::HTMLElement::click):
2868         (WebCore::HTMLElement::accessKeyAction):
2869         * html/HTMLSelectElement.cpp:
2870         (WebCore::HTMLSelectElement::accessKeyAction):
2871         * html/RadioInputType.cpp:
2872         (WebCore::RadioInputType::handleKeydownEvent):
2873         * html/RangeInputType.cpp:
2874         (WebCore::RangeInputType::accessKeyAction):
2875
2876         Add SimulatedClickOptions.h.
2877         * GNUmakefile.list.am:
2878         * Target.pri:
2879         * WebCore.gypi:
2880         * WebCore.vcproj/WebCore.vcproj:
2881         * WebCore.xcodeproj/project.pbxproj:
2882
2883 2012-11-26  Shinya Kawanaka  <shinyak@chromium.org>
2884
2885         [Shadow] Attaching children of a shadow host takes O(N^2) where N is the number of host children
2886         https://bugs.webkit.org/show_bug.cgi?id=103017
2887
2888         Reviewed by Hajime Morita.
2889
2890         Since ContentDistribution was just a Vector, ContentDistribution::find() took O(N). Each child of shadow host calls it.
2891         As a result, attaching children of shadow host takes O(N^2) at all.
2892
2893         In this patch, we make ContentDistribution::find() O(1) amortizedly. We introduce HashMap from a Node to Vector index,
2894         and use it for ContentDistribution::find().
2895
2896         No new tests, covered by existing tests.
2897
2898         * html/shadow/ContentDistributor.cpp:
2899         (WebCore::ContentDistribution::swap):
2900         (WebCore):
2901         (WebCore::ContentDistribution::append):
2902         (WebCore::ContentDistribution::find):
2903         (WebCore::ContentDistributor::distributeSelectionsTo):
2904         * html/shadow/ContentDistributor.h:
2905         (ContentDistribution): ContentDistribution now contains Vector and a reverse map.
2906         (WebCore::ContentDistribution::first):
2907         (WebCore::ContentDistribution::last):
2908         (WebCore::ContentDistribution::at):
2909         (WebCore::ContentDistribution::size):
2910         (WebCore::ContentDistribution::isEmpty):
2911         (WebCore::ContentDistribution::clear):
2912         (WebCore::ContentDistribution::contains):
2913         (WebCore::ContentDistribution::nodes):
2914
2915 2012-11-26  Dan Carney  <dcarney@google.com>
2916
2917         [V8] Give isolated shells a lifecycle like that of main shells
2918         https://bugs.webkit.org/show_bug.cgi?id=96522
2919
2920         Reviewed by Adam Barth.
2921
2922         Refactored the isolated shells in ScriptController
2923         to be cleaned up the same way the main shell is.
2924
2925         No new tests. No change in functionality.
2926
2927         * bindings/v8/ScriptController.cpp:
2928         (WebCore::ScriptController::~ScriptController):
2929         (WebCore::ScriptController::clearForOutOfMemory):
2930         (WebCore::ScriptController::clearForClose):
2931         (WebCore::ScriptController::clearWindowShell):
2932         * bindings/v8/ScriptController.h:
2933         (ScriptController):
2934         * bindings/v8/V8DOMWindowShell.cpp:
2935         (WebCore::V8DOMWindowShell::destroyIsolatedShell):
2936         (WebCore::V8DOMWindowShell::clearForClose):
2937         * bindings/v8/V8DOMWindowShell.h:
2938         (V8DOMWindowShell):
2939
2940 2012-11-25  Sheriff Bot  <webkit.review.bot@gmail.com>
2941
2942         Unreviewed, rolling out r135656.
2943         http://trac.webkit.org/changeset/135656
2944         https://bugs.webkit.org/show_bug.cgi?id=103218
2945
2946         Made a few SVG tests crash on all platforms (Requested by
2947         apavlov on #webkit).
2948
2949         * css/CSSComputedStyleDeclaration.cpp:
2950         (WebCore::valueForFamily):
2951         * css/CSSValuePool.cpp:
2952         (WebCore::CSSValuePool::createFontFamilyValue):
2953
2954 2012-11-25  Takashi Sakamoto  <tasak@google.com>
2955
2956         WebCore::RenderBlock::determineStartPosition crash
2957         https://bugs.webkit.org/show_bug.cgi?id=98993
2958
2959         Reviewed by Brent Fulgham.
2960
2961         If we move some node and the node has some text,
2962         InlineFlowBox::removeChild() is invoked. The method invokes
2963         RootInlineBox::childRemoved(). childRemoved() checks whether the
2964         removed inlinebox has the renderer of its parent's line break object.
2965         If so, use setLineBreakInfo to make the parent's line break info to
2966         be 0. However in RenderBlock::determineStartPosition(), the code
2967         assume that all line break info is solved, i.e.
2968         prevRootBox->lineBreakObj()->isText(). Since lineBreakObj() returns 0
2969         because of removeChild(), determineStartPosition crash occurs.
2970
2971         Test: fast/inline/inline-box-append-child-crash.html
2972
2973         * rendering/RenderBlockLineLayout.cpp:
2974         (WebCore::RenderBlock::determineStartPosition):
2975         Checks whether lineBreakObj() is 0 or not before using lineBreakObj().
2976
2977 2012-11-25  Nikita Vasilyev  <me@elv1s.ru>
2978
2979         Web Inspector: use native Element.prototype.normalize instead of custom defined Element.prototype.pruneEmptyTextNodes
2980         https://bugs.webkit.org/show_bug.cgi?id=103205
2981
2982         Reviewed by Pavel Feldman.
2983
2984         * inspector/front-end/DOMExtension.js:
2985         * inspector/front-end/TextPrompt.js:
2986         (WebInspector.TextPrompt.prototype.clearAutoComplete):
2987         (WebInspector.TextPrompt.prototype._completionsReady):
2988         (WebInspector.TextPrompt.prototype.applySuggestion):
2989
2990 2012-11-25  Nikita Vasilyev  <me@elv1s.ru>
2991
2992         Web Inspector: remove unused DOM methods
2993         https://bugs.webkit.org/show_bug.cgi?id=103204
2994
2995         Reviewed by Pavel Feldman.
2996
2997         * inspector/front-end/DOMExtension.js:
2998
2999 2012-11-25  Nikita Vasilyev  <me@elv1s.ru>
3000
3001         Web Inspector: Remove unused Array.convert method
3002         https://bugs.webkit.org/show_bug.cgi?id=103202
3003
3004         Reviewed by Daniel Bates.
3005
3006         * inspector/front-end/utilities.js:
3007
3008 2012-11-25  Chris Fleizach  <cfleizach@apple.com>
3009
3010         AX: file upload input cannot be activated with VoiceOver
3011         https://bugs.webkit.org/show_bug.cgi?id=100343
3012
3013         Reviewed by Sam Weinig.
3014
3015         Simulated events were not allowed to be processed in the file input type in the DOMActivate handler.
3016         This was a problem for accessibility clients which rely on simulated events.
3017
3018         The solution is to mark the UserGestureIndicator as definitely processing an event.
3019
3020         Test: accessibility/file-upload-button-with-axpress.html
3021
3022         * accessibility/AccessibilityObject.cpp:
3023         (WebCore::AccessibilityObject::press):
3024
3025 2012-11-25  Nikita Vasilyev  <me@elv1s.ru>
3026
3027         Web Inspector: dispatch an event upon heap snapshot filter change
3028         https://bugs.webkit.org/show_bug.cgi?id=103201
3029
3030         Reviewed by Pavel Feldman.
3031
3032         Dispatch heapSnapshotFilterChanged event so it can be received by third parties.
3033
3034         * inspector/front-end/HeapSnapshotView.js:
3035         (WebInspector.HeapSnapshotView.prototype._changeFilter):
3036         * inspector/front-end/UserMetrics.js:
3037
3038 2012-11-25  Kent Tamura  <tkent@chromium.org>
3039
3040         Refactoring: Move the content of HTMLInputElement::subtreeHasChanged to TextFieldInputType
3041         https://bugs.webkit.org/show_bug.cgi?id=103195
3042
3043         Reviewed by Kentaro Hara.
3044
3045         HTMLInputElement::subtreeHasChanged is called only if the input is
3046         a text field. The code should be moved to TextFieldInputType.
3047
3048         No new tests. This should not change any behavior.
3049
3050         * html/HTMLInputElement.cpp:
3051         - Remove unnecessary NumberInputType.h inclusion.
3052         - Remove convertFromVisibleValue. It was used only by subtreeHasChanged.
3053         (WebCore::HTMLInputElement::subtreeHasChanged):
3054         Move the code to TextFieldInputType::subtreeHasChanged except
3055         calculateAndAdjustDirectionality, which is a protected member of
3056         HTMLElement.
3057         * html/HTMLInputElement.h:
3058         (HTMLInputElement): Remove convertFromVisibleValue.
3059
3060         * html/InputType.cpp:
3061         Move convertFromVisibleValue to TextFieldInputType.
3062         (WebCore::InputType::subtreeHasChanged):
3063         Add ASSERT_NOT_REACHED.
3064         * html/InputType.h:
3065         (InputType): Remove convertFromVisibleValue.
3066
3067         * html/TextFieldInputType.cpp:
3068         (WebCore::TextFieldInputType::convertFromVisibleValue):
3069         Moved from InputType.
3070         (WebCore::TextFieldInputType::subtreeHasChanged):
3071         Moved from HTMLInputElement. A latter part is moved to
3072         didSetValueByUserEdit to be hooked by SearchInputType.
3073         (WebCore::TextFieldInputType::didSetValueByUserEdit):
3074         Moved from HTMLInputElement::subtreeHasChanged, and clean up the code.
3075         * html/TextFieldInputType.h:
3076         (TextFieldInputType):
3077         - Move convertFromVisibleValue from InputType.
3078         - Add didSetValueByUserEdit and subtreeHasChanged.
3079
3080         * html/SearchInputType.cpp:
3081         (WebCore::SearchInputType::didSetValueByUserEdit):
3082         Renamed from subtreeHasChanged, and calls TextFieldInputType::didSetValueByUserEdit.
3083         * html/SearchInputType.h:
3084         (SearchInputType): Rename subtreeHasChanged to didSetValueByUserEdit.
3085
3086 2012-11-22  Kentaro Hara  <haraken@chromium.org>
3087
3088         [V8] Move WorkerExecutionContextProxy::initializeIfNeeded() to V8Initializer
3089         https://bugs.webkit.org/show_bug.cgi?id=103061
3090
3091         Reviewed by Adam Barth.
3092
3093         This is an incremental step to remove WorkerExecutionContextProxy.
3094         This patch moves WorkerExecutionContextProxy::initializeIfNeeded() to V8Initializer.
3095         This patch also renames methods so that the names become consistent
3096         between the main thread and workers.
3097
3098         No tests. No change in behavior.
3099
3100         * bindings/v8/V8Initializer.cpp:
3101         (WebCore::reportFatalErrorInMainThread):
3102         (WebCore::messageHandlerInMainThread):
3103         (WebCore::failedAccessCheckCallbackInMainThread):
3104         (WebCore::V8Initializer::initializeMainThreadIfNeeded):
3105         (WebCore::reportFatalErrorInWorker):
3106         (WebCore):
3107         (WebCore::messageHandlerInWorker):
3108         (WebCore::V8Initializer::initializeWorkerIfNeeded):
3109         * bindings/v8/V8Initializer.h:
3110         (V8Initializer):
3111         * bindings/v8/WorkerContextExecutionProxy.cpp:
3112         (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy):
3113         * bindings/v8/WorkerContextExecutionProxy.h:
3114         (WorkerContextExecutionProxy):
3115
3116 2012-11-25  Christophe Dumez  <christophe.dumez@intel.com>
3117
3118         [EFL] Refactor RenderThemeEfl::ThemePartCacheEntry::reuse()
3119         https://bugs.webkit.org/show_bug.cgi?id=103189
3120
3121         Reviewed by Kenneth Rohde Christiansen.
3122
3123         Check if the entry size and type changed in
3124         RenderThemeEfl::ThemePartCacheEntry::reuse() to avoid
3125         useless processing if one of them did not change.
3126
3127         Remove useless call to cairo_surface_finish() since
3128         we are using a smart pointer for the surface.
3129
3130         Resize the edge object *after* loading its content
3131         from the theme file as it seems more logical this
3132         way.
3133
3134         No new tests, no behavior change for layout tests.
3135
3136         * platform/efl/RenderThemeEfl.cpp:
3137         (WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse):
3138         * platform/efl/RenderThemeEfl.h:
3139         (ThemePartCacheEntry):
3140
3141 2012-11-25  Ryosuke Niwa  <rniwa@webkit.org>
3142
3143         Rename DynamicNodeList to LiveNodeList
3144         https://bugs.webkit.org/show_bug.cgi?id=103197
3145
3146         Reviewed by Ojan Vafai.
3147
3148         Rename DynamicNodeList to LiveNodeList to match the terminology used in DOM4 working draft:
3149         http://www.w3.org/TR/2012/WD-dom-20120405/#concept-collection-live
3150         "A collection (either NodeList or HTMLCollection) can be either live or static".
3151
3152         Also rename DynamicNodeListCacheBase to LiveNodeListBase, and merge DynamicSubtreeNodeList
3153         into LiveNodeList (old DynamicNodeList) now that the only difference between those two classes
3154         is the former calling registerNodeListCache and unregisterNodeListCache on Document.
3155
3156         This patch completes the series of simplification of NodeList/HTMLCollection classes.
3157
3158         * CMakeLists.txt:
3159         * GNUmakefile.list.am:
3160         * Target.pri:
3161         * WebCore.gypi:
3162         * WebCore.xcodeproj/project.pbxproj:
3163         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
3164         (WebCore::getNamedItems):
3165         * bindings/js/JSNodeListCustom.cpp:
3166         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
3167         * bindings/v8/custom/V8NodeListCustom.cpp:
3168         (WebCore::V8NodeList::opaqueRootForGC):
3169         * dom/ChildNodeList.cpp:
3170         (WebCore::ChildNodeList::ChildNodeList):
3171         (WebCore::ChildNodeList::nodeMatches):
3172         * dom/ChildNodeList.h:
3173         * dom/ClassNodeList.cpp:
3174         (WebCore::ClassNodeList::ClassNodeList):
3175         * dom/ClassNodeList.h:
3176         * dom/DOMAllInOne.cpp:
3177         * dom/Document.cpp:
3178         (WebCore::Document::registerNodeListCache):
3179         (WebCore::Document::unregisterNodeListCache):
3180         (WebCore):
3181         * dom/Document.h:
3182         (WebCore):
3183         (Document):
3184         * dom/DynamicNodeList.cpp: Removed.
3185         * dom/DynamicNodeList.h: Removed.
3186         * dom/LiveNodeList.cpp: Copied from Source/WebCore/dom/DynamicNodeList.cpp.
3187         (WebCore::LiveNodeListBase::rootNode):
3188         (WebCore::LiveNodeListBase::invalidateCache):
3189         (WebCore::LiveNodeListBase::invalidateIdNameCacheMaps):
3190         (WebCore::LiveNodeListBase::reportMemoryUsage):
3191         (WebCore::LiveNodeList::namedItem):
3192         * dom/LiveNodeList.h: Copied from Source/WebCore/dom/DynamicNodeList.h.
3193         (WebCore::LiveNodeListBase::LiveNodeListBase):
3194         (WebCore::LiveNodeListBase::shouldInvalidateTypeOnAttributeChange):
3195         (WebCore::LiveNodeList::LiveNodeList):
3196         (WebCore::LiveNodeList::~LiveNodeList):
3197         (LiveNodeList):
3198         * dom/MicroDataItemList.cpp:
3199         (WebCore::MicroDataItemList::MicroDataItemList):
3200         * dom/MicroDataItemList.h:
3201         * dom/NameNodeList.cpp:
3202         (WebCore::NameNodeList::NameNodeList):
3203         * dom/NameNodeList.h:
3204         * dom/Node.cpp:
3205         (WebCore::shouldInvalidateNodeListCachesForAttr):
3206         (WebCore::Document::invalidateNodeListCaches):
3207         * dom/Node.h:
3208         (WebCore):
3209         * dom/NodeList.h:
3210         (WebCore::NodeList::isLiveNodeList):
3211         * dom/NodeRareData.h:
3212         (NodeListsNodeData):
3213         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
3214         (WebCore::NodeListsNodeData::removeCacheWithName):
3215         (WebCore::NodeListsNodeData::removeCacheWithQualifiedName):
3216         (WebCore::NodeListsNodeData::adoptTreeScope):
3217         * dom/PropertyNodeList.cpp:
3218         (WebCore::PropertyNodeList::PropertyNodeList):
3219         * dom/PropertyNodeList.h:
3220         * dom/TagNodeList.cpp:
3221         (WebCore::TagNodeList::TagNodeList):
3222         * dom/TagNodeList.h:
3223         * html/HTMLCollection.cpp:
3224         (WebCore::HTMLCollection::HTMLCollection):
3225         (WebCore::LiveNodeListBase::iterateForNextNode):
3226         (WebCore::LiveNodeListBase::itemBeforeOrAfter):
3227         (WebCore::LiveNodeListBase::itemBefore):
3228         (WebCore::LiveNodeListBase::itemAfter):
3229         (WebCore::LiveNodeListBase::isLastItemCloserThanLastOrCachedItem):
3230         (WebCore::LiveNodeListBase::isFirstItemCloserThanCachedItem):
3231         (WebCore::LiveNodeListBase::setItemCache):
3232         (WebCore::LiveNodeListBase::length):
3233         (WebCore::LiveNodeListBase::item):
3234         (WebCore::LiveNodeListBase::itemBeforeOrAfterCachedItem):
3235         * html/HTMLCollection.h:
3236         * html/LabelsNodeList.cpp:
3237         (WebCore::LabelsNodeList::LabelsNodeList):
3238         * html/LabelsNodeList.h:
3239         * html/RadioNodeList.cpp:
3240         (WebCore::RadioNodeList::RadioNodeList):
3241         * html/RadioNodeList.h:
3242
3243 2012-10-08  Robert Hogan  <robert@webkit.org>
3244
3245         Changing position:relative to position:static results in mis-positioned div
3246         https://bugs.webkit.org/show_bug.cgi?id=26397
3247
3248         Reviewed by Ojan Vafai.
3249
3250         When a block changes position from relative to static it is no longer the containing block for any
3251         positioned objects it may have. If any of those positioned objects actually have a position specified
3252         they are going to need a layout as their new containing block will likely have a different location they
3253         need to offset from. Positioned objects without a specified position always get a layout anyway 
3254         in layoutPositionedObjects() so no need to worry about them in this situation. 
3255
3256         Test: fast/block/abspos-child-container-changes-from-relative-to-static-expected.html
3257
3258         * rendering/RenderBlock.cpp:
3259         (WebCore::RenderBlock::styleWillChange):
3260         (WebCore::RenderBlock::layoutPositionedObjects):
3261         (WebCore::RenderBlock::removePositionedObjects):
3262         * rendering/RenderBlock.h:
3263         (RenderBlock):
3264
3265 2012-11-24  Antti Koivisto  <antti@apple.com>
3266
3267         Make renderer construction less generic
3268         https://bugs.webkit.org/show_bug.cgi?id=103175
3269
3270         Reviewed by Ojan Vafai.
3271
3272         The renderer construction code currently operates on Nodes and is very generic. In reality
3273         only Element and Text nodes can have renderers and the Text case is much simpler.
3274
3275         This patch separates the Text and Element renderer construction paths and makes it statically
3276         known that other Node types can't have renderers. Less generic code is less branchy and enables
3277         further optimizations.
3278
3279         * dom/CharacterData.cpp:
3280         (WebCore::CharacterData::parserAppendData):
3281         (WebCore::CharacterData::setDataAndUpdate):
3282         (WebCore):
3283         (WebCore::CharacterData::rendererIsNeeded):
3284         (WebCore::CharacterData::createRenderer):
3285         
3286             Only Text subclass of CharacterData can have renderers.
3287
3288         * dom/CharacterData.h:
3289         (CharacterData):
3290         * dom/ContainerNode.h:
3291         (WebCore::ContainerNode::childShouldCreateRenderer):
3292         
3293             Move childShouldCreateRenderer from Node to ContainerNode.
3294
3295         (ContainerNode):
3296         * dom/Element.cpp:
3297         (WebCore::Element::rendererIsNeeded):
3298         (WebCore):
3299         (WebCore::Element::attach):
3300         (WebCore::Element::childShouldCreateRenderer):
3301         * dom/Element.h:
3302         
3303             Move rendererIsNeeded and createRenderer from Node to Element.
3304
3305         (Element):
3306         * dom/Node.cpp:
3307         (WebCore::Node::attach):
3308         (WebCore):
3309         * dom/Node.h:
3310         (Node):
3311         * dom/NodeRenderingContext.cpp:
3312         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
3313         (WebCore::NodeRenderingContext::createRendererForTextIfNeeded):
3314         
3315             Separate the Element and Text renderer creation paths. Both are less branchy.
3316             The Text path is much simpler and avoids a bunch of virtual calls.
3317
3318         (WebCore):
3319         * dom/NodeRenderingContext.h:
3320         (NodeRenderingContext):
3321         * dom/Text.cpp:
3322         (WebCore::Text::textRendererIsNeeded):
3323         (WebCore::Text::createTextRendererIfNeeded):
3324         (WebCore):
3325         (WebCore::Text::createTextRenderer):
3326         (WebCore::Text::attach):
3327         (WebCore::Text::updateTextRenderer):
3328         * dom/Text.h:
3329         
3330                 Add non-virtual Text specific functions.
3331
3332         (WebCore):
3333         (Text):
3334         * rendering/RenderBlock.cpp:
3335         (WebCore::RenderBlock::clone):
3336
3337 2012-11-22  Ryosuke Niwa  <rniwa@webkit.org>
3338
3339         REGRESSION(r135493): HTMLCollection and DynamicNodeList have two vtable pointers
3340         https://bugs.webkit.org/show_bug.cgi?id=103096
3341
3342         Reviewed by Sam Weinig.
3343
3344         Co-authored by Ilya Tikhonovsky.
3345
3346         Made DynamicNodeListCacheBase inherit from NodeList. While HTMLCollection doesn't inherit
3347         from NodeList in IDL, it makes a lot of sense for the C++ implementation to do so via
3348         DynamicNodeListCacheBase since HTMLCollection and live NodeList share a lot of code in
3349         DynamicNodeListCacheBase.
3350
3351         This lets remove proxies for item() and length() in DynamicNodeList and HTMLCollection
3352         and directly implement them in DynamicNodeListCacheBase which used to provide itemCommon()
3353         and lengthCommon().
3354
3355         Also renamed NodeList::itemWithName() to NodeList::namedItem() to match HTMLCollection's
3356         naming convention.
3357
3358         Finally, removed reportMemoryUsage in DynamicNodeList::reportMemoryUsage since DynamicNodeList
3359         now uses single inheritance.
3360
3361         * bindings/js/JSNodeListCustom.cpp:
3362         (WebCore::JSNodeList::canGetItemsForName): Calls namedItem, which has been renamed from
3363         itemWithName.
3364         (WebCore::JSNodeList::nameGetter): Ditto.
3365         * bindings/v8/custom/V8NodeListCustom.cpp:
3366         (WebCore::V8NodeList::namedPropertyGetter): Ditto.
3367         * bindings/v8/custom/V8NamedNodesCollection.cpp:
3368         (WebCore::V8NamedNodesCollection::namedItem): Renamed from itemWithName.
3369         * bindings/v8/custom/V8NamedNodesCollection.h:
3370         * dom/ChildNodeList.cpp:
3371         (WebCore::ChildNodeList::nodeMatches): Updated comment.
3372         * dom/DynamicNodeList.cpp:
3373         (WebCore::DynamicNodeList::namedItem): Renamed from itemWithName.
3374         * dom/DynamicNodeList.h:
3375         (DynamicNodeListCacheBase): Inhertis from NodeList and renamed lengthCommon and itemCommon
3376         to virtual length and item respectively.
3377         (DynamicNodeList): Now inherits from just DynamicNodeListCacheBase instead of NodeList
3378         and DynamicNodeListCacheBase since the former now inhertis from NodeList. Also removed
3379         length() and item() since they're implemented in DynamicNodeListCacheBase now and renamed
3380         itemWithName() to namedItem() to match HTMLCollection's naming convention.
3381         * dom/NodeList.h:
3382         (NodeList::namedItem): Renamed from itemWithName. Note that this member function is not
3383         exposed via IDL. It's merely used in the binding code.
3384         * dom/StaticHashSetNodeList.cpp:
3385         (WebCore::StaticHashSetNodeList::namedItem): Ditto.
3386         * dom/StaticHashSetNodeList.h:
3387         (StaticHashSetNodeList::namedItem): Ditto.
3388         * dom/StaticNodeList.cpp:
3389         (WebCore::StaticNodeList::namedItem): Ditto.
3390         * dom/StaticNodeList.h:
3391         (StaticNodeList::namedItem): Ditto.
3392         * html/HTMLCollection.cpp:
3393         (WebCore::DynamicNodeListCacheBase::length): Renamed from lengthCommon.
3394         (WebCore::DynamicNodeListCacheBase::item): Renamed from itemCommon.
3395         * html/HTMLCollection.h:
3396         (HTMLCollection): Inherits from DynamicNodeListCacheBase since DynamicNodeListCacheBase
3397         is already RefCount'ed and NodeList, from which DynamicNodeListCacheBase inherits,
3398         inherits from ScriptWrappable.
3399
3400 2012-11-24  Christophe Dumez  <christophe.dumez@intel.com>
3401
3402         [EFL] Refactor RenderThemeEfl::paintThemePart()
3403         https://bugs.webkit.org/show_bug.cgi?id=103192
3404
3405         Reviewed by Kenneth Rohde Christiansen.
3406
3407         Refactor RenderThemeEfl::paintThemePart() so that:
3408         - Some C'ism is removed
3409         - RTL related code is moved to applyEdjeRTLState()
3410         - evas_render() is called instead of evas_render_updates()
3411           to avoid creating uselessly update rects.
3412
3413         No new tests, no behavior change for layout tests.
3414
3415         * platform/efl/RenderThemeEfl.cpp:
3416         (WebCore::RenderThemeEfl::applyEdjeRTLState):
3417         (WebCore):
3418         (WebCore::RenderThemeEfl::paintThemePart):
3419         * platform/efl/RenderThemeEfl.h:
3420         (RenderThemeEfl):
3421
3422 2012-11-24  Brent Fulgham  <bfulgham@webkit.org>
3423
3424         [WinCairo] Avoid access violation when frame is NULL.
3425         https://bugs.webkit.org/show_bug.cgi?id=68753
3426
3427         BitmapImage::drawFrameMatchingSourceSize causes an access violation
3428         if BitmapImage::frameAtIndex returns NULL. (Found by David Delaune).
3429
3430         Reviewed by Simon Fraser.
3431
3432         * platform/graphics/win/ImageCairoWin.cpp:
3433         (WebCore::BitmapImage::drawFrameMatchingSourceSize): Check for null
3434         cairo_surface_t pointer and avoid dereferencing.
3435
3436 2012-11-24  Christophe Dumez  <christophe.dumez@intel.com>
3437
3438         [EFL] Refactor RenderThemeEfl::getThemePartFromCache()
3439         https://bugs.webkit.org/show_bug.cgi?id=103186
3440
3441         Reviewed by Kenneth Rohde Christiansen.
3442
3443         Refactor getThemePartFromCache() so that a list is used
3444         for the cache instead of a vector. The function moves