Fix packing in StyleBoxData for Windows.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-06-12  Alexis Menard  <alexis.menard@openbossa.org>
2
3         Fix packing in StyleBoxData for Windows.
4         https://bugs.webkit.org/show_bug.cgi?id=88858
5
6         Reviewed by Tony Chang.
7
8         MSVC doesn't pack bitfields if the types are mixed.
9         We can safely change the bool type to an unsigned so
10         the packing will happen. I have added a compile assert
11         for future regressions.
12
13         No new tests : we should not see any regressions.
14
15         * rendering/style/StyleBoxData.h:
16         * rendering/style/StyleBoxData.cpp:
17         (StyleBoxData):
18
19 2012-06-12  Adrienne Walker  <enne@google.com>
20
21         [chromium] Paint scrollbars on WebKit thread and composite those textures
22         https://bugs.webkit.org/show_bug.cgi?id=88145
23
24         Reviewed by James Robinson.
25
26         Scrollbars were previously painted and uploaded on the compositor
27         thread. This isn't possible to do for many scrollbar themes. This
28         patch changes ScrollbarLayerChromium to paint the scrollbar into two
29         parts: the thumb, and everything else. These are uploaded into
30         textures and synced over to the CCScrollbarImpl where they are
31         composited and drawn.
32
33         Mac and overlay scrollbars are still not enabled to have compositor
34         thread-updated scrollbars.
35
36         As a bonus, fix LayerRendererChromium::drawTextureQuad to draw quads
37         that do not fill the entire layer bounds.
38
39         Tested by existing layout and unit tests by removing the condition
40         that these scrollbar layers are only created when the threaded proxy
41         exists.
42
43         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
44         (WebCore::scrollbarLayerDidChange):
45         * platform/ScrollbarThemeComposite.cpp:
46         (WebCore::ScrollbarThemeComposite::thumbRect):
47         (WebCore):
48         * platform/ScrollbarThemeComposite.h:
49         (ScrollbarThemeComposite):
50         * platform/graphics/chromium/LayerRendererChromium.cpp:
51         (WebCore::LayerRendererChromium::drawTextureQuad):
52         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
53         (WebCore::ScrollbarLayerChromium::ScrollbarLayerChromium):
54         (WebCore::ScrollbarLayerChromium::theme):
55         (WebCore):
56         (WebCore::ScrollbarLayerChromium::pushPropertiesTo):
57         (ScrollbarBackgroundPainter):
58         (WebCore::ScrollbarBackgroundPainter::create):
59         (WebCore::ScrollbarBackgroundPainter::paint):
60         (WebCore::ScrollbarBackgroundPainter::ScrollbarBackgroundPainter):
61         (ScrollbarThumbPainter):
62         (WebCore::ScrollbarThumbPainter::create):
63         (WebCore::ScrollbarThumbPainter::paint):
64         (WebCore::ScrollbarThumbPainter::ScrollbarThumbPainter):
65         (WebCore::ScrollbarLayerChromium::setLayerTreeHost):
66         (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
67         (WebCore::ScrollbarLayerChromium::updatePart):
68         (WebCore::ScrollbarLayerChromium::update):
69         * platform/graphics/chromium/ScrollbarLayerChromium.h:
70         (WebCore):
71         (ScrollbarLayerChromium):
72         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
73         (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
74         (WebCore::CCScrollbarLayerImpl::appendQuads):
75         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
76         (WebCore::CCScrollbarLayerImpl::setBackgroundTextureId):
77         (WebCore::CCScrollbarLayerImpl::setThumbTextureId):
78         (CCScrollbarLayerImpl):
79
80 2012-06-12  Tony Chang  <tony@chromium.org>
81
82         Replaced items in a flexbox should be coerced to display:block
83         https://bugs.webkit.org/show_bug.cgi?id=87068
84
85         Reviewed by Ojan Vafai.
86
87         The flexbox spec lists HTML tags that should automatically be converted
88         to display:block when a flex child. It also says that atomic inline-level
89         children should become block (e.g., inline-table should be treated as table).
90         http://dev.w3.org/csswg/css3-flexbox/#flex-items
91
92         Test: css3/flexbox/flexitem.html
93
94         * css/StyleResolver.cpp:
95         (WebCore::StyleResolver::collectMatchingRulesForList):
96
97 2012-06-12  Joshua Bell  <jsbell@chromium.org>
98
99         IndexedDB: ObjectStore/Index shouldn't hold reference to backing store
100         https://bugs.webkit.org/show_bug.cgi?id=83074
101
102         Reviewed by Tony Chang.
103
104         We should be able to collect and close the leveldb backing store as soon as the database
105         connection is closed, but the IDBObjectStoreBackendImpl and IDBIndexBackendImpl were
106         holding RefPtrs, and those objects are kept alive by script references.
107
108         Replaced RefPtrs to the IDBBackingStore with pointers to the IDBDatabase. On the back end,
109         IDBDatabaseBackendImpl maintains a RefPtr to the IDBObjectStoreBackendImpl object, so
110         a raw pointer back is safe. On the front end, the IDBObjectStore maintains a RefPtr to
111         the IDBDatabase so script can navigate upwards. Ditto on both ends for the ObjectStore/Index
112         relationship. The frontend objects maintain RefPtrs to the backend objects, so the backend
113         objects and their owners are maintained as long as there's a script reference. To ensure
114         that all LevelDB objects are destructed in the right order, transactions indirectly track all
115         open cursors and ensure they are closed when the transaction finishes, and database closing
116         is explicitly prevented from occurring until transactions are complete.
117
118         Also made IDBDatabaseBackendImpl handle a null IDBFactoryBackendImpl pointer, for testing.
119
120         Tests: storage/indexeddb/database-close.html
121                storage/indexeddb/persistence.html
122                [Chromium] webkit_unit_tests --gtest_filter=IDBDatabaseBackendTest.BackingStoreRetention
123
124         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
125         (WebCore::IDBCursorBackendImpl::close): Release LevelDB resources when closed to allow backing store to close.
126         * Modules/indexeddb/IDBCursorBackendImpl.h:
127         (WebCore):
128         * Modules/indexeddb/IDBDatabase.cpp: Ensure connection close deferred until all transactions are finished.
129         (WebCore::IDBDatabase::transactionCreated): Accounting.
130         (WebCore::IDBDatabase::transactionFinished): Accounting.
131         (WebCore::IDBDatabase::close):
132         (WebCore):
133         (WebCore::IDBDatabase::closeConnection):
134         * Modules/indexeddb/IDBDatabase.h:
135         (IDBDatabase):
136         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Track outstanding transactions for forced-close scenarios.
137         (WebCore::IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl):
138         (WebCore::IDBDatabaseBackendImpl::createObjectStore): Don't pass in backing store reference.
139         (WebCore::IDBDatabaseBackendImpl::setVersion): Use transaction() for consistent accounting.
140         (WebCore::IDBDatabaseBackendImpl::transactionFinished): Accounting.
141         (WebCore::IDBDatabaseBackendImpl::transaction): Accounting.
142         (WebCore::IDBDatabaseBackendImpl::close): Unregister from factory when last connection is closed.
143         (WebCore::IDBDatabaseBackendImpl::loadObjectStores): Don't pass in backing store reference.
144         (WebCore::IDBDatabaseBackendImpl::removeObjectStoreFromMap):
145         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
146         (WebCore):
147         (IDBDatabaseBackendImpl):
148         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
149         (WebCore::IDBFactoryBackendImpl::deleteDatabase): Don't hang on to deleted databases eternally.
150         * Modules/indexeddb/IDBFactoryBackendImpl.h: Backend map controls IDBDatabaseBackend lifetimes.
151         (IDBFactoryBackendImpl):
152         * Modules/indexeddb/IDBIndexBackendImpl.cpp: Don't hold backing store references.
153         (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
154         * Modules/indexeddb/IDBIndexBackendImpl.h:
155         (WebCore::IDBIndexBackendImpl::create):
156         (IDBIndexBackendImpl):
157         (WebCore::IDBIndexBackendImpl::backingStore):
158         (WebCore::IDBIndexBackendImpl::databaseId):
159         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: Don't hold backing store references.
160         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
161         (WebCore::IDBObjectStoreBackendImpl::createIndex):
162         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
163         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
164         (WebCore::IDBObjectStoreBackendImpl::create):
165         (IDBObjectStoreBackendImpl):
166         (WebCore::IDBObjectStoreBackendImpl::backingStore):
167         (WebCore::IDBObjectStoreBackendImpl::databaseId):
168         * Modules/indexeddb/IDBRequest.cpp:
169         (WebCore::IDBRequest::onSuccess):
170         * Modules/indexeddb/IDBTransaction.cpp:
171         (WebCore::IDBTransaction::IDBTransaction): For IDBDatabase accounting, allow ref during ctor.
172         (WebCore::IDBTransaction::onAbort): Accounting.
173         (WebCore::IDBTransaction::onComplete): Accounting.
174         * Modules/indexeddb/IDBTransaction.h:
175         (WebCore::IDBTransaction::isVersionChange): Convenience function.
176         (IDBTransaction):
177         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
178         (WebCore::IDBTransactionBackendImpl::abort): Cleanup ordering to allow backing store to close.
179         (WebCore::IDBTransactionBackendImpl::commit): Cleanup ordering to allow backing store to close.
180
181 2012-06-12  Adrienne Walker  <enne@google.com>
182
183         [chromium] Don't set visible layer rect in CCLayerTreeHost paint iteration
184         https://bugs.webkit.org/show_bug.cgi?id=88895
185
186         Reviewed by James Robinson.
187
188         We should only set visible layer rects during the recursion in
189         CClayerTreeHostCommon and not while we're painting. This is one last
190         straggling piece of code that never got moved.
191
192         Tested by existing mask-related layout tests.
193
194         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
195         (WebCore::CCLayerTreeHost::paintMasksForRenderSurface):
196         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
197         (WebCore::calculateVisibleAndScissorRectsInternal):
198
199 2012-06-12  Dana Jansens  <danakj@chromium.org>
200
201         [chromium] Return empty visibleLayerRect for layers with empty content bounds
202         https://bugs.webkit.org/show_bug.cgi?id=88901
203
204         Reviewed by Adrienne Walker.
205
206         This change should only affect tests. Currently if you set up a
207         CCLayerImpl with some bounds, but don't set the contentBounds, then
208         they are empty by default. In this case the visibleLayerRect gets
209         set inappropriately to the layer's target surface contentRect which
210         in a completely different coordinate space.
211
212         Fixed up tests that were passing bogusly and failed after this change.
213
214         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
215         (WebCore::calculateVisibleLayerRect):
216
217 2012-06-12  Adrienne Walker  <enne@google.com>
218
219         [chromium] ScrollingCoordinator::setScrollLayer should update scroll layer ids
220         https://bugs.webkit.org/show_bug.cgi?id=88882
221
222         Reviewed by James Robinson.
223
224         Tested manually, as scrollbar layers are currently only created when
225         threaded compositing is enabled and none of those layout tests trigger
226         this bug.
227
228         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
229         (WebCore::ScrollingCoordinatorPrivate::setScrollLayer):
230         (ScrollingCoordinatorPrivate):
231         (WebCore::ScrollingCoordinatorPrivate::setHorizontalScrollbarLayer):
232         (WebCore::ScrollingCoordinatorPrivate::setVerticalScrollbarLayer):
233         (WebCore::createScrollbarLayer):
234         (WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
235         (WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
236         * platform/graphics/chromium/ScrollbarLayerChromium.h:
237         (WebCore::ScrollbarLayerChromium::setScrollLayerId):
238         (ScrollbarLayerChromium):
239         * platform/graphics/chromium/TreeSynchronizer.cpp:
240         (WebCore::TreeSynchronizer::updateScrollbarLayerPointersRecursive):
241
242 2012-06-12  Mark Mentovai  <mark@chromium.org>
243
244         [chromium mac] Don't include things in subframeworks of
245         ApplicationServices.framework.
246
247         Subframeworks move around from SDK to SDK and OS release to OS
248         release, but just using the top-level umbrella framework guarantees
249         forward compatibility. When building for Chromium Mac, just #include
250         <ApplicationServices/ApplicationServices.h> instead of reaching in to
251         subframeworks.
252
253         https://bugs.webkit.org/show_bug.cgi?id=88569
254
255         Reviewed by Stephen White.
256
257         No new tests.
258
259         * platform/graphics/GlyphBuffer.h:
260         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
261         * platform/graphics/skia/GraphicsContextSkia.cpp:
262
263 2012-06-12  Igor Oliveira  <igor.o@sisa.samsung.com>
264
265         Apply animations and transitions for first-letter element
266         https://bugs.webkit.org/show_bug.cgi?id=85253
267
268         Add animations and transitions support for the first-letter
269         pseudo element.
270         Instead of calling RenderOject::node() in the animations code,
271         now we need to call RenderObject::styledGeneratingNode() because
272         pseudo elements does not have a Node associated with the
273         RenderObject.
274
275         Initial patch by Simon Fraser
276
277         Reviewed by Simon Fraser.
278
279         Tests: animations/first-letter-animation.html
280                animations/first-letter-play-state.html
281                transitions/first-letter-color-transition.html
282                transitions/first-letter-transition.html
283
284         * page/animation/AnimationBase.cpp:
285         (WebCore::AnimationBase::updateStateMachine):
286         * page/animation/AnimationController.cpp:
287         (WebCore::AnimationControllerPrivate::updateAnimations):
288         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
289         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
290         (WebCore::AnimationController::cancelAnimations):
291         (WebCore::AnimationController::updateAnimations):
292         * page/animation/ImplicitAnimation.cpp:
293         (WebCore::ImplicitAnimation::pauseAnimation):
294         (WebCore::ImplicitAnimation::sendTransitionEvent):
295         * page/animation/KeyframeAnimation.cpp:
296         (WebCore::KeyframeAnimation::KeyframeAnimation):
297         (WebCore::KeyframeAnimation::pauseAnimation):
298         (WebCore::KeyframeAnimation::endAnimation):
299         (WebCore::KeyframeAnimation::sendAnimationEvent):
300         * rendering/RenderBlock.cpp:
301         (WebCore::RenderBlock::updateFirstLetterStyle):
302         (WebCore::RenderBlock::createFirstLetterRenderer):
303         * rendering/RenderInline.cpp:
304         (WebCore::RenderInline::clippedOverflowRectForRepaint):
305         * rendering/RenderObject.cpp:
306         (WebCore::RenderObject::setAnimatableStyle):
307         (WebCore::RenderObject::styledGeneratingNode):
308         (WebCore):
309         * rendering/RenderObject.h:
310         (RenderObject):
311
312 2012-06-12  Kent Tamura  <tkent@chromium.org>
313
314         Checking a radio button doesn't uncheck other buttons in the same group in some cases.
315         https://bugs.webkit.org/show_bug.cgi?id=88835
316
317         Reviewed by Ryosuke Niwa.
318
319         This change fixes a bug that checking a radio button in a radio button
320         group in a form detached from a document tree doesn't uncheck another
321         checked radio button in the radio button group.
322
323         A radio button participates in a radio button group in the following
324         conditions:
325         - If it is owned by a form element regardless of the form is in a
326         document tree or not, or
327
328         - If it is not owned by any form elements and it is in a document tree.
329         A radio button group for the radio button is owned by the document.
330
331         For HTMLInputElement::removedFrom():
332         The old code always unregistered the radio button if it was removed from
333         the document tree. It was incorrect because we don't need to unregister
334         it if it has an owner form and the owner form is not changed by
335         removedFrom().
336         If the owner form is cleared by removedFrom(), willChangeForm()
337         unregisters the radio button. So what we should do in removedFrom() is
338         to unregister the radio button only if the radio button group is owned
339         by the document.
340
341         For HTMLInputElement::insertedInto():
342         The old code always registered the radio button if it is inserted into
343         the document tree. It was incorrect because we don't need to register it
344         if it has an owner form and the owner form is not changed by
345         insertedInto().
346         If the owner form is changed by insertedInto(), didChangeForm()
347         registers the radio button. So We should register the radio button only
348         if its radio button group will be owned by the document.
349
350         Test: Add test cases to fast/forms/radio/radio-group.html
351
352         * html/HTMLInputElement.cpp:
353         (WebCore::HTMLInputElement::insertedInto):
354         Register this to CheckedRadioButtons only if new group owner is Document.
355         (WebCore::HTMLInputElement::removedFrom):
356         Unregister this from CheckedRadioButtons only if old group owner was Document.
357
358 2012-06-12  James Robinson  <jamesr@chromium.org>
359
360         [chromium] REGRESSION(119769): Canvas2DLayerBridge may go away before its TextureLayerChromium
361         https://bugs.webkit.org/show_bug.cgi?id=88910
362
363         Reviewed by Adrienne Walker.
364
365         Unregister the bridge as its TextureLayerChromium client when going away.
366
367         Covered by new unit test in Canvas2DLayerBridgeTest.cpp.
368
369         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
370         (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge):
371
372 2012-06-12  Alec Flett  <alecflett@chromium.org>
373
374         IndexedDB: Error codes, phase two
375         https://bugs.webkit.org/show_bug.cgi?id=88690
376
377         Reviewed by Tony Chang.
378
379         Update the next phase of IndexedDB error codes to match the spec.
380         This update is mostly focused on DATA_ERR vs CONSTRAINT_ERR.
381
382         Also moves some of the error checking for the transaction mode
383         into the frontend and replaces the backend checks with asserts, so that
384         we can consolidate error checking in one place.
385
386         This also removes a few FIXME's that are no longer true (about 
387         I/O errors - the spec was updated and our implementation was
388         already correct)
389
390         No new tests, existing tests cover changed behavior.
391
392         * Modules/indexeddb/IDBCursor.cpp:
393         (WebCore::IDBCursor::deleteFunction):
394         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
395         (WebCore::IDBCursorBackendImpl::deleteFunction):
396         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
397         (WebCore::IDBDatabaseBackendImpl::setVersionInternal):
398         * Modules/indexeddb/IDBObjectStore.cpp:
399         (WebCore::IDBObjectStore::add):
400         (WebCore::IDBObjectStore::put):
401         (WebCore::IDBObjectStore::deleteFunction):
402         (WebCore::IDBObjectStore::clear):
403         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
404         (WebCore::IDBObjectStoreBackendImpl::put):
405         (WebCore::IDBObjectStoreBackendImpl::putInternal):
406         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
407         (WebCore::IDBObjectStoreBackendImpl::clear):
408         * Modules/indexeddb/IDBTransaction.h:
409         (WebCore::IDBTransaction::enumMode):
410         * Modules/indexeddb/IDBTransactionBackendImpl.h:
411
412 2012-06-12  Min Qin  <qinmin@google.com>
413
414         Disable autoplay when user gesture is required for media playback
415         https://bugs.webkit.org/show_bug.cgi?id=88897
416
417         Reviewed by Adam Barth.
418
419         When user gesture is required for media playback, we should block autoplay.
420         Otherwise, people will use autoplay instead of video.play() to bypass the gesture requirement.
421         Test: media/no-autoplay-with-user-gesture-requirement.html
422
423         * html/HTMLMediaElement.cpp:
424         (WebCore::HTMLMediaElement::setReadyState):
425
426 2012-06-12  Shrey Banga  <banga@chromium.org>
427
428         HTML parser should yield more to improve perceived page load time
429         https://bugs.webkit.org/show_bug.cgi?id=86165
430
431         Reviewed by Tony Gentilcore.
432
433         Test: fast/events/event-yield-timing.html
434
435         We want the parser to yield at least every 500ms to keep the page somewhat responsive and allow painting.
436         Since it would be too expensive to check the time after each token, the previous heuristic was to check every 4,096 tokens.
437         That works fine for most tokens, but a script may spend an arbitrary amount of time executing.
438
439         This patch fixes the issue by causing the parser to check the elapsed time immediately after executing a script.
440
441         * html/parser/HTMLParserScheduler.cpp:
442         (WebCore::HTMLParserScheduler::checkForYieldBeforeScript):
443         * html/parser/HTMLParserScheduler.h:
444         (WebCore::PumpSession::PumpSession):
445         (PumpSession):
446         (WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
447
448 2012-06-12  Sami Kyostila  <skyostil@chromium.org>
449
450         [chromium] Don't crash in CCLayerIterator if the root layer doesn't have a render surface
451         https://bugs.webkit.org/show_bug.cgi?id=88886
452
453         Reviewed by James Robinson.
454
455         If we are iterating over a render render surface layer list where the
456         root layer does not have a render surface, fail gracefully instead of
457         crashing.
458
459         Tests: CCLayerIteratorTest.{emptyTree,rootLayerWithoutRenderSurface}
460
461         * platform/graphics/chromium/cc/CCLayerIterator.h:
462         (WebCore::CCLayerIterator::CCLayerIterator):
463
464 2012-06-06  Ojan Vafai  <ojan@chromium.org>
465
466         Change default for flex-grow back to 0
467         https://bugs.webkit.org/show_bug.cgi?id=88443
468
469         Reviewed by Tony Chang.
470
471         * rendering/style/RenderStyle.h:
472
473 2012-06-12  Brady Eidson  <beidson@apple.com>
474
475         <rdar://problem/11593686> and https://bugs.webkit.org/show_bug.cgi?id=88683
476         Garbage collection of an <img> element can cause reentrant event dispatch.
477
478         Reviewed by Darin Adler.
479
480         The most straightforward solution is for ImageLoader to keep its Element alive
481         with ref/deref any time the Image is actually loading.
482
483         ImageLoader should always do this for all Elements, and if those Elements want/need
484         different behavior for when they are detached then they need to manually stop their
485         loads.
486
487         Tests: http/tests/loading/embed-image-load-outlives-gc-without-crashing.html
488                http/tests/loading/image-input-type-outlives-gc-without-crashing.html
489                http/tests/loading/image-load-outlives-gc-without-crashing.html
490                http/tests/loading/object-image-load-outlives-gc-without-crashing.html
491                http/tests/loading/svg-image-load-outlives-gc-without-crashing.html
492                http/tests/loading/video-poster-image-load-outlives-gc-without-crashing.html
493
494         * loader/ImageLoader.cpp:
495         (WebCore::ImageLoader::ImageLoader):
496         (WebCore::ImageLoader::~ImageLoader):
497         (WebCore::ImageLoader::setImage):
498         (WebCore::ImageLoader::updateFromElement):
499         (WebCore::ImageLoader::notifyFinished):
500         (WebCore::ImageLoader::updatedHasPendingLoadEvent):
501         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
502         (WebCore::ImageLoader::dispatchPendingLoadEvent):
503         * loader/ImageLoader.h:
504         (ImageLoader):
505
506 2012-06-12  Shawn Singh  <shawnsingh@chromium.org>
507
508         [chromium] Make damage tracking more robust to early exits
509         https://bugs.webkit.org/show_bug.cgi?id=84803
510
511         Reviewed by James Robinson.
512
513         All CCDamageTrackerTest unit tests updated;
514         One new unit test added:
515            CCDamageTrackerTest.verifyDamageAccumulatesUntilReset
516
517         Damage tracking inherently needs to be aware of all changes that
518         occur for every frame. Before this patch, anyone modifying details
519         of CCLayerTreeHostImpl and the drawing phases of the compositor
520         needed to be careful to avoid early exiting once draw is
521         initiated, otherwise running the risk of damage tracking's state
522         getting out-of-sync from actual changes. This patch makes the
523         damage tracker API more asynchronous-like, so that damage will
524         continue to accumulate until it is explicitly notified that
525         damaged areas have been drawn. This will allow more freedom in
526         designing and restructuing drawing code in the compositor, without
527         worrying as much about damage tracking getting out-of-sync.
528
529         * platform/graphics/chromium/cc/CCDamageTracker.h:
530         (WebCore::CCDamageTracker::didDrawDamagedArea):
531         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
532         (WebCore::CCLayerTreeHostImpl::drawLayers):
533         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
534         (CCLayerTreeHostImpl):
535
536 2012-06-12  Mike West  <mkwst@chromium.org>
537
538         Make document.documentURI readonly from JavaScript
539         https://bugs.webkit.org/show_bug.cgi?id=65187
540
541         Reviewed by Alexey Proskuryakov.
542
543         The DOM4 working draft marks the documentURI attribute as read only
544         (http://www.w3.org/TR/dom/#document). Firefox has shipped with this
545         behavior since https://hg.mozilla.org/mozilla-central/rev/3bc751906409
546         landed in October 2011, IE9 doesn't support the property, and
547         Opera throws a NO_MODIFICATION_ALLOWED_ERR. This patch changes WebKit
548         to silently fail (matching Firefox's behavior) by setting the property
549         to readonly in the IDL.
550
551         Document::setDocumentURI and the m_documentURI property are retained
552         for compatibility with ObjC clients, and the readonly attribute is
553         ifdeffed out for ObjC.
554
555         This patch adds a single test to verify the behavior, and removes a
556         variety of tests that depended on the writable behavior. In particular,
557         potential security issues involving the document.baseURL property are
558         avoided completely as long as this property can't be changed.
559
560         Test: fast/dom/documenturi-readonly.html
561
562         * dom/Document.cpp:
563         (WebCore::Document::setDocumentURI):
564             Adds a comment explaining that the fallback is necessary only to
565             support ObjC, not for JS calls.
566         * dom/Document.cpp:
567         (WebCore::Document::updateBaseURL):
568             Ditto.
569         (Document):
570         * dom/Document.idl:
571             Add readonly to the attribute and drop null value when not in
572             LANGUAGE_OBJECTIVE_C.
573
574 2012-06-12  Silvia Pfeiffer  <silviapf@chromium.org>
575
576         Support !ENABLE(VIDEO) builds with horizontally layed out video controls.
577         https://bugs.webkit.org/show_bug.cgi?id=88881
578
579         Reviewed by Csaba Osztrogonác.
580
581         No new tests as this is a regression from WK87835.
582
583         * html/shadow/SliderThumbElement.cpp:
584         (WebCore::hasVerticalAppearance):
585         Ifdef out video related functionality, since usesVerticalVolumeSlider
586         does not exist in that case.
587
588 2012-06-12  Pavel Feldman  <pfeldman@chromium.org>
589
590         Web Inspector: allow clearing revision history.
591         https://bugs.webkit.org/show_bug.cgi?id=88847
592
593         Reviewed by Vsevolod Vlasov.
594
595         This change also renames "Revision history" to "Local modifications".
596         I intend to list modifications to all files in that view in the subsequent change.
597
598         * English.lproj/localizedStrings.js:
599         * inspector/front-end/Resource.js:
600         (WebInspector.Resource._clearResourceHistory):
601         * inspector/front-end/RevisionHistoryView.js:
602         (WebInspector.RevisionHistoryView.else.clearHistory):
603         (WebInspector.RevisionHistoryView):
604         (WebInspector.RevisionHistoryView.prototype._revisionAdded):
605         (WebInspector.RevisionHistoryTreeElement):
606         (WebInspector.RevisionHistoryTreeElement.prototype._createLine):
607         (WebInspector.RevisionHistoryTreeElement.prototype.allowRevert):
608         * inspector/front-end/ScriptsPanel.js:
609         (WebInspector.ScriptsPanel.prototype.appendApplicableItems):
610
611 2012-06-12  Pavel Feldman  <pfeldman@chromium.org>
612
613         Web Inspector: use jsdifflib for revision diff calculation.
614         https://bugs.webkit.org/show_bug.cgi?id=88791
615
616         Reviewed by Vsevolod Vlasov.
617
618         Present diff calculation is incomplete, it does not properly handle the following case:
619             [a, b, c, d, e, f, g, h] => [c, d, e, f, g, h, a, b]
620         We should not be implementing diff by ourselves. I imported jsdifflib from
621         https://github.com/cemerick/jsdifflib. It has BSD license that is compatible with WebKit.
622
623         * WebCore.gypi:
624         * WebCore.vcproj/WebCore.vcproj:
625         * inspector/front-end/RevisionHistoryView.js:
626         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand.step2):
627         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand):
628         (WebInspector.RevisionHistoryTreeElement.prototype._createLine.appendLineNumber):
629         (WebInspector.RevisionHistoryTreeElement.prototype._createLine):
630         * inspector/front-end/WebKit.qrc:
631         * inspector/front-end/externs.js:
632         (difflib.stringAsLines):
633         (difflib.SequenceMatcher):
634         (difflib.SequenceMatcher.prototype.get_opcodes):
635         * inspector/front-end/inspector.html:
636         * inspector/front-end/jsdifflib.js: Added.
637         (difflib.defaultJunkFunction):
638         (difflib.stripLinebreaks):
639         (difflib.stringAsLines):
640         (difflib.__reduce):
641         (difflib.__ntuplecomp):
642         (difflib.__calculate_ratio):
643         (difflib.__dictget):
644         (difflib.SequenceMatcher.this.set_seqs):
645         (difflib.SequenceMatcher.this.set_seq1):
646         (difflib.SequenceMatcher.this.set_seq2):
647         (difflib.SequenceMatcher.this.__chain_b):
648         (difflib.SequenceMatcher.this.find_longest_match):
649         (difflib.SequenceMatcher.this.get_matching_blocks):
650         (difflib.SequenceMatcher.this.get_opcodes):
651         (difflib.SequenceMatcher.this.get_grouped_opcodes):
652         (difflib.SequenceMatcher.this.quick_ratio):
653         (difflib.SequenceMatcher.this.real_quick_ratio):
654         * inspector/front-end/revisionHistory.css:
655         (.revision-history-line-separator .webkit-line-number):
656
657 2012-06-12  Pavel Feldman  <pfeldman@chromium.org>
658
659         Web Inspector: use jsdifflib for revision diff calculation.
660         https://bugs.webkit.org/show_bug.cgi?id=88791
661
662         Reviewed by Vsevolod Vlasov.
663
664         Present diff calculation is incomplete, it does not properly handle the following case:
665             [a, b, c, d, e, f, g, h] => [c, d, e, f, g, h, a, b]
666         We should not be implementing diff by ourselves. I imported jsdifflib from
667         https://github.com/cemerick/jsdifflib. It has BSD license that is compatible with WebKit.
668
669         * WebCore.gypi:
670         * WebCore.vcproj/WebCore.vcproj:
671         * inspector/front-end/RevisionHistoryView.js:
672         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand.step2):
673         (WebInspector.RevisionHistoryTreeElement.prototype.onexpand):
674         (WebInspector.RevisionHistoryTreeElement.prototype._createLine.appendLineNumber):
675         (WebInspector.RevisionHistoryTreeElement.prototype._createLine):
676         * inspector/front-end/WebKit.qrc:
677         * inspector/front-end/externs.js:
678         (difflib.stringAsLines):
679         (difflib.SequenceMatcher):
680         (difflib.SequenceMatcher.prototype.get_opcodes):
681         * inspector/front-end/inspector.html:
682         * inspector/front-end/jsdifflib.js: Added.
683         (difflib.defaultJunkFunction):
684         (difflib.stripLinebreaks):
685         (difflib.stringAsLines):
686         (difflib.__reduce):
687         (difflib.__ntuplecomp):
688         (difflib.__calculate_ratio):
689         (difflib.__dictget):
690         (difflib.SequenceMatcher.this.set_seqs):
691         (difflib.SequenceMatcher.this.set_seq1):
692         (difflib.SequenceMatcher.this.set_seq2):
693         (difflib.SequenceMatcher.this.__chain_b):
694         (difflib.SequenceMatcher.this.find_longest_match):
695         (difflib.SequenceMatcher.this.get_matching_blocks):
696         (difflib.SequenceMatcher.this.get_opcodes):
697         (difflib.SequenceMatcher.this.get_grouped_opcodes):
698         (difflib.SequenceMatcher.this.quick_ratio):
699         (difflib.SequenceMatcher.this.real_quick_ratio):
700         * inspector/front-end/revisionHistory.css:
701         (.revision-history-line-separator .webkit-line-number):
702
703 2012-06-12  Christophe Dumez  <christophe.dumez@intel.com>
704
705         [GStreamer] http/tests/media/video-buffered-range-contains-currentTime.html is failing
706         https://bugs.webkit.org/show_bug.cgi?id=87575
707
708         Reviewed by Philippe Normand.
709
710         When EOS is reached in forward playback, the position does not necessarily
711         match the duration. This confuses HTMLMediaElement and causes the "ended"
712         event not to be fired. To avoid this, we synchronize position and duration
713         values in this case.
714
715         Test: http/tests/media/video-buffered-range-contains-currentTime.html
716
717         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
718
719 2012-06-12  Kinuko Yasuda  <kinuko@chromium.org>
720
721         Refactor InputType::receiveDroppedFiles to take DragData
722         https://bugs.webkit.org/show_bug.cgi?id=88860
723
724         Reviewed by Kent Tamura.
725
726         So that we can centralize the file paths related code into FileInputType
727         and makes it easier to extract more data from DragData for
728         <input type=file> (like bug 88293 for directory drag-and-drop).
729
730         No new tests as this has no behavioral changes.
731
732         * html/FileInputType.cpp:
733         (WebCore::FileInputType::receiveDroppedFiles):
734         * html/FileInputType.h:
735         * html/HTMLInputElement.cpp:
736         (WebCore::HTMLInputElement::receiveDroppedFiles):
737         * html/HTMLInputElement.h:
738         * html/InputType.cpp:
739         (WebCore::InputType::receiveDroppedFiles):
740         * html/InputType.h:
741         * page/DragController.cpp:
742         (WebCore::DragController::concludeEditDrag):
743
744 2012-06-12  Thiago Marcos P. Santos  <thiago.santos@intel.com>
745
746         Generate -webkit-box-decoration-break property only when the feature is enabled
747         https://bugs.webkit.org/show_bug.cgi?id=88861
748
749         Reviewed by Alexis Menard.
750
751         Otherwise it will hit an assertion if the property is present on the
752         style but the feature disabled. Also fixes a compilation warning when
753         the feature is disabled.
754
755         * css/CSSPropertyNames.in:
756         * css/StyleResolver.cpp:
757         (WebCore::StyleResolver::collectMatchingRulesForList):
758
759 2012-06-12  Darin Adler  <darin@apple.com>
760
761         Tweaked the Mac export file a bit more, adding more-correct iOS cases.
762
763         Reviewed by David Kilzer.
764
765         * WebCore.exp.in: Rearrangement.
766
767 2012-06-11  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
768
769         Using extrernal ICU library on case unsensitive drives will not work
770         https://bugs.webkit.org/show_bug.cgi?id=70913
771
772         Reviewed by Csaba Osztrogonác.
773
774         * platform/graphics/surfaces/GraphicsSurface.h:
775
776 2012-06-11  Dana Jansens  <danakj@chromium.org>
777
778         [chromium] Use TextureDrawQuad for video layer output when it produces a single GL texture
779         https://bugs.webkit.org/show_bug.cgi?id=88814
780
781         Reviewed by Adrienne Walker.
782
783         When a CCVideLayerImpl produces quads for a frame that is contained
784         in a single GL texture, then use the TextureDrawQuad instead of the
785         VideoDrawQuad. Moves the computation for the RGBA(software) and
786         NativeTexture (hardware) cases from LayerRendererChromium into
787         CCVideoLayerImpl, so it can embed these values in the TextureDrawQuad.
788
789         No new tests, behaviour should be the same.
790
791         * platform/graphics/chromium/LayerRendererChromium.cpp:
792         (WebCore::LayerRendererChromium::drawStreamTexture):
793         (WebCore::LayerRendererChromium::drawVideoQuad):
794         * platform/graphics/chromium/LayerRendererChromium.h:
795         (LayerRendererChromium):
796         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
797         (WebCore::CCVideoLayerImpl::appendQuads):
798
799 2012-06-12  Silvia Pfeiffer  <silviapf@chromium.org>
800
801         Change the volume slider to horizontal rendering for Chrome video controls.
802         https://bugs.webkit.org/show_bug.cgi?id=87835
803
804         Reviewed by Eric Carlson.
805
806         No new tests - final patch in the Chrome controls update series will contain rebaselined tests.
807
808         The Chrome video controls are receiving a visual update. The volume slider is moved into
809         the controls with horizontal rendering, the volume slider container is removed. The visual
810         update itself is in a separate patch.
811
812         * css/mediaControlsChromium.css:
813         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
814         Removed relative positioning to render all controls elements equally in DOM order.
815         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
816         Removed absolute positioning to render all controls elements equally in DOM order.
817         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
818         Removed absolute positioning to render all controls elements equally in DOM order.
819         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
820         Removed volume slider container - it's not necessary any more.
821         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
822         Remove flexbox and introduce inline display to always display this field.
823         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
824         Removed absolute positioning to render all controls elements equally in DOM order.
825         * html/shadow/MediaControlRootElementChromium.cpp:
826         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
827         Removed volume slider container - it's not necessary any more.
828         (WebCore::MediaControlRootElementChromium::create):
829         Appended the volume slider and the mute button directly to the panel, removed volume slider container.
830         (WebCore::MediaControlRootElementChromium::setMediaController):
831         Removed volume slider container.
832         (WebCore::MediaControlRootElementChromium::reportedError):
833         Removed volume slider container.
834         (WebCore::MediaControlRootElementChromium::showVolumeSlider):
835         Removed volume slider container.
836         * html/shadow/MediaControlRootElementChromium.h:
837         (WebCore):
838         (MediaControlRootElementChromium):
839         Removed volume slider container.
840         * html/shadow/SliderThumbElement.cpp:
841         (WebCore::hasVerticalAppearance):
842         Allow use of horizontal media volume slider.
843         (WebCore::RenderSliderThumb::layout):
844         Reuse hasVerticalAppearance function.
845         * rendering/RenderMediaControlsChromium.cpp:
846         (WebCore::RenderMediaControlsChromium::paintMediaVolumeSlider):
847         Change line drawing from vertical to horizontal.
848         * rendering/RenderTheme.h:
849         (WebCore::RenderTheme::usesVerticalVolumeSlider):
850         Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
851         * rendering/RenderThemeChromiumMac.h:
852         (WebCore::RenderThemeChromiumMac::usesVerticalVolumeSlider):
853         Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
854         Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
855         * rendering/RenderThemeChromiumSkia.h:
856         (WebCore::RenderThemeChromiumSkia::usesVerticalVolumeSlider):
857         Add usesVerticalVolumeSlider function to allow horizontal volume sliders.
858
859 2012-06-12  Andrei Bucur  <abucur@adobe.com>
860
861         [CSSRegions]NamedFlow::overset should return true when there's no region chain attached
862         https://bugs.webkit.org/show_bug.cgi?id=88515
863
864         The CSS Regions specifies that the "overset" attribute needs to return true if the content overflows, there's no region attached to the flow
865         or if the NamedFlow is in the NULL state:
866         http://www.w3.org/TR/css3-regions/#dom-named-flow-overset
867
868         This patch updates WebKit's behavior in the last two situations to match the one in the spec.
869
870         Reviewed by Andreas Kling.
871
872         Test: fast/regions/webkit-named-flow-overset.html was updated
873
874         * rendering/RenderFlowThread.cpp:
875         (WebCore::RenderFlowThread::RenderFlowThread):
876         (WebCore::RenderFlowThread::computeOverflowStateForRegions): If the last valid region is null, the flow has not region chain attached or it's in the NULL state.
877
878 2012-06-12  Rahul Tiwari  <rahultiwari.cse.iitr@gmail.com>
879
880         Web Inspector: Provide context menu for deleting recorded profile on Profiles Panel
881         https://bugs.webkit.org/show_bug.cgi?id=88286
882
883         Added the context menu to delete the selected profile.
884
885         Reviewed by Pavel Feldman.
886
887         No new tests required as UI related change
888
889         * English.lproj/localizedStrings.js: Removed property svn:mime-type.
890         * inspector/front-end/ProfilesPanel.js:
891         (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
892
893 2012-06-12  Pavel Feldman  <pfeldman@chromium.org>
894
895         Not reviewed: removed svn:mime-type property from English.lproj/localizedStrings.js
896
897         * English.lproj/localizedStrings.js
898
899 2012-06-12  Dan Bernstein  <mitz@apple.com>
900
901         Tried to fix the notification-enabled build after r120044.
902
903         * notifications/NotificationController.cpp:
904         (WebCore::NotificationController::NotificationController):
905         (WebCore::NotificationController::create):
906         (WebCore::provideNotification):
907         * notifications/NotificationController.h:
908         (NotificationController):
909
910 2012-06-12  Huang Dongsung  <luxtella@company100.net>
911
912         [Qt][Texmap] Falling leaves demo missing clipping.
913         https://bugs.webkit.org/show_bug.cgi?id=88704
914
915         The bug originated from begining native painting mode of QPainter after enabling
916         scissor test, because begining native painting mode disables scissor test.
917
918         Covered by existing compositing tests.
919
920         Reviewed by Noam Rosenthal.
921
922         * platform/graphics/texmap/TextureMapperGL.cpp:
923         (WebCore::TextureMapperGL::beginPainting):
924
925 2012-06-12  Csaba Osztrogonác  <ossy@webkit.org>
926
927         [Qt][Win] Buildfix related to fromWinHBITMAP
928         https://bugs.webkit.org/show_bug.cgi?id=88863
929
930         Reviewed by Jocelyn Turcotte.
931
932         * platform/graphics/qt/GraphicsContextQt.cpp: Add qt_pixmapFromWinHBITMAP and HBitmapFormat enum.
933         (WebCore):
934         (WebCore::GraphicsContext::releaseWindowsContext):
935         * platform/graphics/qt/ImageQt.cpp:
936         (WebCore): Move qt_pixmapFromWinHBITMAP to outside of WebCore namespace. (Fix after r119924.)
937
938 2012-06-12  Takashi Sakamoto  <tasak@google.com>
939
940         [Shadow DOM] <style> inside Shadow subtree should be scoped inside the subtree.
941         https://bugs.webkit.org/show_bug.cgi?id=87805
942
943         Modified HTMLStyleElement to be treated as a scoped style independent
944         of its "scoped" attribute's value if HTMLStyleElement is in shadow
945         subtree. HTMLStyleElement has the following four cases talking about
946         "scoped" attribute and whether is in shadow subtree or not:
947         1, HTMLStyleElement is "scoped" and is in document tree,
948         2, HTMLStyleElement is "scoped" and is in shadow subtree,
949         3, HTMLStyleElement is not "scoped" and is in document tree, and
950         4, HTMLStyleElement is not "scoped" and is in shadow subtree.
951         The case 1 and 2 are not changed. This patch affected the case 4.
952         At the case 4, the HTMLStyleElement's scoping node is the shadow root.
953         This change is the first step for fixing style scope bug,
954         i.e. HTMLStyleElements in shadow subtree are applied to any element
955         in document tree.
956
957         Reviewed by Dimitri Glazkov.
958
959         Test: fast/css/style-scoped/style-scoped-change-scoped-in-shadow.html
960
961         * css/StyleResolver.cpp:
962         (WebCore::StyleResolver::determineScope):
963         Modified to return a shadow root if a targeted stylesheet owner node is
964         not scoped but in some shadow DOM subtree.
965         * html/HTMLStyleElement.cpp:
966         (WebCore::HTMLStyleElement::HTMLStyleElement):
967         (WebCore::HTMLStyleElement::parseAttribute):
968         Modified to use the below scopedAttributeChanged when a changed
969         attribute's name is "scoped".
970         (WebCore::HTMLStyleElement::scopedAttributeChanged):
971         Newly added. According to new scoped value and isInShadowTree,
972         add or remove style rules to/from scopedAuthorRules via
973         registerWithScopingNode or unregisterWithScopingNode.
974         (WebCore::HTMLStyleElement::registerWithScopingNode):
975         Added one boolean argument to determine whether HTMLStyleElement is
976         scoped or not. The reason why not using scoped() is the comment:
977         "We cannot rely on the scoped element already being present when this
978         method is invoked. Therefore we cannot rely on scoped()"
979         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
980         Changed the code for updating m_isRegisteredWithScopingNode. Now
981         set m_scopedStyleRegistrationState to be NotRegistered.
982         (WebCore::HTMLStyleElement::insertedInto):
983         Modified to invoke registerWithScopingNode when an element is not
984         scoped but in some shadow subtree.
985         (WebCore::HTMLStyleElement::removedFrom):
986         Modified to invoke unregisterWithScopingNode when an element is not
987         scoped but in some shadow subtree.
988         * html/HTMLStyleElement.h:
989         (HTMLStyleElement):
990         Modified the type of m_isRegisteredWithScopingNode from bool to
991         enum and renamed to m_scopedStyleRegistrationState. Now the member
992         variable keeps what HTMLStyleElement's scoping node is, i.e.
993         none (this means, not in shadow subtree and not scoped), shadow root or
994         parent node.
995         Added one new method scopedAttributeChanged's declaration and
996         modified the declaration of registerWithScopingNode.
997
998 2012-06-12  Amy Ousterhout  <aousterh@chromium.org>
999
1000         Removing unused parameter Page
1001         https://bugs.webkit.org/show_bug.cgi?id=88848
1002
1003         Reviewed by Kentaro Hara.
1004
1005         Removed the unused parameter Page* supplied to the create function
1006         and constructor in DeviceOrientationController.
1007
1008         The parameter Page* was previously stored in an instance variable
1009         m_page, but this was removed (see https://bugs.webkit.org/show_bug.cgi?id=88812).
1010
1011         No new tests because the removed parameter was unused and untested.
1012
1013         * dom/DeviceOrientationController.cpp:
1014         (WebCore::DeviceOrientationController::DeviceOrientationController):
1015         (WebCore::DeviceOrientationController::create):
1016         (WebCore::provideDeviceOrientationTo):
1017         * dom/DeviceOrientationController.h:
1018         (DeviceOrientationController):
1019
1020 2012-06-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1021
1022         Unreviewed, rolling out r120051.
1023         http://trac.webkit.org/changeset/120051
1024         https://bugs.webkit.org/show_bug.cgi?id=88852
1025
1026         some tests are crashing (Requested by morrita on #webkit).
1027
1028         * CMakeLists.txt:
1029         * GNUmakefile.list.am:
1030         * Target.pri:
1031         * WebCore.gypi:
1032         * WebCore.vcproj/WebCore.vcproj:
1033         * WebCore.xcodeproj/project.pbxproj:
1034         * bindings/generic/ContextEnabledFeatures.cpp: Renamed from Source/WebKit/chromium/src/ContextFeaturesClientImpl.cpp.
1035         (WebCore):
1036         (WebCore::ContextEnabledFeatures::shadowDOMEnabled):
1037         (WebCore::ContextEnabledFeatures::styleScopedEnabled):
1038         (WebCore::ContextEnabledFeatures::pagePopupEnabled):
1039         * bindings/generic/ContextEnabledFeatures.h: Renamed from Source/WebKit/chromium/src/ContextFeaturesClientImpl.h.
1040         (WebCore):
1041         (ContextEnabledFeatures):
1042         * bindings/scripts/CodeGeneratorV8.pm:
1043         (GenerateImplementation):
1044         * css/StyleResolver.cpp:
1045         (WebCore::StyleResolver::determineScope):
1046         * dom/ContextFeatures.cpp: Removed.
1047         * dom/ContextFeatures.h: Removed.
1048         * dom/DOMAllInOne.cpp:
1049         * dom/DOMImplementation.cpp:
1050         (WebCore::DOMImplementation::createDocument):
1051         (WebCore::DOMImplementation::createHTMLDocument):
1052         * dom/Document.cpp:
1053         (WebCore::Document::Document):
1054         * dom/Document.h:
1055         (WebCore):
1056         (Document):
1057         * dom/Position.cpp:
1058         (WebCore::Position::Position):
1059         (WebCore::Position::findParent):
1060         * dom/TreeScope.cpp:
1061         (WebCore::TreeScope::getSelection):
1062         * dom/make_names.pl:
1063         (printConstructorInterior):
1064         (printFactoryCppFile):
1065         (printWrapperFunctions):
1066         (printWrapperFactoryCppFile):
1067         * editing/markup.cpp:
1068         (WebCore::createFragmentFromMarkupWithContext):
1069         * html/HTMLStyleElement.cpp:
1070         (WebCore::HTMLStyleElement::registerWithScopingNode):
1071         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
1072         * html/shadow/HTMLContentElement.cpp:
1073         (WebCore::contentTagName):
1074         * inspector/DOMPatchSupport.cpp:
1075         (WebCore::DOMPatchSupport::patchDocument):
1076         * loader/FrameLoaderClient.h:
1077         (WebCore::FrameLoaderClient::allowShadowDOM):
1078         (WebCore::FrameLoaderClient::allowStyleScoped):
1079         (FrameLoaderClient):
1080         (WebCore::FrameLoaderClient::allowPagePopup):
1081         * platform/RefCountedSupplement.h: Removed.
1082         * platform/Supplementable.h:
1083         * xml/XMLHttpRequest.cpp:
1084         (WebCore::XMLHttpRequest::responseXML):
1085
1086 2012-06-11  Kaustubh Atrawalkar  <kaustubh@motorola.com>
1087
1088         [DRT] LTC:: counterValueForElementById() could be moved to Internals.
1089         https://bugs.webkit.org/show_bug.cgi?id=84406
1090
1091         Reviewed by Hajime Morita.
1092
1093         Move the counterValueForElementById from LayoutTestCotroller to Internals and
1094         remove the old platform specific implementations as it exclusively tests WebCore functionality.
1095
1096         Covered by existing test cases.
1097
1098         * testing/Internals.cpp:
1099         (WebCore::Internals::counterValue):
1100         (WebCore):
1101         * testing/Internals.h:
1102         (Internals):
1103         * testing/Internals.idl:
1104
1105 2012-06-11  Hans Wennborg  <hans@chromium.org>
1106
1107         Speech JavaScript API: Make SpeechRecognitionError an Event
1108         https://bugs.webkit.org/show_bug.cgi?id=88784
1109
1110         Reviewed by Adam Barth.
1111
1112         Make SpeechRecognitionError an Event. The spec was updated to make it
1113         an event in its own right, rather than an attribute of
1114         SpeechRecognitionEvent.
1115
1116         Test: fast/speech/scripted/speechrecognition-errors.html
1117
1118         * Modules/speech/SpeechRecognition.cpp:
1119         (WebCore::SpeechRecognition::didReceiveError):
1120         * Modules/speech/SpeechRecognitionError.cpp:
1121         (WebCore::SpeechRecognitionError::SpeechRecognitionError):
1122         (WebCore::SpeechRecognitionError::interfaceName):
1123         (WebCore):
1124         * Modules/speech/SpeechRecognitionError.h:
1125         (WebCore::SpeechRecognitionError::create):
1126         (SpeechRecognitionError):
1127         * Modules/speech/SpeechRecognitionError.idl:
1128         * Modules/speech/SpeechRecognitionEvent.cpp:
1129         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
1130         * Modules/speech/SpeechRecognitionEvent.h:
1131         (SpeechRecognitionEventInit):
1132         (SpeechRecognitionEvent):
1133         * Modules/speech/SpeechRecognitionEvent.idl:
1134         * dom/EventNames.in:
1135
1136 2012-06-12  MORITA Hajime  <morrita@google.com>
1137
1138         REGRESSION(r118098): <content> element does not render distributed children when cloned from another document
1139         https://bugs.webkit.org/show_bug.cgi?id=88148
1140
1141         Reviewed by Dimitri Glazkov.
1142
1143         The shadow DOM availability was decided through FrameLoaderClient.
1144         But there are documents which don't have any associated frames, in
1145         which any shadow DOM related elements cannot be constructed.  That
1146         resulsted the regression.
1147
1148         This change introduces a Page-based client called
1149         ContextFeaturesClient which takes the role from FrameLoaderClient
1150         to decide the feature availability, and ContextFeatures which is a
1151         proxy of ContextFeaturesClient.  ContextEnabledFeatures is is
1152         replaced with ContextFeatures.
1153
1154         Each ContextFeatures object is owned by a Page, and is attached to
1155         each Document in the page even if the page itself has no referenct
1156         to Frames or Pages. With ContextFeatures, each Document can decide
1157         the feature availability even if it cannot reach Page or Frame.
1158
1159         On RefCountedSupplement: Document instance can live longer than a
1160         Page where it is shwon. This means that ContextFeatures instance
1161         needs to survive after owner Page destruction because it's
1162         referenced from possibly surviving Documents. RefCountedSupplement
1163         is introduced to cover this scenario: It allows supplement classes
1164         to live after Page's destruction.
1165
1166         RefCountedSupplement::hostDestroyed() is notified when the hosting
1167         page is gone. ContextFeatures clears its reference to the client
1168         using this notification.
1169
1170         Test: fast/dom/shadow/elements-in-frameless-document.html
1171
1172         * CMakeLists.txt:
1173         * GNUmakefile.list.am:
1174         * Target.pri:
1175         * WebCore.gypi:
1176         * WebCore.vcproj/WebCore.vcproj:
1177         * WebCore.xcodeproj/project.pbxproj:
1178         * bindings/scripts/CodeGeneratorV8.pm:
1179         (GenerateImplementation):
1180         * css/StyleResolver.cpp:
1181         (WebCore::StyleResolver::determineScope):
1182         * dom/ContextFeatures.cpp: Added.
1183         (WebCore):
1184         (WebCore::ContextFeaturesClient::empty):
1185         (WebCore::ContextFeatures::supplementName):
1186         (WebCore::ContextFeatures::defaultSwitch):
1187         (WebCore::ContextFeatures::shadowDOMEnabled):
1188         (WebCore::ContextFeatures::styleScopedEnabled):
1189         (WebCore::ContextFeatures::pagePopupEnabled):
1190         (WebCore::provideContextFeaturesTo):
1191         (WebCore::provideContextFeaturesToDocumentFrom):
1192         * dom/ContextFeatures.h: Added.
1193         (WebCore):
1194         (ContextFeatures):
1195         (WebCore::ContextFeatures::ContextFeatures):
1196         (WebCore::ContextFeatures::hostDestroyed):
1197         (ContextFeaturesClient):
1198         (WebCore::ContextFeaturesClient::~ContextFeaturesClient):
1199         (WebCore::ContextFeaturesClient::isEnabled):
1200         (WebCore::ContextFeatures::create):
1201         (WebCore::ContextFeatures::isEnabled):
1202         * dom/DOMAllInOne.cpp:
1203         * dom/DOMImplementation.cpp:
1204         (WebCore::DOMImplementation::createDocument):
1205         (WebCore::DOMImplementation::createHTMLDocument):
1206         * dom/Document.h:
1207         (WebCore::Document::contextFeatures):
1208         * dom/Document.cpp:
1209         (WebCore::Document::Document):
1210         (WebCore::Document::setContextFeatures):
1211         * dom/Position.cpp:
1212         (WebCore::Position::Position):
1213         (WebCore::Position::findParent):
1214         * dom/TreeScope.cpp:
1215         (WebCore::TreeScope::getSelection):
1216         * dom/make_names.pl:
1217         (printConstructorInterior):
1218         (printFactoryCppFile):
1219         (printWrapperFunctions):
1220         (printWrapperFactoryCppFile):
1221         * editing/markup.cpp:
1222         (WebCore::createFragmentFromMarkupWithContext):
1223         * html/HTMLStyleElement.cpp:
1224         (WebCore::HTMLStyleElement::registerWithScopingNode):
1225         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
1226         * html/shadow/HTMLContentElement.cpp:
1227         (WebCore::contentTagName):
1228         * inspector/DOMPatchSupport.cpp:
1229         (WebCore::DOMPatchSupport::patchDocument):
1230         * loader/FrameLoaderClient.h:
1231         * platform/RefCountedSupplement.h: Copied from Source/WebCore/platform/Supplementable.h.
1232         (WebCore):
1233         (RefCountedSupplement):
1234         (WebCore::RefCountedSupplement::hostDestroyed):
1235         (Wrapper):
1236         (WebCore::RefCountedSupplement::Wrapper::Wrapper):
1237         (WebCore::RefCountedSupplement::Wrapper::~Wrapper):
1238         (WebCore::RefCountedSupplement::Wrapper::wrapped):
1239         (WebCore::RefCountedSupplement::provideTo):
1240         (WebCore::RefCountedSupplement::from):
1241         * platform/Supplementable.h:
1242         (WebCore::Supplement::isRefCountedWrapper):
1243         * xml/XMLHttpRequest.cpp:
1244         (WebCore::XMLHttpRequest::responseXML):
1245
1246 2012-06-12  Kent Tamura  <tkent@chromium.org>
1247
1248         Remove unnecessary functions: setName() and formControlName()
1249         https://bugs.webkit.org/show_bug.cgi?id=88392
1250
1251         Reviewed by Kentaro Hara.
1252
1253         'name' IDL attributes of form-related elements should be [Reflected],
1254         and we don't need to have setName(). We used formControlName() for
1255         name() implementation, and formControlName() is not needed because it
1256         just converts a null attribute to an empty string. Our binding code does it.
1257
1258         We don't remove FormAssociatedElement::name() because many C++ code use it.
1259
1260         FormAssociatedElement::name() is virtual, and HTMLInputElement overrides
1261         it so that it returns a cache of the name attribtue value because
1262         CheckedRadioButtons class needs to know an old name attribute value when
1263         the name attribtue is changed.
1264
1265         References:
1266         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#dom-object-name
1267         http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-form-name
1268         http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-fe-name
1269
1270         Test: fast/forms/name-attribute.html
1271
1272         * dom/Element.h: Remove formControlName().
1273         * html/FormAssociatedElement.cpp:
1274         (WebCore::FormAssociatedElement::name):
1275         Copied from formControlName() implementation of HTMLFormControlElement.
1276         * html/FormAssociatedElement.h:
1277         (FormAssociatedElement): Make name() virtual, remove formControlName().
1278         * html/FormController.cpp:
1279         (WebCore::FormController::formElementsState):
1280         Use name() instead of formControlName().
1281         * html/HTMLFormControlElement.cpp:
1282         Remove formControlName() and setName().
1283         * html/HTMLFormControlElement.h: ditto.
1284         * html/HTMLInputElement.cpp:
1285         (WebCore::HTMLInputElement::name): Renamed from formControlName().
1286         * html/HTMLInputElement.h:
1287         (HTMLInputElement): Renamed formControlName() to name(), and make it public.
1288         * html/HTMLKeygenElement.idl: Make 'name' [Reflected].
1289         * html/HTMLObjectElement.cpp: Remove formControlName().
1290         * html/HTMLObjectElement.h: ditto.
1291         * html/HTMLSelectElement.cpp:
1292         (WebCore::HTMLSelectElement::appendFormData):
1293         Use name() instead of formControlName().
1294         * html/HTMLSelectElement.idl: Make 'name' [Reflected].
1295         * html/HTMLTextAreaElement.idl: Make 'name' [Reflected].
1296
1297 2012-06-11  Nico Weber  <thakis@chromium.org>
1298
1299         Remove unused member variables found by clang's -Wunused-private-field
1300         https://bugs.webkit.org/show_bug.cgi?id=88812
1301
1302         Reviewed by Anders Carlsson.
1303
1304         Change a few |class|s that were used only to pin down the size of
1305         existing classes to |struct|, so that clang doesn't warn about these
1306         memvars.
1307
1308         No intended behavior change.
1309
1310         * Modules/geolocation/GeolocationController.cpp:
1311         (WebCore::GeolocationController::GeolocationController):
1312         * Modules/geolocation/GeolocationController.h:
1313         (GeolocationController):
1314         * Modules/webaudio/AudioContext.h:
1315         (AudioContext):
1316         * Modules/webaudio/AudioParamTimeline.h:
1317         (AudioParamTimeline):
1318         * accessibility/AccessibilityScrollbar.h:
1319         (AccessibilityScrollbar):
1320         * bindings/v8/ScriptScope.cpp:
1321         (WebCore::ScriptScope::ScriptScope):
1322         * bindings/v8/ScriptScope.h:
1323         (ScriptScope):
1324         * css/CSSValue.cpp:
1325         * css/StylePropertySet.cpp:
1326         * dom/DeviceOrientationController.cpp:
1327         (WebCore::DeviceOrientationController::DeviceOrientationController):
1328         * dom/DeviceOrientationController.h:
1329         (DeviceOrientationController):
1330         * editing/ReplaceSelectionCommand.cpp:
1331         (ReplacementFragment):
1332         (WebCore::ReplacementFragment::ReplacementFragment):
1333         * editing/TextIterator.cpp:
1334         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
1335         * editing/TextIterator.h:
1336         (SimplifiedBackwardsTextIterator):
1337         (BackwardsCharacterIterator):
1338         * html/HTMLFormCollection.cpp:
1339         (WebCore::HTMLFormCollection::HTMLFormCollection):
1340         * html/HTMLFormCollection.h:
1341         (HTMLFormCollection):
1342         * html/shadow/MediaControlElements.cpp:
1343         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
1344         * html/shadow/MediaControlElements.h:
1345         (MediaControlFullscreenButtonElement):
1346         * html/shadow/MediaControlRootElementChromium.cpp:
1347         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
1348         * html/shadow/MediaControlRootElementChromium.h:
1349         (MediaControlRootElementChromium):
1350         * html/track/LoadableTextTrack.cpp:
1351         (WebCore::LoadableTextTrack::LoadableTextTrack):
1352         * html/track/LoadableTextTrack.h:
1353         (LoadableTextTrack):
1354         * inspector/CodeGeneratorInspector.py:
1355         (Generator.go):
1356         * inspector/InspectorCSSAgent.cpp:
1357         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
1358         * inspector/InspectorCSSAgent.h:
1359         (InspectorCSSAgent):
1360         * inspector/InspectorDOMDebuggerAgent.cpp:
1361         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
1362         * inspector/InspectorDOMDebuggerAgent.h:
1363         (InspectorDOMDebuggerAgent):
1364         * inspector/InspectorMemoryAgent.cpp:
1365         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
1366         * inspector/InspectorMemoryAgent.h:
1367         (InspectorMemoryAgent):
1368         * notifications/NotificationController.cpp:
1369         (WebCore::NotificationController::NotificationController):
1370         * notifications/NotificationController.h:
1371         (NotificationController):
1372         * page/animation/CompositeAnimation.h:
1373         (WebCore::CompositeAnimation::CompositeAnimation):
1374         (CompositeAnimation):
1375         * platform/Length.cpp:
1376         * platform/audio/ReverbConvolver.cpp:
1377         (WebCore::ReverbConvolver::ReverbConvolver):
1378         * platform/audio/ReverbConvolver.h:
1379         (ReverbConvolver):
1380         * platform/audio/ReverbConvolverStage.cpp:
1381         (WebCore::ReverbConvolverStage::ReverbConvolverStage):
1382         * platform/audio/ReverbConvolverStage.h:
1383         (ReverbConvolverStage):
1384         * platform/graphics/TextRun.cpp:
1385         (ExpectedTextRunSize):
1386         * platform/graphics/chromium/cc/CCThreadProxy.h:
1387         (CCThreadProxy):
1388         * platform/graphics/filters/FECustomFilter.cpp:
1389         (WebCore::FECustomFilter::FECustomFilter):
1390         * platform/graphics/filters/FECustomFilter.h:
1391         (FECustomFilter):
1392         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1393         (JPEGImageReader):
1394         * platform/leveldb/LevelDBTransaction.cpp:
1395         (WebCore::LevelDBTransaction::TreeIterator::next):
1396         * platform/text/TextCodecICU.cpp:
1397         (WebCore::TextCodecICU::TextCodecICU):
1398         * platform/text/TextCodecICU.h:
1399         (TextCodecICU):
1400         * rendering/InlineBox.cpp:
1401         * rendering/InlineFlowBox.cpp:
1402         * rendering/RenderText.cpp:
1403         * rendering/style/KeyframeList.h:
1404         (WebCore::KeyframeList::KeyframeList):
1405         (KeyframeList):
1406         * rendering/svg/RenderSVGTextPath.cpp:
1407         (WebCore::RenderSVGTextPath::RenderSVGTextPath):
1408         * rendering/svg/RenderSVGTextPath.h:
1409         * rendering/svg/SVGInlineTextBox.cpp:
1410         * svg/SVGPathByteStreamSource.cpp:
1411         * svg/SVGPathByteStreamSource.h:
1412         * svg/SVGPathTraversalStateBuilder.cpp:
1413         (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder):
1414         * svg/SVGPathTraversalStateBuilder.h:
1415         (SVGPathTraversalStateBuilder):
1416         * xml/XSLStyleSheet.h:
1417
1418 2012-06-11  Kinuko Yasuda  <kinuko@chromium.org>
1419
1420         XHR returns size==0 Blob
1421         https://bugs.webkit.org/show_bug.cgi?id=88750
1422
1423         Reviewed by Alexey Proskuryakov.
1424
1425         Response Blob's .size field must have the correct response size.
1426
1427         Test: http/tests/xmlhttprequest/response-blob-size.html
1428
1429         * xml/XMLHttpRequest.cpp:
1430         (WebCore::XMLHttpRequest::responseBlob):
1431
1432 2012-06-11  Silvia Pfeiffer  <silviapf@chromium.org>
1433
1434         Introduce an Enclosure Element for Chromium video controls.
1435         https://bugs.webkit.org/show_bug.cgi?id=87683
1436
1437         Reviewed by Eric Carlson.
1438
1439         Updated tests.
1440
1441         The Chrome video controls are receiving a visual update. A new enclosure div is required
1442         to provide for a offset space from the video's boundaries. The visual update itself is in
1443         a separate patch.
1444
1445         * css/mediaControlsChromium.css:
1446         (video::-webkit-media-controls-enclosure):
1447         Introduce CSS for enclosure div so it doesn't show yet.
1448         * html/shadow/MediaControlRootElementChromium.cpp:
1449         (WebCore::MediaControlChromiumEnclosureElement::MediaControlChromiumEnclosureElement):
1450         Definition of the new enclosure element.
1451         (WebCore::MediaControlChromiumEnclosureElement::create):
1452         Definition of a create operator for the new enclosure element.
1453         (WebCore::MediaControlChromiumEnclosureElement::shadowPseudoId):
1454         Definition of the shadowPseudoId of -webkit-media-controls-enclosure for the enclosure div.
1455         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
1456         Initialize member element for enclosure div.
1457         (WebCore::MediaControlRootElementChromium::create):
1458         Instantiate enclosure div and add into DOM between controls and panel elements.
1459         (WebCore::MediaControlRootElementChromium::setMediaController):
1460         Set media controller for enclosure div.
1461         (WebCore::MediaControlRootElementChromium::createTextTrackDisplay):
1462         Insert text track display container to enclosure rather than panel.
1463         * html/shadow/MediaControlRootElementChromium.h:
1464         (WebCore):
1465         (MediaControlChromiumEnclosureElement):
1466         (WebCore::MediaControlChromiumEnclosureElement::setMediaController):
1467         (WebCore::MediaControlChromiumEnclosureElement::mediaController):
1468         (WebCore::MediaControlChromiumEnclosureElement::isMediaControlElement):
1469         Add declaration of the new enclosure element and its member functions.
1470         (MediaControlRootElementChromium):
1471         Add member variable to controls root element to hold the enclosure element.
1472
1473 2012-06-11  Elliott Sprehn  <esprehn@gmail.com>
1474
1475         WebKit doesn't allow replacing the document element with a DocumentFragment containing one element
1476         https://bugs.webkit.org/show_bug.cgi?id=88681
1477
1478         Reviewed by Ojan Vafai.
1479
1480         Fix bug where replacing an immediate child of a Document with a DocumentFragment
1481         would throw a HIERARCHY_REQUEST_ERR instead of replacing the node as required by DOM4.
1482         http://www.w3.org/TR/domcore/#mutation-algorithms
1483
1484         * dom/Document.cpp:
1485         (WebCore::Document::canReplaceChild):
1486             When the newChild was a DocumentFragment we incorrectly
1487             iterated over the document's children twice instead of the
1488             fragment when counting the total number of elements and
1489             doctypes to enfoce that there's only one of each.
1490
1491 2012-06-11  Mary Wu  <mary.wu@torchmobile.com.cn>
1492
1493         [BlackBerry] Add handling of notifyDataReceived in NetworkJob even there's no data inside
1494         https://bugs.webkit.org/show_bug.cgi?id=88773
1495
1496         Reviewed by Rob Buis.
1497
1498         Handling notifyDataReceived event even if there is no data inside.
1499         This event was critical because it gives downloadFilterStream a chance
1500         to follow up NetworkStream close event, and it also make pluginView in
1501         FrameLoaderBlackBerry return normal logic.
1502
1503         RIM PR# 164563
1504
1505         Reviewed internally by Leo Yang.
1506
1507         * platform/network/blackberry/NetworkJob.cpp:
1508         (WebCore::NetworkJob::handleNotifyDataReceived):
1509
1510 2012-06-11  Mary Wu  <mary.wu@torchmobile.com.cn>
1511
1512         [BlackBerry] Wrong mimetype for empty file link
1513         https://bugs.webkit.org/show_bug.cgi?id=88642
1514
1515         Reviewed by Rob Buis.
1516
1517         RIM PR# 164164
1518
1519         For empty file link, we shouldn't give "application/octet-stream"
1520         which will lead to download.
1521
1522         Reviewed internally by Charles Wei.
1523
1524         * platform/network/blackberry/NetworkJob.cpp:
1525         (WebCore::NetworkJob::sendResponseIfNeeded):
1526
1527 2012-06-11  Jin Yang  <jin.a.yang@intel.com>
1528
1529         GeneratorGeneratedImage should cache images for the non-tiled case
1530         https://bugs.webkit.org/show_bug.cgi?id=87094
1531
1532         Reviewed by Simon Fraser.
1533
1534         We cache the generated image if generator is not changed. By compared
1535         with generating image on the fly, it will lose a little pixel precision
1536         and several layout tests should be rebaselined. With this patch, the IE test
1537         drive benchmark "Bayou" can gain about 50%.
1538
1539         No new tests. Performance optimization.
1540
1541         * platform/graphics/GeneratorGeneratedImage.cpp:
1542         (WebCore::GeneratorGeneratedImage::draw):
1543
1544 2012-06-11  Vincent Scheib  <scheib@chromium.org>
1545
1546         Add new Pointer Lock spec attribute webkitPointerLockElement.
1547         https://bugs.webkit.org/show_bug.cgi?id=88799
1548
1549         Reviewed by Dimitri Glazkov.
1550
1551         Part of a series of refactoring changes to update pointer lock API to
1552         the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402
1553
1554         New attribute webkitPointerLockElement added. Follow up patches
1555         will remove the previous isLocked attribute. Tests updated to use
1556         the new attribute.
1557
1558         * bindings/generic/RuntimeEnabledFeatures.h:
1559         (WebCore::RuntimeEnabledFeatures::webkitPointerLockElementEnabled):
1560         * dom/Document.cpp:
1561         (WebCore):
1562         (WebCore::Document::webkitPointerLockElement):
1563         * dom/Document.h:
1564         (Document):
1565         * dom/Document.idl:
1566         * page/PointerLockController.h:
1567         (WebCore::PointerLockController::element):
1568
1569 2012-06-11  Vincent Scheib  <scheib@chromium.org>
1570
1571         Consolidate Pointer Lock runtime enabled flags to just one.
1572         https://bugs.webkit.org/show_bug.cgi?id=88810
1573
1574         Reviewed by Dimitri Glazkov.
1575
1576         No new tests.
1577
1578         * bindings/generic/RuntimeEnabledFeatures.h:
1579         (WebCore::RuntimeEnabledFeatures::pointerLockEnabled):
1580         (WebCore::RuntimeEnabledFeatures::setPointerLockEnabled):
1581         * dom/MouseEvent.idl:
1582         * page/Navigator.idl:
1583
1584 2012-06-11  Alexis Menard  <alexis.menard@openbossa.org>
1585
1586         [CSS3 Backgrounds and Borders] Protect box-decoration-break behind a feature flag.
1587         https://bugs.webkit.org/show_bug.cgi?id=88804
1588
1589         Reviewed by Tony Chang.
1590
1591         Protect box-decoration-break behind a feature flag enabled by default.
1592
1593         No new tests : no behavior change here.
1594
1595         * Configurations/FeatureDefines.xcconfig:
1596         * GNUmakefile.am:
1597         * css/CSSComputedStyleDeclaration.cpp:
1598         (WebCore):
1599         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1600         * css/CSSParser.cpp:
1601         (WebCore::isValidKeywordPropertyAndValue):
1602         (WebCore::isKeywordPropertyID):
1603         (WebCore::CSSParser::parseValue):
1604         * css/CSSPrimitiveValueMappings.h:
1605         (WebCore):
1606         * css/CSSProperty.cpp:
1607         (WebCore::CSSProperty::isInheritedProperty):
1608         * css/CSSValueKeywords.in:
1609         * css/StyleBuilder.cpp:
1610         (WebCore::StyleBuilder::StyleBuilder):
1611         * rendering/style/RenderStyle.h:
1612         * rendering/style/StyleBoxData.cpp:
1613         (WebCore::StyleBoxData::StyleBoxData):
1614         (WebCore::StyleBoxData::operator==):
1615         * rendering/style/StyleBoxData.h:
1616         (StyleBoxData):
1617
1618 2012-06-11  James Robinson  <jamesr@chromium.org>
1619
1620         [chromium] Port DrawingBufferChromium from TextureLayerChromium over to WebExternalTextureLayer
1621         https://bugs.webkit.org/show_bug.cgi?id=86273
1622
1623         Reviewed by Adrienne Walker.
1624
1625         This converts more WebCore code over to using public APIs instead of internal compositor layer types.
1626
1627         Refactor only, no change in behavior thus no new tests.
1628
1629         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1630         (WebCore::DrawingBufferPrivate::DrawingBufferPrivate):
1631         (WebCore::DrawingBufferPrivate::~DrawingBufferPrivate):
1632         (WebCore::DrawingBufferPrivate::layer):
1633         (DrawingBufferPrivate):
1634         * platform/graphics/chromium/TextureLayerChromium.cpp:
1635         (WebCore::TextureLayerChromium::~TextureLayerChromium):
1636         (WebCore::TextureLayerChromium::setRateLimitContext):
1637         (WebCore::TextureLayerChromium::setNeedsDisplayRect):
1638         (WebCore::TextureLayerChromium::update):
1639         * platform/graphics/chromium/TextureLayerChromium.h:
1640         (WebKit):
1641         (TextureLayerChromiumClient):
1642
1643 2012-06-11  Max Feil  <mfeil@rim.com>
1644
1645         [BlackBerry] Seek calls are being unnecessarily delayed
1646         https://bugs.webkit.org/show_bug.cgi?id=88732
1647
1648         Reviewed by Antonio Gomes.
1649
1650         There is a problem with the way the m_userDrivenSeekTimer is
1651         implemented. When MediaPlayerPrivate::seek() is called, there
1652         is always a 100ms delay even if the timer is not running. The
1653         timer is supposed to space out (i.e. throttle) repeated seeks
1654         that come in too soon after a previous seek, but currently it
1655         is slowing down even single seeks and seeks that come in with
1656         adequate delay after a previous seek. I fixed this in my patch
1657         by improving the way the timer fired function is called.
1658         
1659         A note on the new m_lastSeekTimePending flag: This flag is
1660         needed so that userDrivenSeekTimerFired() knows whether or not
1661         to perform the seek. The only case where this flag will not be
1662         set is if no MediaPlayerPrivate::seek() call came in while the
1663         timer was active, in which case it's important to do nothing.
1664         I could encode this flag's information into the m_lastSeekTime
1665         float, for example by initializing it and resetting it to NAN
1666         and using isnan(). But I feel that using a separate bool is a
1667         more portable approach.
1668
1669         No new tests. I would like to propose not including a layout test
1670         with this fix. Doing timing tests for 100ms delays is tricky
1671         from Javascript, and I don't think the benefit of such a test
1672         outweighs the extra time it would take to develop one. The test
1673         would also be a problem to maintain as it may give different
1674         results over different runs and across different target hardware.
1675
1676         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1677         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1678         (WebCore::MediaPlayerPrivate::seek):
1679         (WebCore::MediaPlayerPrivate::userDrivenSeekTimerFired):
1680         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
1681         (MediaPlayerPrivate):
1682
1683 2012-06-11  Max Feil  <mfeil@rim.com>
1684
1685         [BlackBerry] Unexpected repeats of short media
1686         https://bugs.webkit.org/show_bug.cgi?id=88733
1687
1688         Reviewed by Antonio Gomes.
1689
1690         The m_userDrivenSeekTimer is causing unwanted repeats of short
1691         media such as sound effects because it is causing the current
1692         time to not reflect that the media has finished playing.
1693         This problem only affects media whose duration is close to
1694         or less than the SeekSubmissionDelay, which is currently
1695         set to 100ms. My fix is to ignore the userDrivenSeekTimer in
1696         MediaPlayerPrivate::currentTime() if the duration of the media
1697         is within twice the SeekSubmissionDelay. Seek drag smoothness
1698         is a non-issue for such short media.
1699
1700         Test: platform/blackberry/media/short-media-repeats-correctly.html
1701
1702         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1703         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1704         (WebCore):
1705         (WebCore::MediaPlayerPrivate::currentTime):
1706         (WebCore::MediaPlayerPrivate::seek):
1707         (WebCore::MediaPlayerPrivate::userDrivenSeekTimerFired):
1708         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
1709         (MediaPlayerPrivate):
1710
1711 2012-06-11  Julien Chaffraix  <jchaffraix@webkit.org>
1712
1713         Account for margin after when laying out <legend> element
1714         https://bugs.webkit.org/show_bug.cgi?id=35981
1715
1716         Reviewed by Abhishek Arya.
1717
1718         Tests: fast/forms/legend-after-margin-horizontal-writing-mode.html
1719                fast/forms/legend-after-margin-vertical-writing-mode.html
1720                fast/forms/legend-after-margin-with-before-border-horizontal-mode.html
1721                fast/forms/legend-small-after-margin-before-border-horizontal-mode.html
1722
1723         The existing code would ignore margin after when layouting out the <legend>. This
1724         change only adds the code to handle the margin after, the margin before is still
1725         ignored as it's not obvious how it should be working.
1726
1727         * rendering/RenderFieldset.cpp:
1728         (WebCore::RenderFieldset::layoutSpecialExcludedChild):
1729         Split the code in 2 code paths to reflect how we position and size. Those are covered by the
1730         tests above.
1731
1732 2012-06-11  James Robinson  <jamesr@chromium.org>
1733
1734         [chromium] Use WebGraphicsContext3D in rate limiting logic inside compositor
1735         https://bugs.webkit.org/show_bug.cgi?id=86259
1736
1737         Reviewed by Adrienne Walker.
1738
1739         This refactors the compositor's rate limiting implementation to use the Platform API's WebGraphicsContext3D
1740         directly instead of WebCore::GraphicsContext3D to cut down on the number of spurious WebCore dependencies in the
1741         compositor.  The one change in contract is that the caller to CCLayerTreeHost::startRateLimit() now has to call
1742         CCLayerTreeHost::stopRateLimit() before allowing the referenced context to go away since CCLayerTreeHost no
1743         longer retains a reference, but this was always happening already.
1744
1745         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1746         (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
1747         (WebCore::Canvas2DLayerChromium::setNeedsDisplayRect):
1748         * platform/graphics/chromium/RateLimiter.cpp:
1749         (WebCore::RateLimiter::create):
1750         (WebCore::RateLimiter::RateLimiter):
1751         (WebCore::RateLimiter::start):
1752         (WebCore::RateLimiter::rateLimitContext):
1753         * platform/graphics/chromium/RateLimiter.h:
1754         (WebKit):
1755         (RateLimiter):
1756         * platform/graphics/chromium/TextureLayerChromium.cpp:
1757         (WebCore::TextureLayerChromium::~TextureLayerChromium):
1758         (WebCore::TextureLayerChromium::setRateLimitContext):
1759         (WebCore::TextureLayerChromium::setNeedsDisplayRect):
1760         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1761         (WebCore::CCLayerTreeHost::startRateLimiter):
1762         (WebCore::CCLayerTreeHost::stopRateLimiter):
1763         (WebCore::CCLayerTreeHost::rateLimit):
1764         (WebCore):
1765         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1766         (CCLayerTreeHost):
1767
1768 2012-06-11  Dana Jansens  <danakj@chromium.org>
1769
1770         [chromium] Separate CCVideoDrawQuad and from the layer tree and video provider by removing ManagedTexture and WebVideoFrame pointers from the quad
1771         https://bugs.webkit.org/show_bug.cgi?id=88363
1772
1773         Reviewed by Adrienne Walker.
1774
1775         CCVideoDrawQuad should not contain any pointers to data in the layer
1776         tree so we are able to serialize it across process boundaries. This
1777         patch removes the ManagedTexture pointers from the quad class,
1778         replacing them with texture ids. It removes the WebVideoFrame* from
1779         the quad, replacing it with the frame provider's texture id included
1780         in the WebVideoFrame structure. And it uses a WebTransformationMatrix
1781         instead of a pointer to an array of floats.
1782
1783         Texture allocation is done in CCVideoLayerImpl via the
1784         contentsTextureAllocator, so that the memory usage can be tracked.
1785
1786         We move the copyPlaneToTextures() method back from LayerRendererChromium
1787         to CCVideoLayerImpl, as this method uses the texture data pointer in the
1788         WebVideoFrame, and we do not want to give this pointer to the quad
1789         class. Instead, this method makes use of the LayerTextureSubImage class
1790         to copy the pixel data into the texture.
1791
1792         LayerTextureSubImage is updated to allow non-4byte texture formats.
1793
1794         * platform/graphics/chromium/LayerRendererChromium.cpp:
1795         (WebCore::LayerRendererChromium::drawYUV):
1796         (WebCore::LayerRendererChromium::drawRGBA):
1797         (WebCore::LayerRendererChromium::drawNativeTexture2D):
1798         (WebCore::LayerRendererChromium::drawStreamTexture):
1799         (WebCore::LayerRendererChromium::drawVideoQuad):
1800         * platform/graphics/chromium/LayerTextureSubImage.cpp:
1801         (WebCore::LayerTextureSubImage::uploadWithTexSubImage):
1802         (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage):
1803         * platform/graphics/chromium/TextureCopier.cpp:
1804         * platform/graphics/chromium/cc/CCVideoDrawQuad.cpp:
1805         (WebCore::CCVideoDrawQuad::create):
1806         (WebCore::CCVideoDrawQuad::CCVideoDrawQuad):
1807         * platform/graphics/chromium/cc/CCVideoDrawQuad.h:
1808         (CCVideoDrawQuad):
1809         (WebCore::CCVideoDrawQuad::planes):
1810         (WebCore::CCVideoDrawQuad::frameProviderTextureId):
1811         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1812         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
1813         (WebCore::CCVideoLayerImpl::willDraw):
1814         (WebCore::CCVideoLayerImpl::willDrawInternal):
1815         (WebCore::CCVideoLayerImpl::appendQuads):
1816         (WebCore::CCVideoLayerImpl::didDraw):
1817         (WebCore::CCVideoLayerImpl::FramePlane::allocateData):
1818         (WebCore):
1819         (WebCore::CCVideoLayerImpl::FramePlane::freeData):
1820         (WebCore::CCVideoLayerImpl::allocatePlaneData):
1821         (WebCore::CCVideoLayerImpl::copyPlaneData):
1822         (WebCore::CCVideoLayerImpl::freePlaneData):
1823         (WebCore::CCVideoLayerImpl::freeUnusedPlaneData):
1824         (WebCore::CCVideoLayerImpl::didLoseContext):
1825         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
1826         (FramePlane):
1827         (WebCore::CCVideoLayerImpl::FramePlane::FramePlane):
1828
1829 2012-06-11  Joshua Bell  <jsbell@chromium.org>
1830
1831         IndexedDB: Object stores are not successfully deleted
1832         https://bugs.webkit.org/show_bug.cgi?id=88788
1833
1834         Reviewed by Tony Chang.
1835
1836         Discovered while working on http://webkit.org/b/83074 - object stores are not
1837         being deleted from the backing store. Deletion would succeed in the in-memory
1838         data structures, but after closing/re-opening the backing store the object store
1839         (but not its indexes/data) would reappear. Due to 83074, this isn't detectable
1840         by DRT without a full restart.
1841
1842         Test: [chromium] webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.ComparisonTest'
1843
1844         * Modules/indexeddb/IDBLevelDBCoding.cpp:
1845         (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::compare):
1846
1847 2012-06-05  Eric Uhrhane <ericu@chromium.org>
1848
1849         Crash in fast/files/read tests during Garbage Collection
1850         https://bugs.webkit.org/show_bug.cgi?id=87165
1851
1852         Reviewed by Michael Saboff
1853
1854         Fix previous fix for hasPendingActivity, and fix a bug in a complex
1855         abort case as well--abort during the final progress event of a write
1856         would hang the writer.
1857
1858         * Modules/filesystem/FileWriter.cpp:
1859         (WebCore::FileWriter::stop):
1860         (WebCore::FileWriter::write):
1861         (WebCore::FileWriter::truncate):
1862         (WebCore::FileWriter::didWrite):
1863         (WebCore::FileWriter::didTruncate):
1864         (WebCore::FileWriter::didFail):
1865         (WebCore::FileWriter::completeAbort):
1866         (WebCore::FileWriter::doOperation):
1867         (WebCore::FileWriter::signalCompletion):
1868
1869 2012-06-11  Shawn Singh  <shawnsingh@chromium.org>
1870
1871         [chromium] Implement position:fixed in compositor thread
1872         https://bugs.webkit.org/show_bug.cgi?id=70103
1873
1874         Reviewed by Adrienne Walker.
1875
1876         Significant contributions to this patch by Alpha Lam and Sami Kyostila.
1877
1878         This patch is the compositor-side change that adds support for
1879         fixed-position layers to be composited layers. Before this patch,
1880         fixed-position elements were positioned only by WebCore (i.e. main
1881         thread when painting), and the compositor did not have enough
1882         knowledge on its own to position it properly. This patch adds the
1883         necessary math and plumbs the necessary layer information so that
1884         the impl thread can properly position fixed-position elements on
1885         its own. This support is necessary for correctness of composited
1886         fixed-position elements, which can greatly help to avoid
1887         repainting container layers when scrolling with a fixed-position
1888         layer.
1889
1890         There also needs to be WebCore-side support for this, which is
1891         addressed in https://bugs.webkit.org/show_bug.cgi?id=78864
1892
1893         Unit tests added to CCLayerTreeHostCommonTest:
1894           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithDirectContainer
1895           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithTransformedDirectContainer
1896           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithDistantContainer
1897           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithDistantContainerAndTransforms
1898           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithMultipleScrollDeltas
1899           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithIntermediateSurfaceAndTransforms
1900           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithMultipleIntermediateSurfaces
1901           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerWithContainerLayerThatHasSurface
1902           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerThatIsAlsoFixedPositionContainer
1903           CCLayerTreeHostCommonTest.verifyScrollCompensationForFixedPositionLayerThatHasNoContainer
1904
1905         * platform/graphics/chromium/LayerChromium.cpp:
1906         (WebCore::LayerChromium::LayerChromium):
1907         (WebCore::LayerChromium::pushPropertiesTo):
1908         * platform/graphics/chromium/LayerChromium.h:
1909         (WebCore::LayerChromium::setIsContainerForFixedPositionLayers):
1910         (WebCore::LayerChromium::isContainerForFixedPositionLayers):
1911         (LayerChromium):
1912         (WebCore::LayerChromium::setFixedToContainerLayerVisibleRect):
1913         (WebCore::LayerChromium::fixedToContainerLayerVisibleRect):
1914         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1915         (WebCore::CCLayerImpl::CCLayerImpl):
1916         * platform/graphics/chromium/cc/CCLayerImpl.h:
1917         (WebCore::CCLayerImpl::setIsContainerForFixedPositionLayers):
1918         (WebCore::CCLayerImpl::isContainerForFixedPositionLayers):
1919         (CCLayerImpl):
1920         (WebCore::CCLayerImpl::setFixedToContainerLayerVisibleRect):
1921         (WebCore::CCLayerImpl::fixedToContainerLayerVisibleRect):
1922         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
1923         (WebCore::computeScrollCompensationForThisLayer):
1924         (WebCore):
1925         (WebCore::computeScrollCompensationMatrixForChildren):
1926         (WebCore::calculateDrawTransformsInternal):
1927         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
1928
1929 2012-06-11  Sam Weinig  <sam@webkit.org>
1930
1931         Remove support for disconnected/excluded from search frames, they are not used by Safari anymore
1932         https://bugs.webkit.org/show_bug.cgi?id=88723
1933
1934         Reviewed by Dan Bernstein.
1935
1936         * WebCore.exp.in:
1937         Update export.
1938         * editing/Editor.cpp:
1939         (WebCore::Editor::rangeOfString):
1940         (WebCore::Editor::countMatchesForText):
1941         * editing/Editor.h:
1942         (Editor):
1943         * loader/FrameLoader.cpp:
1944         (WebCore::FrameLoader::findFrameForNavigation):
1945         * page/DOMWindow.cpp:
1946         (WebCore::DOMWindow::parent):
1947         (WebCore::DOMWindow::top):
1948         * page/EventHandler.cpp:
1949         (WebCore::EventHandler::hitTestResultAtPoint):
1950         * page/Frame.cpp:
1951         (WebCore::Frame::Frame):
1952         * page/Frame.h:
1953         (Frame):
1954         * page/FrameTree.cpp:
1955         (WebCore::FrameTree::parent):
1956         (WebCore::FrameTree::top):
1957         * page/FrameTree.h:
1958         (FrameTree):
1959         * page/Location.cpp:
1960         (WebCore::Location::ancestorOrigins):
1961         * xml/XMLTreeViewer.cpp:
1962         (WebCore::XMLTreeViewer::hasNoStyleInformation):
1963         Update for the removal of disconnected frames and text search exclusions concepts.
1964
1965 2012-06-11  Xianzhu Wang  <wangxianzhu@chromium.org>
1966
1967         SVGImageCache leaks image data
1968         https://bugs.webkit.org/show_bug.cgi?id=87792
1969
1970         There are two functions to remove a client from a CachedImage:
1971         - CachedResource::removeClient()
1972         - CachedImage::removeClientForRenderer().
1973         It's easy to make error to call the former which will leak the cached
1974         image buffers in SVGImageCache.
1975
1976         This change combined the two by adding the virtual 
1977         CachedResource::didRemoveClient(). CachedImage will do SVGImageCache
1978         cleanup in the function.
1979
1980         Reviewed by Nikolas Zimmermann.
1981
1982         Test: svg/as-image/svg-image-leak-cached-data.html
1983
1984         * loader/cache/CachedFont.h:
1985         (WebCore::CachedFontClient::resourceClientType): Added 'const'.
1986         * loader/cache/CachedImage.cpp:
1987         (WebCore):
1988         (WebCore::CachedImage::didRemoveClient): Removes the client from SVGImageCache.
1989         (WebCore::CachedImage::lookupOrCreateImageForRenderer):
1990         * loader/cache/CachedImage.h:
1991         (CachedImage):
1992         (WebCore::CachedImageClient::resourceClientType): Added 'const'.
1993         * loader/cache/CachedRawResource.h:
1994         (WebCore::CachedRawResourceClient::resourceClientType): Added 'const'.
1995         * loader/cache/CachedResource.cpp:
1996         (WebCore::CachedResource::removeClient): Added invocation of didRemoveClient().
1997         * loader/cache/CachedResource.h:
1998         (WebCore::CachedResource::didRemoveClient): Added for subclasses to do additional works.
1999         * loader/cache/CachedResourceClient.h:
2000         (WebCore::CachedResourceClient::resourceClientType): Added 'const'.
2001         * loader/cache/CachedSVGDocument.h:
2002         (WebCore::CachedSVGDocumentClient::resourceClientType): Added 'const'.
2003         * loader/cache/CachedStyleSheetClient.h:
2004         (WebCore::CachedStyleSheetClient::resourceClientType): Added 'const'.
2005         * rendering/style/StyleCachedImage.cpp:
2006         (WebCore::StyleCachedImage::removeClient):
2007         * rendering/style/StyleCachedImageSet.cpp:
2008         (WebCore::StyleCachedImageSet::removeClient):
2009         * svg/graphics/SVGImageCache.cpp:
2010         (WebCore::SVGImageCache::~SVGImageCache): Added checking for leaks.
2011         (WebCore::SVGImageCache::removeClientFromCache):
2012         (WebCore::SVGImageCache::setRequestedSizeAndScales): 
2013         (WebCore::SVGImageCache::requestedSizeAndScales):
2014         (WebCore::SVGImageCache::lookupOrCreateBitmapImageForClient):
2015         * svg/graphics/SVGImageCache.h:
2016         (WebCore):
2017         (SVGImageCache):
2018
2019 2012-06-11  Mark Pilgrim  <pilgrim@chromium.org>
2020
2021         [Chromium] Call shared timer functions directly
2022         https://bugs.webkit.org/show_bug.cgi?id=88781
2023
2024         Reviewed by Adam Barth.
2025
2026         Part of a refactoring series. See tracking bug 82948.
2027
2028         * platform/chromium/PlatformSupport.h:
2029         (PlatformSupport):
2030         * platform/chromium/SharedTimerChromium.cpp:
2031         (WebCore::setSharedTimerFiredFunction):
2032         (WebCore::setSharedTimerFireInterval):
2033
2034 2012-06-11  Pravin D  <pravind.2k4@gmail.com>
2035
2036         Relative pos. input fields in columns vanish when you start typing in them
2037         https://bugs.webkit.org/show_bug.cgi?id=76834
2038
2039         Reviewed by Julien Chaffraix.
2040
2041         Test: fast/multicol/multicol-with-child-renderLayer-for-input.html
2042
2043         * page/FrameView.cpp:
2044         (WebCore::updateLayerPositionFlags):
2045         Helper function to prepare the UpdateLayerPositionsFlags based on the input parameters.
2046         If didFullRepaint flag is set, then CheckForRepaints flag is removed from the default flags.
2047         Also during a relayout of a subtree, if the RenderLayer of the subtree root is paginated then updatePagination flag is
2048         included in the flags. 
2049
2050         (WebCore):
2051         (WebCore::FrameView::layout):
2052         Now uses the helper function updateLayerPositionFlags() to get the final set of UpdateLayerPositionsFlags.
2053
2054         * rendering/RenderLayer.h:
2055         (WebCore::RenderLayer::isPaginated):
2056         (RenderLayer):
2057         isPaginated function is made public so that FrameView class can use it prepare UpdateLayerPositionsFlags.
2058
2059 2012-06-11  Mark Pilgrim  <pilgrim@chromium.org>
2060
2061         [Chromium] Remove some dead code in PasteboardChromium
2062         https://bugs.webkit.org/show_bug.cgi?id=88782
2063
2064         Reviewed by Adam Barth.
2065
2066         Part of a refactoring series. See tracking bug 82948.
2067         Leftover detritus from bug 88038.
2068
2069         * platform/chromium/PasteboardChromium.cpp:
2070         (WebCore::Pasteboard::documentFragment):
2071
2072 2012-06-11  Peter Beverloo  <peter@chromium.org>
2073
2074         [Chromium] Theme updates for Android in menu list rendering and selection backgrounds
2075         https://bugs.webkit.org/show_bug.cgi?id=88775
2076
2077         Reviewed by Adam Barth.
2078
2079         For Chrome on Android, use the width of the scrollbar down arrow instead
2080         of the scrollbar's width for determining the arrow padding to apply for
2081         menu list rendering, as WebKit isn't drawing a scrollbar (thus width=0).
2082
2083         Furthermore, change the default active selection background color to be
2084         equal to the tap highlighting color.
2085
2086         These changes should be covered by existing layout tests.
2087
2088         * rendering/RenderThemeChromiumAndroid.cpp:
2089         (WebCore::RenderThemeChromiumAndroid::menuListArrowPadding):
2090         (WebCore): Retrieve the scrollbar down arrow's size via PlatformSupport.
2091         * rendering/RenderThemeChromiumAndroid.h: Override the menuListArrowPadding
2092             and platformActiveSelectionBackgroundColor methods, and add a static
2093             static RGBA32 color for the default active selection bg color.
2094         * rendering/RenderThemeChromiumSkia.cpp:
2095         (WebCore::RenderThemeChromiumSkia::menuListArrowPadding): Default to
2096             the scrollbar thickness, not changing behavior for non-Android.
2097         (WebCore::RenderThemeChromiumSkia::menuListInternalPadding): Instead
2098             of polling the scrollbar thickness, call menuListArrowPadding().
2099         * rendering/RenderThemeChromiumSkia.h: 
2100         (RenderThemeChromiumSkia): Add the menuListArrowPadding() as a protected method.
2101
2102 2012-06-11  David Barr  <davidbarr@chromium.org>
2103
2104         Add css3-images image-resolution (dppx only)
2105         https://bugs.webkit.org/show_bug.cgi?id=85332
2106
2107         Reviewed by Tony Chang.
2108
2109         The css3-images module is at candidate recommendation.
2110         http://www.w3.org/TR/2012/CR-css3-images-20120417/#image-resolution
2111
2112         Test: fast/css/image-resolution.html
2113
2114         * css/CSSComputedStyleDeclaration.cpp:
2115         (WebCore):
2116         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2117         * css/CSSGrammar.y:
2118         * css/CSSParser.cpp:
2119         (WebCore::CSSParser::validUnit):
2120         (WebCore::CSSParser::createPrimitiveNumericValue):
2121         (WebCore::unitFromString):
2122         (WebCore::CSSParser::parseValidPrimitive):
2123         (WebCore::CSSParser::parseValue):
2124         (WebCore):
2125         (WebCore::CSSParser::parseImageResolution):
2126         (WebCore::CSSParser::detectNumberToken):
2127         * css/CSSParser.h:
2128         * css/CSSPrimitiveValue.cpp:
2129         (WebCore::isValidCSSUnitTypeForDoubleConversion):
2130         (WebCore::unitCategory):
2131         (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory):
2132         (WebCore::CSSPrimitiveValue::customCssText):
2133         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
2134         * css/CSSPrimitiveValue.h:
2135         * css/CSSProperty.cpp:
2136         (WebCore::CSSProperty::isInheritedProperty):
2137         * css/CSSPropertyNames.in:
2138         * css/StyleBuilder.cpp:
2139         (WebCore):
2140         (ApplyPropertyImageResolution):
2141         (WebCore::ApplyPropertyImageResolution::applyInheritValue):
2142         (WebCore::ApplyPropertyImageResolution::applyInitialValue):
2143         (WebCore::ApplyPropertyImageResolution::applyValue):
2144         (WebCore::ApplyPropertyImageResolution::createHandler):
2145         (WebCore::StyleBuilder::StyleBuilder):
2146         * css/StyleResolver.cpp:
2147         (WebCore::StyleResolver::collectMatchingRulesForList):
2148         * rendering/RenderImage.cpp:
2149         (WebCore::RenderImage::styleDidChange):
2150         (WebCore::RenderImage::imageDimensionsChanged):
2151         * rendering/style/RenderStyle.cpp:
2152         (WebCore::RenderStyle::diff):
2153         * rendering/style/RenderStyle.h:
2154         * rendering/style/StyleRareInheritedData.cpp:
2155         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2156         (WebCore::StyleRareInheritedData::operator==):
2157         * rendering/style/StyleRareInheritedData.h:
2158         (StyleRareInheritedData):
2159
2160 2012-06-05  Dana Jansens  <danakj@chromium.org>
2161
2162         [chromium] Free texture from CCIOSurfaceLayerImpl when it is destroyed
2163         https://bugs.webkit.org/show_bug.cgi?id=88371
2164
2165         Reviewed by James Robinson.
2166
2167         Unit test: CCLayerTreeHostImplTest.layersFreeTextures
2168
2169         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
2170         (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl):
2171         (WebCore::CCIOSurfaceLayerImpl::willDraw):
2172
2173 2012-06-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2174
2175         Unreviewed. Fix make distcheck issues.
2176
2177         * GNUmakefile.am: Add idl files in editing dir to EXTRA_DIST.
2178         * GNUmakefile.list.am: Add missing header file.
2179
2180 2012-06-11  Dan Bernstein  <mitz@apple.com>
2181
2182         Reverted r119940 because it caused multiple media tests to fail on Lion.
2183
2184         * html/HTMLMediaElement.cpp:
2185         (WebCore::HTMLMediaElement::prepareForLoad):
2186         (WebCore):
2187         (WebCore::HTMLMediaElement::userCancelledLoad):
2188         * html/HTMLMediaElement.h:
2189         (HTMLMediaElement):
2190         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2191         (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes):
2192
2193 2012-06-11  Zoltan Horvath  <zoltan@webkit.org>
2194
2195         [Qt] Add config tests for WEBP imagedecoder library, modify HAVE(decoderlibrary) to USE(...)$
2196         https://bugs.webkit.org/show_bug.cgi?id=87841
2197
2198         Reviewed by Simon Hausmann.
2199
2200         No new tests were needed.
2201
2202         * Target.pri:
2203         * WebCore.pri:
2204         * platform/image-decoders/ImageDecoder.cpp:
2205         (WebCore::ImageDecoder::create):
2206
2207 2012-06-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2208
2209         Add QML api for setting device width and height
2210         https://bugs.webkit.org/show_bug.cgi?id=88777
2211
2212         Reviewed by Simon Hausmann.
2213
2214         Change the default values for deviceWidth/Height to be 0 (unset). The
2215         original values were introduced by Qt and 0 makes it possible to
2216         detect if a value has never been set and therefore fall back.
2217
2218         Only Qt depended on the former values.
2219
2220         * page/Settings.cpp:
2221         (WebCore::Settings::Settings):
2222
2223 2012-06-11  Csaba Osztrogonác  <ossy@webkit.org>
2224
2225         [Qt][Win] Fix UString related build problem in Source/WebCore/bridge/qt/qt_instance.cpp
2226         https://bugs.webkit.org/show_bug.cgi?id=88310
2227
2228         Reviewed by Simon Hausmann.
2229
2230         * bridge/qt/qt_instance.cpp:
2231         (JSC::Bindings::QtInstance::getPropertyNames):
2232
2233 2012-06-11  Michael Brüning  <michael.bruning@nokia.com>
2234
2235         [Qt][WK2] Compute and set cache capacities using the current CacheModel
2236         https://bugs.webkit.org/show_bug.cgi?id=73918
2237
2238         Unreviewed build fix.
2239
2240         No new tests added as this is a build fix.
2241
2242         * platform/qt/FileSystemQt.cpp:
2243
2244 2012-06-11  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2245
2246         Rect-based hittesting doesn't work in tables.
2247         https://bugs.webkit.org/show_bug.cgi?id=86605
2248
2249         Reviewed by Julien Chaffraix.
2250
2251         The existing code only performed a single binary lookup for the central
2252         hit-test point. This meant area-based hit-testing did not work across
2253         table-cell borders. All cells spanned by a hit-test area must be hit
2254         tested.
2255
2256         This patch introduces three auxilary functions to help calculate rows
2257         and columns spanned by an rect. These are intended to also be used by
2258         repaint logic in a later patch.
2259
2260         For point-based hit-testing we maintain unchanged behavior and still
2261         only hit test a single column in a single row.
2262
2263         Test: fast/dom/nodesFromRect-table.html
2264
2265         * rendering/RenderTableSection.cpp:
2266         (WebCore::RenderTableSection::logicalRectForWritingModeAndDirection):
2267         (WebCore::RenderTableSection::spannedRows):
2268         (WebCore::RenderTableSection::spannedColumns):
2269         (WebCore::RenderTableSection::nodeAtPoint):
2270         * rendering/RenderTableSection.h:
2271         (RenderTableSection):
2272
2273 2012-06-11  Min Qin  <qinmin@google.com>
2274
2275         Adding a flag to show fullscreen media controls in chromium
2276         https://bugs.webkit.org/show_bug.cgi?id=88266
2277
2278         Reviewed by Adam Barth.
2279
2280         The default chromium shadow DOM for media element does not contain fullscreen button.
2281         This change adds a flag to display the fullscreen button.
2282         It will be used by the android port.
2283
2284         No new tests needed. We will use the same layout tests as desktop chromium.
2285         However, new test result expections will be added later.
2286
2287         * html/shadow/MediaControlRootElementChromium.cpp:
2288         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
2289         (WebCore::MediaControlRootElementChromium::create):
2290         (WebCore::MediaControlRootElementChromium::setMediaController):
2291         (WebCore::MediaControlRootElementChromium::reset):
2292         (WebCore::MediaControlRootElementChromium::reportedError):
2293         * html/shadow/MediaControlRootElementChromium.h:
2294         (MediaControlRootElementChromium):
2295
2296 2012-06-11  Michael Brüning  <michael.bruning@nokia.com>
2297
2298         [Qt][WK2] Compute and set cache capacities using the current CacheModel
2299         https://bugs.webkit.org/show_bug.cgi?id=73918
2300
2301         Reviewed by Kenneth Rohde Christiansen.
2302
2303         No new tests needed / applicable (using operating system functionality).
2304
2305         Added method to read free file system space for a path to support cache model
2306         implementation in Qt WK 2.
2307
2308         * platform/FileSystem.h:
2309         (WebCore):
2310         * platform/qt/FileSystemQt.cpp:
2311         (WebCore::getVolumeFreeSizeForPath): Added for Qt ports.
2312         (WebCore):
2313
2314 2012-06-11  Peter Wang  <peter.wang@torchmobile.com.cn>
2315
2316         [JSC] Web Inspector: implement breaking from native callback
2317         https://bugs.webkit.org/show_bug.cgi?id=43332
2318
2319         Reviewed by Pavel Feldman.
2320
2321         These test cases were enabled:
2322         LayoutTests/inspector/debugger/dom-breakpoints.html
2323         LayoutTests/inspector/debugger/event-listener-breakpoints.html
2324         LayoutTests/inspector/debugger/step-through-event-listeners.html
2325         LayoutTests/inspector/debugger/xhr-breakpoints.html
2326
2327         * bindings/js/ScriptDebugServer.cpp:
2328         (WebCore::ScriptDebugServer::breakProgram):
2329         * bindings/js/ScriptDebugServer.h:
2330         (WebCore::supportsNativeBreakpoints):
2331
2332 2012-06-11  MORITA Hajime  <morrita@google.com>
2333
2334         Spellchecker crash in async scenario.
2335         https://bugs.webkit.org/show_bug.cgi?id=88617
2336
2337         Reviewed by Tony Chang.
2338
2339         SpellCheckRequest::invokeRequest() can be reached after the frame is detached.
2340         SpellCheckRequest should ignore such a request since TextCheckerClient is not available
2341         for detached Frames.
2342
2343         No new tests. It's hard to reproduce this.
2344
2345         * editing/SpellChecker.cpp:
2346         (WebCore::SpellChecker::invokeRequest):
2347
2348 2012-06-11  Ryuan Choi  <ryuan.choi@samsung.com>
2349
2350         [EFL] Extract CursorMap from WidgetEfl.cpp.
2351         https://bugs.webkit.org/show_bug.cgi?id=88633
2352
2353         Reviewed by Ryosuke Niwa.
2354
2355         In order to share CursorMap in WebKit/efl and UIProcess of WebKit2/Efl,
2356         extract it and expose getEcoreCursor.
2357
2358         No new tests, refactoring only.
2359
2360         * platform/efl/EflScreenUtilities.cpp:
2361         (WebCore):
2362         (CursorMap):
2363         (WebCore::CursorMap::cursor):
2364         (WebCore::CursorMap::CursorMap):
2365         (WebCore::getEcoreCursor):
2366         * platform/efl/EflScreenUtilities.h:
2367         (WebCore):
2368         * platform/efl/WidgetEfl.cpp:
2369         (WebCore::Widget::applyFallbackCursor):
2370
2371 2012-06-10  Sheriff Bot  <webkit.review.bot@gmail.com>
2372
2373         Unreviewed, rolling out r119955.
2374         http://trac.webkit.org/changeset/119955
2375         https://bugs.webkit.org/show_bug.cgi?id=88758
2376
2377         Breaks Chromium compile - Chromium depends on removed API
2378         (Requested by dominicc on #webkit).
2379
2380         * WebCore.exp.in:
2381         * editing/Editor.cpp:
2382         (WebCore::Editor::insideVisibleArea):
2383         (WebCore):
2384         (WebCore::Editor::firstVisibleRange):
2385         (WebCore::Editor::lastVisibleRange):
2386         (WebCore::Editor::nextVisibleRange):
2387         (WebCore::Editor::rangeOfString):
2388         (WebCore::Editor::countMatchesForText):
2389         * editing/Editor.h:
2390         (Editor):
2391         * loader/FrameLoader.cpp:
2392         (WebCore::FrameLoader::findFrameForNavigation):
2393         * page/DOMWindow.cpp:
2394         (WebCore::DOMWindow::parent):
2395         (WebCore::DOMWindow::top):
2396         * page/EventHandler.cpp:
2397         (WebCore::EventHandler::hitTestResultAtPoint):
2398         * page/Frame.cpp:
2399         (WebCore::Frame::Frame):
2400         * page/Frame.h:
2401         (Frame):
2402         (WebCore::Frame::isDisconnected):
2403         (WebCore):
2404         (WebCore::Frame::setIsDisconnected):
2405         (WebCore::Frame::excludeFromTextSearch):
2406         (WebCore::Frame::setExcludeFromTextSearch):
2407         * page/FrameTree.cpp:
2408         (WebCore::FrameTree::parent):
2409         (WebCore::FrameTree::top):
2410         * page/FrameTree.h:
2411         (FrameTree):
2412         * page/Location.cpp:
2413         (WebCore::Location::ancestorOrigins):
2414         * xml/XMLTreeViewer.cpp:
2415         (WebCore::XMLTreeViewer::hasNoStyleInformation):
2416
2417 2012-06-08  Kinuko Yasuda  <kinuko@chromium.org>
2418
2419         Using BlobBuilder should show a deprecation warning message (if it is enabled)
2420         https://bugs.webkit.org/show_bug.cgi?id=88644
2421
2422         Reviewed by Jian Li.
2423
2424         Mac has already disabled BlobBuilder, but Chromium still has it.
2425         We should start showing a warning to let people migrate to using Blob constructor.
2426
2427         Tests: fast/files/blob-builder-crash.html
2428
2429         * fileapi/WebKitBlobBuilder.cpp:
2430         (WebCore):
2431         (WebCore::WebKitBlobBuilder::create):
2432         * fileapi/WebKitBlobBuilder.h:
2433         (WebCore):
2434         (WebKitBlobBuilder):
2435         * fileapi/WebKitBlobBuilder.idl:
2436
2437 2012-06-10  Sam Weinig  <sam@webkit.org>
2438
2439         Remove support for disconnected/excluded from search frames, they are not used by Safari anymore
2440         https://bugs.webkit.org/show_bug.cgi?id=88723
2441
2442         Reviewed by Dan Bernstein.
2443
2444         * WebCore.exp.in:
2445         Update export.
2446         * editing/Editor.cpp:
2447         (WebCore::Editor::rangeOfString):
2448         (WebCore::Editor::countMatchesForText):
2449         * editing/Editor.h:
2450         (Editor):
2451         * loader/FrameLoader.cpp:
2452         (WebCore::FrameLoader::findFrameForNavigation):
2453         * page/DOMWindow.cpp:
2454         (WebCore::DOMWindow::parent):
2455         (WebCore::DOMWindow::top):
2456         * page/EventHandler.cpp:
2457         (WebCore::EventHandler::hitTestResultAtPoint):
2458         * page/Frame.cpp:
2459         (WebCore::Frame::Frame):
2460         * page/Frame.h:
2461         (Frame):
2462         * page/FrameTree.cpp:
2463         (WebCore::FrameTree::parent):
2464         (WebCore::FrameTree::top):
2465         * page/FrameTree.h:
2466         (FrameTree):
2467         * page/Location.cpp:
2468         (WebCore::Location::ancestorOrigins):
2469         * xml/XMLTreeViewer.cpp:
2470         (WebCore::XMLTreeViewer::hasNoStyleInformation):
2471         Update for the removal of disconnected frames and text search exclusions concepts.
2472
2473 2012-06-07  Kinuko Yasuda  <kinuko@google.com>
2474
2475         Move Quota related code out of DOMWindow and into the quota/ folder
2476         https://bugs.webkit.org/show_bug.cgi?id=88512
2477
2478         Reviewed by Adam Barth.
2479
2480         No new tests: no visible changes.
2481
2482         * CMakeLists.txt:
2483         * DerivedSources.cpp:
2484         * DerivedSources.make:
2485         * DerivedSources.pri:
2486         * Modules/quota/DOMWindowQuota.cpp: Added.
2487         * Modules/quota/DOMWindowQuota.h: Added.
2488         * Modules/quota/DOMWindowQuota.idl: Added.
2489         * Modules/quota/StorageInfo.cpp: Renamed from Source/WebCore/storage/StorageInfo.cpp.
2490         * Modules/quota/StorageInfo.h: Renamed from Source/WebCore/storage/StorageInfo.h.
2491         * Modules/quota/StorageInfo.idl: Renamed from Source/WebCore/storage/StorageInfo.idl.
2492         * Modules/quota/StorageInfoErrorCallback.h: Renamed from Source/WebCore/storage/StorageInfoErrorCallback.h.
2493         * Modules/quota/StorageInfoErrorCallback.idl: Renamed from Source/WebCore/storage/StorageInfoErrorCallback.idl.
2494         * Modules/quota/StorageInfoQuotaCallback.h: Renamed from Source/WebCore/storage/StorageInfoQuotaCallback.h.
2495         * Modules/quota/StorageInfoQuotaCallback.idl: Renamed from Source/WebCore/storage/StorageInfoQuotaCallback.idl.
2496         * Modules/quota/StorageInfoUsageCallback.h: Renamed from Source/WebCore/storage/StorageInfoUsageCallback.h.
2497         * Modules/quota/StorageInfoUsageCallback.idl: Renamed from Source/WebCore/storage/StorageInfoUsageCallback.idl.
2498         * Target.pri:
2499         * WebCore.gyp/WebCore.gyp:
2500         * WebCore.gypi:
2501         * WebCore.pri:
2502         * WebCore.vcproj/WebCore.vcproj:
2503         * WebCore.vcproj/WebCoreCommon.vsprops:
2504         * WebCore.vcproj/copyForwardingHeaders.cmd:
2505         * WebCore.xcodeproj/project.pbxproj:
2506         * page/DOMWindow.cpp:
2507         * page/DOMWindow.h:
2508         * page/DOMWindow.idl:
2509
2510 2012-06-10  Hayato Ito  <hayato@chromium.org>
2511
2512         An inheritance of '-webkit-user-modify' does not stop at shadow boundary.
2513         https://bugs.webkit.org/show_bug.cgi?id=88514
2514
2515         Reviewed by Ryosuke Niwa.
2516
2517         In StyleResolver::styleForElement(), we reset '-webkit-user-modify'
2518         CSS property after inheriting a parent style, but that is not
2519         enough.  We also have to reset '-webkit-user-modify' when we use a
2520         cached result in applying matched properties.
2521
2522         Test: fast/dom/shadow/user-modify-inheritance.html
2523
2524         * css/StyleResolver.cpp:
2525         (WebCore::StyleResolver::applyMatchedProperties):
2526         (WebCore::StyleResolver::styleForElement):
2527         * css/StyleResolver.h:
2528         (StyleResolver):
2529         * rendering/style/RenderStyle.cpp:
2530         (WebCore::RenderStyle::inheritFrom):
2531         * rendering/style/RenderStyle.h:
2532
2533 2012-06-10  Yoshifumi Inoue  <yosin@chromium.org>
2534
2535         [Forms] Introduce Decimal behind the InputNumber type
2536         https://bugs.webkit.org/show_bug.cgi?id=88383
2537
2538         Reviewed by Kent Tamura.
2539
2540         This patch introduces decimal arithmetic for steppable input types,
2541         e.g. date, datetime, number, range, and so on, to avoid rounding error
2542         caused by base 2 floating point representation, e.g. C/C++ double type.
2543
2544         Most of decimal arithmetic calculations are implemented in StepRange
2545         class, replacing "double" with "Decimal", InputType::applyStep, and
2546         InputType::stepFromRenderer.
2547
2548         Changes introduced by this patch are still intermediate state.
2549         Following patch will replace InputNumber type to Decimal type for
2550         completion of introducing decimal arithmetic.
2551
2552         Test: fast/forms/range/range-value-rounding.html
2553
2554         * html/BaseDateAndTimeInputType.cpp:
2555         (WebCore::BaseDateAndTimeInputType::serialize): Changed for Decimal type.
2556         (WebCore::BaseDateAndTimeInputType::serializeWithComponents): ditto.
2557         * html/DateInputType.cpp:
2558         (WebCore::DateInputType::createStepRange): Replaced NumberWithDecimalPlaces to InputNumber.
2559         * html/DateTimeInputType.cpp:
2560         (WebCore::DateTimeInputType::createStepRange): Replaced NumberWithDecimalPlaces to InputNumber.
2561         * html/DateTimeLocalInputType.cpp:
2562         (WebCore::DateTimeLocalInputType::createStepRange): Replaced NumberWithDecimalPlaces to InputNumber.
2563         * html/InputType.cpp:
2564         (WebCore::InputType::rangeUnderflow): Changed for Decimal type.
2565         (WebCore::InputType::rangeOverflow): Changed for Decimal type.
2566         (WebCore::InputType::minimum): Changed for Decimal type.
2567         (WebCore::InputType::maximum): ditto.
2568         (WebCore::InputType::isInRange): ditto.
2569         (WebCore::InputType::isOutOfRange): ditto.
2570         (WebCore::InputType::stepMismatch): ditto.
2571         (WebCore::InputType::validationMessage): ditto.
2572         (WebCore::InputType::parseToNumberOrNaN): ditto.
2573         (WebCore::InputType::applyStep): ditto.
2574         (WebCore::InputType::stepUpFromRenderer): ditto.
2575         * html/InputType.h:
2576         (InputType): Removed parseToNumberWIthDecimaplPlaces.
2577         * html/MonthInputType.cpp:
2578         (WebCore::MonthInputType::createStepRange): Changed for Decimal type.
2579         * html/NumberInputType.cpp:
2580         (WebCore::RealNumberRenderSize): Added for calculateRenderSize.
2581         (WebCore::calculateRenderSize): Added. This function replacess lengthBeforeDecimalPoint.
2582         (WebCore::NumberInputType::createStepRange): Changed for Decimal type.
2583         (WebCore::NumberInputType::sizeShouldIncludeDecoration): Changed to use calculateRenderSize.
2584         (WebCore::NumberInputType::parseToNumber): Changed for Decimal type.
2585         (WebCore::NumberInputType::serialize): ditto.
2586         * html/NumberInputType.h:
2587         (NumberInputType): Removed parseToNumberWIthDecimaplPlaces.
2588         * html/RangeInputType.cpp:
2589         (WebCore::RangeInputType::createStepRange): Changed for Decimal type.
2590         (WebCore::RangeInputType::handleKeydownEvent): ditto.
2591         (WebCore::RangeInputType::parseToNumber): ditto.
2592         (WebCore::RangeInputType::serialize): ditto.
2593         * html/StepRange.cpp:
2594         (WebCore::StepRange::StepRange): Removed decimal places and changed for Decimal type.
2595         (WebCore::StepRange::acceptableError): Changed for Decimal type.
2596         (WebCore::StepRange::alignValueForStep): ditto.
2597         (WebCore::StepRange::clampValue): Changed for Decimal type and std::min/max.
2598         (WebCore::StepRange::parseStep): Changed for Decimal type and removed NumberWithDecimalPlaces.
2599         (WebCore::StepRange::stepMismatch): Changed for Decimal type.
2600         (WebCore::convertDoubleToInputNumber): Changed to real implementation.
2601         (WebCore::convertInputNumberToDouble):  Changed to real implementation.
2602         * html/StepRange.h:
2603         (InputNumber): Replacement of NumberWithDecimalPlaces.
2604         (WebCore::StepRange::InputNumber::InputNumber):
2605         * html/TimeInputType.cpp:
2606         (WebCore::TimeInputType::createStepRange): Changed for Decimal type.
2607         * html/WeekInputType.cpp:
2608         (WebCore::WeekInputType::createStepRange): Changed for Decimal type.
2609         * html/parser/HTMLParserIdioms.cpp:
2610         (WebCore::serializeForNumberType): Added Decimal version.
2611         (WebCore::parseToDecimalForNumberType): Added.
2612         * html/parser/HTMLParserIdioms.h: Updated comments for parseToDoubleForNumberType.
2613         * html/shadow/SliderThumbElement.cpp:
2614         (WebCore::sliderPosition): Changed for Decimal type.
2615
2616 2012-06-10  Jason Liu  <jason.liu@torchmobile.com.cn>
2617
2618         [BlackBerry] Possible to clobber httponly cookie.
2619         https://bugs.webkit.org/show_bug.cgi?id=86067
2620
2621         Reviewed by Rob Buis.
2622
2623         If a cookie is set by javaScript and there is already a same httpOnly cookie in cookieManager,
2624         we should reject it. If it has a httpOnly property, we reject it, too.
2625
2626         Test: http/tests/cookies/js-get-and-set-http-only-cookie.html
2627
2628         * platform/blackberry/CookieJarBlackBerry.cpp:
2629         (WebCore::setCookies):
2630         * platform/blackberry/CookieManager.cpp:
2631         (WebCore::CookieManager::setCookies):
2632         (WebCore::CookieManager::checkAndTreatCookie):
2633         (WebCore::CookieManager::addCookieToMap):
2634         (WebCore::CookieManager::setPrivateMode):
2635         * platform/blackberry/CookieManager.h:
2636         * platform/blackberry/CookieMap.cpp:
2637         (WebCore::CookieMap::addOrReplaceCookie):
2638         (WebCore::CookieMap::removeCookie):
2639         * platform/blackberry/CookieMap.h:
2640         (CookieMap):
2641
2642 2012-06-10  Pablo Flouret  <pablof@motorola.com>
2643
2644         Access control allow lists starting with a comma are parsed incorrectly (CORS)
2645         https://bugs.webkit.org/show_bug.cgi?id=88461
2646
2647         Reviewed by Adam Barth.
2648
2649         The parsing algorithm would stop parsing at the first comma (being an
2650         empty entry, of sorts) and bail out, effectively ignoring the whole
2651         header.
2652
2653         Test: http/tests/xmlhttprequest/access-control-allow-lists-starting-with-comma.html
2654
2655         * loader/CrossOriginPreflightResultCache.cpp:
2656         (WebCore::parseAccessControlAllowList):
2657
2658 2012-06-10  Darin Adler  <darin@apple.com>
2659
2660         Some additional tweaks to keep TreeShared code simple/clean
2661         https://bugs.webkit.org/show_bug.cgi?id=88738
2662
2663         Reviewed by Adam Barth.
2664
2665         * platform/TreeShared.h: Make constructor and destructor both protected.
2666         It's slightly dangerous to have a public non-virtual destructor, and there
2667         is no reason it needs to be public.
2668         (WebCore::TreeShared::~TreeShared): Make debug-only destructor non-virtual;
2669         we were getting no value from it being virtual. Now that it's non-virtual,
2670         there is no need to use an #if on it since it's an empty inline destructor
2671         in non-debug builds.
2672
2673 2012-06-06  Jer Noble  <jer.noble@apple.com>
2674
2675         REGRESSION: Setting invalid media "src" does not cause "error" event
2676         https://bugs.webkit.org/show_bug.cgi?id=88423
2677
2678         Reviewed by Eric Carlson.
2679
2680         Test: http/tests/media/video-src-invalid-error.html
2681
2682         Two problems here.  When the loadTimer is scheduled, the m_pendingLoadFlags
2683         variable is set to specify what type of load is scheduled.  It is cleared
2684         when the loadTimer fires. But, when prepareForLoad() stops the loadTimer,
2685         it does not clear the m_pendingLoadFlags variable, so the next time
2686         scheduleLoad() is called (when the src is changed to an invalid URL)
2687         prepareForLoad() is not called again.
2688
2689         Second problem: Due to a bug in QTKit (<rdar://problem/11606415>), the
2690         QTMovieLoadStateChangedNotification is never fired for an invalid http
2691         URL if QTMovieOpenAsyncRequiredAttribute:YES is not passed when creating
2692         the QTMovie.
2693
2694         Add a new utility method which both stops the m_loadTimer and clears the 
2695         m_pendingLoadFlags, and use it in all the places where m_loadTimer was 
2696         stopped explicitly:
2697
2698         * html/HTMLMediaElement.cpp:
2699         (WebCore::HTMLMediaElement::prepareForLoad):
2700         (WebCore::HTMLMediaElement::stopLoadTimer): Added
2701         (WebCore::HTMLMediaElement::userCancelledLoad):
2702         * html/HTMLMediaElement.h:
2703
2704         And pass QTMovieOpenAsyncRequiredAttribute:YES when creating the QTMovie:
2705
2706         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2707         (WebCore::MediaPlayerPrivateQTKit::commonMovieAttributes):
2708
2709 2012-06-06  Jer Noble  <jer.noble@apple.com>
2710
2711         Add logging functions to MediaPlayerPrivateQTKit.
2712         https://bugs.webkit.org/show_bug.cgi?id=88425
2713
2714         Reviewed by Eric Carlson.
2715
2716         No new tests; adds logging functions to aide debugging.
2717
2718         MediaPlayerPrivateQTKit should emit the same kind of logging messages as 
2719         other MediaPlayerPrivate engines to aide in debugging.
2720
2721         Distinguish between loadedRangesChanged() and loadStateChanged() for logging
2722         purposes:
2723         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2724         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2725         (WebCore::MediaPlayerPrivateQTKit::loadedRangesChanged):
2726         (-[WebCoreMovieObserver loadedRangesChanged:]):
2727
2728         Add LOG messages for each of the following functions:
2729         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2730         (WebCore::MediaPlayerPrivateQTKit::~MediaPlayerPrivateQTKit):
2731         (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
2732         (WebCore::MediaPlayerPrivateQTKit::createQTMovieView):
2733         (WebCore::MediaPlayerPrivateQTKit::detachQTMovieView):
2734         (WebCore::MediaPlayerPrivateQTKit::createQTVideoRenderer):
2735         (WebCore::MediaPlayerPrivateQTKit::destroyQTVideoRenderer):
2736         (WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer):
2737         (WebCore::MediaPlayerPrivateQTKit::destroyQTMovieLayer):
2738         (WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering):
2739         (WebCore::MediaPlayerPrivateQTKit::tearDownVideoRendering):
2740         (WebCore::MediaPlayerPrivateQTKit::load):
2741         (WebCore::MediaPlayerPrivateQTKit::prepareToPlay):
2742         (WebCore::MediaPlayerPrivateQTKit::play):
2743         (WebCore::MediaPlayerPrivateQTKit::pause):
2744         (WebCore::MediaPlayerPrivateQTKit::seek):
2745         (WebCore::MediaPlayerPrivateQTKit::cancelSeek):
2746         (WebCore::MediaPlayerPrivateQTKit::setVolume):
2747         (WebCore::MediaPlayerPrivateQTKit::setRate):
2748         (WebCore::MediaPlayerPrivateQTKit::setPreservesPitch):
2749         (WebCore::MediaPlayerPrivateQTKit::cancelLoad):
2750         (WebCore::MediaPlayerPrivateQTKit::prepareForRendering):
2751         (WebCore::MediaPlayerPrivateQTKit::updateStates):
2752         (WebCore::MediaPlayerPrivateQTKit::loadStateChanged):
2753         (WebCore::MediaPlayerPrivateQTKit::rateChanged):
2754         (WebCore::MediaPlayerPrivateQTKit::sizeChanged):
2755         (WebCore::MediaPlayerPrivateQTKit::timeChanged):
2756         (WebCore::MediaPlayerPrivateQTKit::didEnd):
2757         (WebCore::MediaPlayerPrivateQTKit::clearMediaCache):
2758         (WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForSite):
2759         (WebCore::MediaPlayerPrivateQTKit::disableUnsupportedTracks):
2760
2761 2012-06-07  Jer Noble  <jer.noble@apple.com>
2762
2763         WebCore should use a single definition of an invalid media time.
2764         https://bugs.webkit.org/show_bug.cgi?id=88572
2765
2766         Reviewed by Eric Carlson.
2767
2768         No new tests; no change in functionality, so covered by existing tests.
2769
2770         Add a new, universal definition for an invalid media time:
2771         * platform/graphics/MediaPlayer.h:
2772         (WebCore::MediaPlayer::invalidTime):
2773
2774         Use this new definition instead of the hodge podge of (identical) local
2775         definitions for an invalid media time:
2776         * html/HTMLMediaElement.cpp:
2777         (WebCore::HTMLMediaElement::HTMLMediaElement):
2778         (WebCore::HTMLMediaElement::invalidateCachedTime):
2779         (WebCore::HTMLMediaElement::currentTime):
2780         (WebCore::HTMLMediaElement::initialTime):
2781         (WebCore::HTMLMediaElement::playbackProgressTimerFired):
2782         (WebCore::HTMLMediaElement::prepareMediaFragmentURI):
2783         (WebCore::HTMLMediaElement::applyMediaFragmentURI):
2784         * html/MediaFragmentURIParser.cpp:
2785         (WebCore::MediaFragmentURIParser::invalidTimeValue):
2786         (WebCore::MediaFragmentURIParser::MediaFragmentURIParser):
2787         (WebCore::MediaFragmentURIParser::startTime):
2788         (WebCore::MediaFragmentURIParser::endTime):
2789         (WebCore::MediaFragmentURIParser::parseTimeFragment):
2790         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2791         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
2792         (WebCore::MediaPlayerPrivateAVFoundation::duration):
2793         (WebCore::MediaPlayerPrivateAVFoundation::seeking):
2794         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
2795         (WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration):
2796         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2797         (MediaPlayerPrivateAVFoundation):
2798         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2799         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
2800         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2801         (WebCore::MediaPlayerPrivateQTKit::duration):
2802         (WebCore::MediaPlayerPrivateQTKit::updateStates):
2803         (WebCore::MediaPlayerPrivateQTKit::timeChanged):
2804
2805 2012-06-10  Darin Adler  <darin@apple.com>
2806
2807         Remove unneeded callRemovedLastRef function from TreeShared refactoring
2808         https://bugs.webkit.org/show_bug.cgi?id=88653
2809
2810         Reviewed by Sam Weinig.
2811
2812         * WebCore.exp.in: Updated to remove callRemovedLastRef and add removedLastRef.
2813
2814         * dom/ContainerNode.cpp: Removed callRemovedLastRef, which is no longer
2815         needed and also had a bad cast in it.
2816
2817         * dom/Document.h: Made removedLastRef private and non-virtual and made Node
2818         a friend so it can call the private function.
2819
2820         * dom/Node.cpp:
2821         (WebCore::Node::removedLastRef): Moved here. This should not be an inline
2822         function. Added comments explaining why it should not be inlined. Also added
2823         explicit code to call to Document::removedLastRef, and added a comment why
2824         that's the right thing to do here.
2825         * dom/Node.h: Inherit from TreeShared<Node, ContainerNode>. Made the
2826         removedLastRef function non-virtual and removed it from the header file.
2827         Updated TreeShared using statements. Made the TreeShared template class a
2828         friend so it can call the private removedLastRef.
2829
2830         * html/HTMLFormControlElement.h: Updated TreeShared using statements to specify
2831         Node instead, which accomplishes the same thing.
2832         * html/HTMLObjectElement.h: Ditto.
2833
2834         * platform/TreeShared.h: Made TreeShared take two template arguments for the
2835         node type and the parent node type. Removed the callRemovedLastRef functions and
2836         the extra forward declarations it required. Removed the private unused
2837         removedLastRef function; not sure why it was left in here at all.
2838         (WebCore::TreeShared::deref): Call removedLastRef instead of callRemovedLastRef.
2839         (WebCore::TreeShared::setParent): Use ParentNodeType.
2840         (WebCore::TreeShared::parent): Ditto.
2841         (WebCore::adopted): Updated to have both template arguments.
2842
2843         * svg/SVGElementInstance.cpp:
2844         (WebCore::SVGElementInstance::removedLastRef): Replaced callRemovedLastRef with
2845         this. Moved the body out of the header and added a comment explaining why the
2846         function should not be inlined.
2847         * svg/SVGElementInstance.h: Made removedLastRef non-virtual, non-inline, and
2848         private. Made TreeShared a friend so it can call the private removedLastRef.
2849         Updated TreeShared using statements.
2850
2851 2012-06-10  Darin Adler  <darin@apple.com>
2852
2853         * WebCore.exp.in: Re-sorted and alphabetized the file.
2854
2855 2012-06-10  Balazs Kelemen  <kbalazs@webkit.org>
2856
2857         [Qt][Win] Fix building Source/WebCore/plugins/win/PluginViewWin.cpp
2858         https://bugs.webkit.org/show_bug.cgi?id=88308
2859
2860         Reviewed by Simon Hausmann.
2861
2862         No new tests, just a build fix.
2863
2864         Use ownerWindow() from page client. It has been
2865         introduced for x11 plugins to solve exactly the
2866         same problem.
2867
2868         * plugins/win/PluginViewWin.cpp:
2869         (windowHandleForPageClient):
2870
2871 2012-06-10  Balazs Kelemen  <kbalazs@webkit.org>
2872
2873         [Qt][Win] Fix building ImageQt.cpp
2874         https://bugs.webkit.org/show_bug.cgi?id=88306
2875
2876         Reviewed by Simon Hausmann.
2877
2878         No new tests, this is just a build fix.
2879
2880         * platform/graphics/qt/ImageQt.cpp:
2881         (WebCore):
2882         (WebCore::BitmapImage::create):
2883         Adapt to the "API" changes in Qt.
2884
2885 2012-06-09  Gregg Tavares  <gman@google.com>
2886
2887         Make WebGL mark draws for compositing even if the draw count is zero
2888         https://bugs.webkit.org/show_bug.cgi?id=88718
2889
2890         Reviewed by Kenneth Russell.
2891
2892         No new tests as no new functionality.
2893
2894         * html/canvas/WebGLRenderingContext.cpp:
2895         (WebCore):
2896         (WebCore::WebGLRenderingContext::drawArrays):
2897         (WebCore::WebGLRenderingContext::drawElements):
2898
2899 2012-06-09  Dominic Cooney  <dominicc@chromium.org>
2900
2901         [Chromium] Remove JavaScriptCore dependencies from gyp
2902         https://bugs.webkit.org/show_bug.cgi?id=88510
2903
2904         Reviewed by Adam Barth.
2905
2906         Chromium doesn't support JSC any more and there doesn't seem to be
2907         a strong interest in using GYP as the common build system in other
2908         ports.
2909
2910         No new functionality => No new tests.
2911
2912         * gyp/WebCore.gyp: Removed.
2913         * gyp/copy-forwarding-and-icu-headers.sh: Removed.
2914         * gyp/copy-inspector-resources.sh: Removed.
2915         * gyp/generate-derived-sources.sh: Removed.
2916         * gyp/generate-webcore-export-file-generator.sh: Removed.
2917         * gyp/gtk.gyp: Removed.
2918         * gyp/run-if-exists.sh: Removed.
2919         * gyp/streamline-inspector-source.sh: Removed.
2920         * gyp/update-info-plist.sh: Removed.
2921
2922 2012-06-07  Darin Adler  <darin@apple.com>
2923
2924         Refactor and improve code style in TextResourceDecoder to prepare for buffering improvement
2925         https://bugs.webkit.org/show_bug.cgi?id=88566
2926
2927         Reviewed by Alexey Proskuryakov.
2928
2929         * loader/TextResourceDecoder.cpp:
2930         (WebCore::bytesEqual): Added helper function to make comparing against sequences of bytes
2931         easier to read at the call site.
2932         (WebCore::KanjiCode::judge): Changed to use bytesEqual in a few places, merged multiple if
2933         statements, got rid of else after goto.
2934         (WebCore::TextResourceDecoder::checkForCSSCharset): Changed to use early return instead of
2935         nesting the whole function. Changed to use bytesEqual.
2936         (WebCore::skipComment): Changed to use early return for more cases. Changed to use bytesEqual.
2937         (WebCore::TextResourceDecoder::checkForHeadCharset): Changed to use bytesEqual.
2938         (WebCore::TextResourceDecoder::decode): Changed to use emptyString() instead of "", since
2939         the former is more efficient.
2940
2941 2012-06-09  Sheriff Bot  <webkit.review.bot@gmail.com>
2942
2943         Unreviewed, rolling out r118618 and r119353.
2944         http://trac.webkit.org/changeset/118618
2945         http://trac.webkit.org/changeset/119353
2946         https://bugs.webkit.org/show_bug.cgi?id=88720
2947
2948         Caused at least 30 different crashes on ClusterFuzz (Requested
2949         by inferno-sec on #webkit).
2950
2951         * loader/SubresourceLoader.cpp:
2952         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
2953         * loader/cache/CachedCSSStyleSheet.cpp:
2954         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
2955         * loader/cache/CachedFont.cpp:
2956         (WebCore::CachedFont::allClientsRemoved):
2957         * loader/cache/CachedFont.h:
2958         (WebCore::CachedFontClient::resourceClientType):
2959         * loader/cache/CachedImage.cpp:
2960         (WebCore::CachedImage::removeClientForRenderer):
2961         (WebCore):
2962         (WebCore::CachedImage::allClientsRemoved):
2963         (WebCore::CachedImage::lookupOrCreateImageForRenderer):
2964         * loader/cache/CachedImage.h:
2965         (CachedImage):
2966         (WebCore::CachedImageClient::resourceClientType):
2967         * loader/cache/CachedRawResource.cpp:
2968         (WebCore::CachedRawResource::allClientsRemoved):
2969         (WebCore):
2970         * loader/cache/CachedRawResource.h:
2971         (CachedRawResource):
2972         (WebCore::CachedRawResourceClient::resourceClientType):
2973         * loader/cache/CachedResource.cpp:
2974         (WebCore::CachedResource::removeClient):
2975         * loader/cache/CachedResource.h:
2976         (WebCore::CachedResource::allClientsRemoved):
2977         * loader/cache/CachedResourceClient.h:
2978         (WebCore::CachedResourceClient::resourceClientType):
2979         * loader/cache/CachedSVGDocument.h:
2980         (WebCore::CachedSVGDocumentClient::resourceClientType):
2981         * loader/cache/CachedScript.cpp:
2982         (WebCore::CachedScript::allClientsRemoved):
2983         * loader/cache/CachedStyleSheetClient.h:
2984         (WebCore::CachedStyleSheetClient::resourceClientType):
2985         * rendering/style/StyleCachedImage.cpp:
2986         (WebCore::StyleCachedImage::removeClient):
2987         * rendering/style/StyleCachedImageSet.cpp:
2988         (WebCore::StyleCachedImageSet::removeClient):
2989         * svg/graphics/SVGImageCache.cpp:
2990         (WebCore::SVGImageCache::~SVGImageCache):
2991         (WebCore::SVGImageCache::removeRendererFromCache):
2992         (WebCore::SVGImageCache::setRequestedSizeAndScales):
2993         (WebCore::SVGImageCache::requestedSizeAndScales):
2994         (WebCore::SVGImageCache::lookupOrCreateBitmapImageForRenderer):
2995         * svg/graphics/SVGImageCache.h:
2996         (WebCore):
2997         (SVGImageCache):
2998
2999 2012-06-09  Florin Malita  <fmalita@chromium.org>
3000
3001         Fixed-position foreignObject descendants should be relative to the foreignObject viewport
3002         https://bugs.webkit.org/show_bug.cgi?id=88547
3003
3004         Reviewed by Abhishek Arya.
3005
3006         Tests: svg/foreignObject/fO-fixed-position-crash.html
3007                svg/foreignObject/fixed-position-expected.svg
3008                svg/foreignObject/fixed-position.svg
3009
3010         Fixed position elements are currently registered with the top level
3011         RenderView even when embedded within an SVG foreignOject. This patch
3012         changes containingBlock() & container() to return the containing
3013         foreignObject renderer instead.
3014
3015         The new foreignObject fixed position behavior matches that of current
3016         FireFox and Opera versions and is consistent with the spec:
3017         http://www.w3.org/TR/CSS2/visuren.html#fixed-positioning
3018         http://www.w3.org/TR/SVG/coords.html#EstablishingANewViewport
3019
3020         * rendering/RenderObject.cpp:
3021         (WebCore::RenderObject::containingBlock):
3022         (WebCore::RenderObject::container):
3023
3024 2012-06-09  Adam Barth  <abarth@webkit.org>
3025
3026         Can't use eval in iframes sanbdoxed via CSP header
3027         https://bugs.webkit.org/show_bug.cgi?id=88450
3028
3029         Reviewed by Mihai Parparita.
3030
3031         The initial empty document in a frame inherits the security context of
3032         its parent (including the CSP policy).  When we load the real document,
3033         in some cases we'll do a "secure transition" to the new document.  That
3034         means that we leave the global object in place in case the parent
3035         document has created any properties that it expects will be visible to
3036         the new document.
3037
3038         If the parent document has a CSP policy that blocks eval, the "no eval"
3039         bit will be set on the global object of the initial document.  When we
3040         perform a "secure transition" to the new document, we'll keep the bit,
3041         which is wrong.  In this patch, we reset the bit by always enabling
3042         eval when clearing the context, regardless of whether we're performing
3043         a "secure transition".
3044
3045         Test: http/tests/security/contentSecurityPolicy/iframe-inside-csp.html
3046
3047         * bindings/js/ScriptController.cpp:
3048         (WebCore::ScriptController::enableEval):
3049         (WebCore):
3050         * bindings/js/ScriptController.h:
3051         (ScriptController):
3052         * bindings/v8/ScriptController.cpp:
3053         (WebCore::ScriptController::enableEval):
3054         (WebCore):
3055         (WebCore::ScriptController::disableEval):
3056         * bindings/v8/ScriptController.h:
3057         (ScriptController):
3058         * loader/FrameLoader.cpp:
3059         (WebCore::FrameLoader::clear):
3060
3061 2012-06-09  Pablo Flouret  <pablof@motorola.com>
3062
3063         The value in Access-Control-Allow-Origin is not being matched correctly for CORS-enabled requests
3064         https://bugs.webkit.org/show_bug.cgi?id=88139
3065
3066         Reviewed by Adam Barth.
3067
3068         Compare a request's origin with the value given in any
3069         Access-Control-Allow-Origin headers in an exact, case-sensitive manner,
3070         instead of using SecurityOrigin::isSameSchemeHostPort(). Per step 3 of
3071         the resource sharing check algorithm in
3072         http://dvcs.w3.org/hg/cors/raw-file/tip/Overview.html#resource-sharing-check
3073
3074         Test: http/tests/xmlhttprequest/origin-exact-matching.html
3075
3076         * loader/CrossOriginAccessControl.cpp:
3077         (WebCore::passesAccessControlCheck):
3078
3079 2012-06-09  Huang Dongsung  <luxtella@company100.net>
3080
3081         [Qt][Texmap] All layers with backingStore are opaque when using TextureMapperGL.
3082         https://bugs.webkit.org/show_bug.cgi?id=88703
3083
3084         The bug originated from StillImage that is not override
3085         Image::currentFrameHasAlpha(), so it always returns false.
3086         StillImage is used by ImageBuffer, and if Texmap draws contents on ImageBuffer,
3087         TextureMapperBackingStore thinks contents does not have alpha.
3088
3089         Covered by existing compositing tests.
3090
3091         Reviewed by Noam Rosenthal.
3092
3093         * platform/graphics/qt/StillImageQt.cpp:
3094         (WebCore::StillImage::currentFrameHasAlpha):
3095         (WebCore):
3096         * platform/graphics/qt/StillImageQt.h:
3097         (StillImage):
3098
3099 2012-06-09  Victor Carbune  <victor@rosedu.org>
3100
3101         Basic support for timestamps within a TextTrackCue
3102         https://bugs.webkit.org/show_bug.cgi?id=88187
3103
3104         Implemented support for timestamps within a TextTrackCue.
3105         This enables rendering functionality for Karaoke and Paint-on captions.
3106
3107         Reviewed by Eric Carlson.
3108
3109         Test: media/track/track-cue-rendering-inner-timestamps.html
3110
3111         * css/mediaControls.css: Remove the background shadow pseudo-id and
3112         added two others, which can be further used for styling past / future
3113         contents of the cue.
3114         (video::-webkit-media-text-track-past-nodes): Used to style elements
3115         within the cue that are before the current movie time.
3116         (video::-webkit-media-text-track-future-nodes): Used to style elements
3117         within the cue that are after the current movie time.
3118         * html/HTMLMediaElement.cpp:
3119         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Regardless of whether
3120         the active set changed or not, the current cues need to be informed of the current
3121         movie time.
3122         * html/track/TextTrackCue.cpp:
3123         (WebCore::TextTrackCue::TextTrackCue): Initiliazed past and future containers.
3124         (WebCore::TextTrackCue::getCueAsHTML): Checked whether the current cue text has
3125         inner timestamps or not, in order to render faster if no timestamps are there.
3126         (WebCore::TextTrackCue::updateDisplayTree): Added method that keeps the past and future
3127         containers up to date, given a current movie time.
3128         (WebCore):
3129         (WebCore::TextTrackCue::getDisplayTree): Replaced the cue background container with the
3130         past cues container. The *internal* display tree of the cue now has two containers,
3131         representing past and future elements.
3132         * html/track/TextTrackCue.h: Added several variables to support the new functionality.
3133         (TextTrackCue):
3134         * html/track/WebVTTParser.cpp:
3135         (WebCore::WebVTTParser::constructTreeFromToken): Updated representation for this patch.
3136         * html/track/WebVTTParser.h:
3137         (WebVTTParser): Made public the collectTimeStamp method, as this is required for
3138         parsing timestamps within a cue as well.
3139
3140 2012-06-09  Vsevolod Vlasov  <vsevik@chromium.org>
3141
3142         Web Inspector: Open links in Sources panel by default and fallback to Resources and Network panel otherwise.
3143         https://bugs.webkit.org/show_bug.cgi?id=88710
3144
3145         Reviewed by Pavel Feldman.
3146
3147         * inspector/front-end/inspector.js:
3148         (WebInspector.documentClick.followLink):
3149         (WebInspector.documentClick):
3150         (WebInspector._showAnchorLocation):
3151
3152 2012-06-09  Vsevolod Vlasov  <vsevik@chromium.org>
3153
3154         Web Inspector: Only expand root domain in Sources/Scripts panel
3155         https://bugs.webkit.org/show_bug.cgi?id=88135
3156
3157         Reviewed by Pavel Feldman.
3158
3159         * inspector/front-end/NavigatorView.js:
3160         (WebInspector.NavigatorTreeOutline._treeElementsCompare.compare.typeWeight):
3161         (WebInspector.NavigatorTreeOutline._treeElementsCompare):
3162         (WebInspector.NavigatorFolderTreeElement.prototype.onattach):
3163
3164 2012-06-09  Vsevolod Vlasov  <vsevik@chromium.org>
3165
3166         Web Inspector: Pretty print should respect text editor indent setting.
3167         https://bugs.webkit.org/show_bug.cgi?id=88713
3168
3169         Reviewed by Pavel Feldman.
3170
3171         * inspector/front-end/ScriptFormatter.js:
3172
3173 2012-06-09  Dan Bernstein  <mitz@apple.com>
3174
3175         Fixed the build after r119895.
3176
3177         * WebCore.xcodeproj/project.pbxproj:
3178
3179 2012-06-09  Andrey Kosyakov  <caseq@chromium.org>
3180
3181         Web Inspector: [refactoring] rename TimelineVerticalOverview into TimelineFrameOverview
3182         https://bugs.webkit.org/show_bug.cgi?id=88708
3183
3184         Reviewed by Vsevolod Vlasov.
3185
3186         - rename TimelineVerticalOverview to TimelineFrameOverview;
3187         - rename associated fields, parameters, CSS classes etc;
3188         - rename overview mode designators to match the UI;
3189         - drop unused CSS rules for old-style mode selector;
3190
3191         * inspector/front-end/TimelineOverviewPane.js:
3192         (WebInspector.TimelineOverviewPane):
3193         (WebInspector.TimelineOverviewPane.prototype._showEvents):
3194         (WebInspector.TimelineOverviewPane.prototype._showFrames):
3195         (WebInspector.TimelineOverviewPane.prototype._showMemoryGraph):
3196         (WebInspector.TimelineOverviewPane.prototype._setFrameMode):
3197         (WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged):
3198         (WebInspector.TimelineOverviewPane.prototype._update):
3199         (WebInspector.TimelineOverviewPane.prototype.addFrame):
3200         (WebInspector.TimelineOverviewPane.prototype.zoomToFrame):
3201         (WebInspector.TimelineOverviewPane.prototype._reset):
3202         (WebInspector.TimelineOverviewPane.prototype._onWindowChanged):
3203         (WebInspector.TimelineFrameOverview):
3204         * inspector/front-end/TimelinePanel.js:
3205         (WebInspector.TimelinePanel):
3206         (WebInspector.TimelinePanel.prototype._shouldShowFrames):
3207         (WebInspector.TimelinePanel.prototype.revealRecordAt):
3208         * inspector/front-end/timelinePanel.css:
3209         (.timeline-frame-overview #timeline-overview-grid):
3210         (.timeline-frame-overview .timeline-overview-window):
3211         (.timeline-frame-overview .timeline-overview-dividers-background):
3212         (.timeline-frame-overview #timeline-overview-memory):
3213         (.timeline-frame-overview-status-bar-item.toggled-on .glyph):
3214         (.timeline-frame-overview-bars):
3215         (.timeline.timeline-frame-overview .resources-divider):
3216         (.sidebar-tree-item .timeline-frame-overview-status-bar-item):
3217
3218 2012-06-08  Vsevolod Vlasov  <vsevik@chromium.org>
3219
3220         IndexedDB: Inspector should handle null, string, and array keyPaths
3221         https://bugs.webkit.org/show_bug.cgi?id=84303
3222
3223         Reviewed by Pavel Feldman.
3224
3225         Supported different key path types and updated tests to cover each case.
3226         Key path strings are now highlighted in the DataGrid column headers.
3227
3228         * inspector/Inspector.json:
3229         * inspector/InspectorIndexedDBAgent.cpp:
3230         (WebCore):
3231         * inspector/front-end/IndexedDBModel.js:
3232         (WebInspector.IndexedDBModel.idbKeyPathFromKeyPath):
3233         (WebInspector.IndexedDBModel.keyPathStringFromIDBKeyPath):
3234         (WebInspector.IndexedDBModel.prototype._loadDatabase.callback):
3235         (WebInspector.IndexedDBModel.prototype._loadDatabase):
3236         (WebInspector.IndexedDBModel.ObjectStore.prototype.get keyPathString):
3237         (WebInspector.IndexedDBModel.Index.prototype.get keyPathString):
3238         * inspector/front-end/IndexedDBViews.js:
3239         (WebInspector.IDBDataView.prototype._createDataGrid):
3240         (WebInspector.IDBDataView.prototype._keyColumnHeaderFragment):
3241         (WebInspector.IDBDataView.prototype._keyPathStringFragment):
3242         (WebInspector.IDBDataGridNode.prototype.createCell):
3243         * inspector/front-end/ResourcesPanel.js:
3244         (WebInspector.IDBObjectStoreTreeElement.prototype._updateTooltip):
3245         (WebInspector.IDBIndexTreeElement.prototype._updateTooltip):
3246
3247 2012-06-08  Vsevolod Vlasov  <vsevik@chromium.org>
3248
3249         Web Inspector: Increase size limits for resource content cached in InspectorResourceAgent.
3250         https://bugs.webkit.org/show_bug.cgi?id=88674
3251
3252         Reviewed by Pavel Feldman.
3253
3254         * inspector/NetworkResourcesData.cpp:
3255
3256 2012-05-25  Vsevolod Vlasov  <vsevik@chromium.org>
3257
3258         Web Inspector: Limit DebuggerAgent.Location use to DebuggerModel only, introduce WebInspector.RawLocation to be used elsewhere.
3259         https://bugs.webkit.org/show_bug.cgi?id=87270
3260
3261         Reviewed by Pavel Feldman.
3262
3263         Introduced WebInspector.RawLocation interface, a generic raw location independent from concrete domain (Styles, Debugger).
3264         Made WebInspector.DebuggerModel.Location implement it and switched all debugger related methods to it.
3265
3266         * inspector/front-end/BreakpointManager.js:
3267         (WebInspector.BreakpointManager.prototype._breakpointResolved):
3268         * inspector/front-end/CompilerScriptMapping.js:
3269         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
3270         * inspector/front-end/DebuggerModel.js:
3271         (WebInspector.DebuggerModel.Location):
3272         (WebInspector.DebuggerModel.prototype.continueToLocation):
3273         (WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation):
3274         (WebInspector.DebuggerModel.prototype.setBreakpoint.didSetBreakpoint):
3275         (WebInspector.DebuggerModel.prototype.setBreakpoint):
3276         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
3277         (WebInspector.DebuggerModel.prototype._breakpointResolved):
3278         (WebInspector.DebuggerModel.prototype.createRawLocation):
3279         (WebInspector.DebuggerModel.prototype.createRawLocationByURL):
3280         (WebInspector.DebuggerModel.prototype.setSelectedCallFrame):
3281         (WebInspector.DebuggerModel.prototype.createLiveLocation):
3282         (WebInspector.DebuggerModel.CallFrame.prototype.get location):
3283         (WebInspector.DebuggerModel.CallFrame.prototype.createLiveLocation):
3284         * inspector/front-end/DebuggerResourceBinding.js:
3285         (WebInspector.DebuggerResourceBinding.setScriptSource.didEditScriptSource):
3286         (WebInspector.DebuggerResourceBinding.setScriptSource):
3287         (WebInspector.DebuggerResourceBinding.prototype.setContent.get if):
3288         (WebInspector.DebuggerResourceBinding.prototype.setContent):
3289         (WebInspector.DebuggerResourceBinding.prototype._setContentWithInitialContent):
3290         * inspector/front-end/JavaScriptSource.js:
3291         (WebInspector.JavaScriptSource.prototype.uiLocationToRawLocation):
3292         * inspector/front-end/Linkifier.js:
3293         * inspector/front-end/ObjectPopoverHelper.js:
3294         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover.showObjectPopover.):
3295         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
3296         * inspector/front-end/PresentationConsoleMessageHelper.js:
3297         * inspector/front-end/RawSourceCode.js:
3298         * inspector/front-end/ResourceScriptMapping.js:
3299         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
3300         * inspector/front-end/Script.js:
3301         (WebInspector.Script.prototype.rawLocationToUILocation):
3302         * inspector/front-end/ScriptSnippetModel.js:
3303         (WebInspector.SnippetScriptMapping.prototype.rawLocationToUILocation):
3304         * inspector/front-end/SourceMapping.js:
3305         * inspector/front-end/UISourceCode.js:
3306         (WebInspector.RawLocation):
3307
3308 2012-06-09  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3309
3310         Web Inspector: Add message loop instrumentation to public API and timeline agent
3311         https://bugs.webkit.org/show_bug.cgi?id=88639
3312
3313         Reviewed by Vsevolod Vlasov.
3314
3315         Message loop instrumentation will show when the render thread is busy.
3316         That way developer can discover if a render thread business causes low fps, or not.
3317
3318         * inspector/InspectorClient.h:
3319         (WebCore::InspectorClient::startMessageLoopMonitoring): Starts observer.
3320         (WebCore::InspectorClient::stopMessageLoopMonitoring): Stops observer.
3321         * inspector/InspectorController.cpp:
3322         (WebCore::InspectorController::InspectorController):
3323         Changed timeline agent constructor parameters.
3324         * inspector/InspectorInstrumentation.cpp:
3325         (WebCore::InspectorInstrumentation::willProcessTaskImpl):
3326         Forwards observer notification.
3327         (WebCore):
3328         (WebCore::InspectorInstrumentation::didProcessTaskImpl):
3329         Ditto.
3330         * inspector/InspectorInstrumentation.h:
3331         (InspectorInstrumentation):
3332         (WebCore::InspectorInstrumentation::willProcessTask):
3333         Ditto.
3334         (WebCore):
3335         (WebCore::InspectorInstrumentation::didProcessTask):
3336         Ditto.
3337         * inspector/InspectorTimelineAgent.cpp:
3338         (WebCore::InspectorTimelineAgent::start):
3339         Starts observer.
3340         (WebCore::InspectorTimelineAgent::stop):
3341         Stops observer.
3342         (WebCore::InspectorTimelineAgent::supportsFrameInstrumentation):
3343         Changed result origin.
3344         (WebCore::InspectorTimelineAgent::willProcessTask):
3345         Noop implementqation.
3346         (WebCore):
3347         (WebCore::InspectorTimelineAgent::didProcessTask):
3348         Noop implementqation.
3349         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
3350         Changed constructor parameters.
3351         * inspector/InspectorTimelineAgent.h:
3352         (WebCore::InspectorTimelineAgent::create):
3353         Ditto.
3354         (InspectorTimelineAgent):
3355         * inspector/WorkerInspectorController.cpp:
3356         (WebCore::WorkerInspectorController::WorkerInspectorController):
3357         Changed timeline agent constructor parameters.
3358
3359 2012-06-08  Andrey Kosyakov  <caseq@chromium.org>
3360
3361         Web Inspector: optimize timeline's frame mode overview appearance for 30fps
3362         https://bugs.webkit.org/show_bug.cgi?id=88556
3363
3364         Reviewed by Vsevolod Vlasov.
3365
3366         - adjust frame overview scale to 30fps == full height by default;
3367         - provide a fall-back auto-scale mode when median frame is longer than 1/30s;
3368         - add horizontal lines for 30 and 60fps;
3369         - drive-by fix: always use same order of categories in frame bars.
3370
3371         * inspector/front-end/TimelineOverviewPane.js:
3372         (WebInspector.TimelineVerticalOverview.prototype.update):
3373         (WebInspector.TimelineVerticalOverview.prototype._aggregateFrames):
3374         (WebInspector.TimelineVerticalOverview.prototype._renderBars):
3375         (WebInspector.TimelineVerticalOverview.prototype._drawFPSMarks):
3376         (WebInspector.TimelineVerticalOverview.prototype._renderBar):
3377
3378
3379 2012-06-09  Sukolsak Sakshuwong  <sukolsak@google.com>
3380
3381         Add UNDO_MANAGER flag
3382         https://bugs.webkit.org/show_bug.cgi?id=87908
3383
3384         Reviewed by Tony Chang.
3385
3386         Add undoManager property to document behind the UNDO_MANAGER flag and
3387         add placeholders for some methods of undoManager.
3388
3389         Test: editing/undomanager/document-has-undomanager.html
3390
3391         * CMakeLists.txt:
3392         * Configurations/FeatureDefines.xcconfig:
3393         * DerivedSources.cpp:
3394         * DerivedSources.make:
3395         * DerivedSources.pri:
3396         * GNUmakefile.am:
3397         * GNUmakefile.list.am:
3398         * WebCore.gypi:
3399         * WebCore.xcodeproj/project.pbxproj:
3400         * dom/Document.cpp:
3401         (WebCore::Document::Document):
3402         (WebCore):
3403         (WebCore::Document::undoManager):
3404         * dom/Document.h:
3405         (WebCore):
3406         (Document):
3407         * dom/Document.idl:
3408         * editing/UndoManager.cpp: Added.
3409         (WebCore):
3410         (WebCore::UndoManager::create):
3411         (WebCore::UndoManager::UndoManager):
3412         (WebCore::UndoManager::undo):
3413         (WebCore::UndoManager::redo):
3414         (WebCore::UndoManager::clearUndo):
3415         (WebCore::UndoManager::clearRedo):
3416         * editing/UndoManager.h: Added.
3417         (WebCore):
3418         (UndoManager):
3419         * editing/UndoManager.idl: Added.
3420
3421 2012-06-08  Levi Weintraub  <leviw@chromium.org>
3422
3423         RenderLayer::paintChildLayerIntoColumns doesn't properly pixel snap
3424         https://bugs.webkit.org/show_bug.cgi?id=88554
3425
3426         Reviewed by Darin Adler.
3427
3428         Column handling code in RenderLayer and RenderBlock was improperly clipping and translating
3429         using floats derived from FractionalLayoutUnits without pixel snapping. RenderLayer also
3430         improperly stored render tree offsets in ints instead of LayoutUnits. This corrects this
3431         issue.
3432
3433         Test: fast/sub-pixel/column-clipping.html
3434
3435         * rendering/RenderBlock.cpp:
3436         (WebCore::RenderBlock::paintColumnContents):
3437         * rendering/RenderLayer.cpp:
3438         (WebCore::RenderLayer::paintChildLayerIntoColumns):
3439
3440 2012-06-08  Rakesh KN  <rakesh.kn@motorola.com>