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