Unreviewed, rolling out r109255.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-01  Nikolas Zimmermann  <nzimmermann@rim.com>
2
3         Unreviewed, rolling out r109255.
4         http://trac.webkit.org/changeset/109255
5         https://bugs.webkit.org/show_bug.cgi?id=79932
6
7         Breaks rounded rects with dashed strokes in SVG
8
9         * WebCore.exp.in:
10         * platform/graphics/Path.cpp:
11         (WebCore::Path::addRoundedRect):
12         * platform/graphics/Path.h:
13         (Path):
14         * platform/graphics/cg/PathCG.cpp:
15         * platform/mac/WebCoreSystemInterface.h:
16         * platform/mac/WebCoreSystemInterface.mm:
17
18 2012-03-01  Adam Barth  <abarth@webkit.org>
19
20         DOMWindow shouldn't have any INDEXED_DATABASE ifdefs
21         https://bugs.webkit.org/show_bug.cgi?id=80013
22
23         Reviewed by Kentaro Hara.
24
25         Before this patch, DOMWindow still knew about IDB because of the
26         database factory.  This patch moves the factory to
27         DOMWindowIndexedDatabase.
28
29         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
30         (WebCore::DOMWindowIndexedDatabase::DOMWindowIndexedDatabase):
31         (WebCore::DOMWindowIndexedDatabase::from):
32         (WebCore):
33         (WebCore::DOMWindowIndexedDatabase::disconnectFrame):
34         (WebCore::DOMWindowIndexedDatabase::webkitIndexedDB):
35         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
36         (DOMWindowIndexedDatabase):
37         * page/DOMWindow.cpp:
38         (WebCore::DOMWindow::~DOMWindow):
39         (WebCore::DOMWindow::clear):
40         (WebCore):
41         * page/DOMWindow.h:
42         (DOMWindow):
43
44 2012-03-01  Nikolas Zimmermann  <nzimmermann@rim.com>
45
46         SVG <use> element allows invalid contents
47         https://bugs.webkit.org/show_bug.cgi?id=77764
48
49         Reviewed by Zoltan Herczeg.
50
51         Unbreak the world after r109299 - dozens of SVGUseElement tests fail in trunk because:
52         - text nodes weren't allowed in SVG shadow subtrees
53         - tagName matching ignores any prefixes, thus svg:circle fails to identify as SVGCircleElement
54
55         * svg/SVGUseElement.cpp:
56         (WebCore::isDisallowedElement):
57
58 2012-03-01  Luke Macpherson   <macpherson@chromium.org>
59
60         Handle CSSPropertyWebkitHyphens in CSSStyleApplyProperty.
61         https://bugs.webkit.org/show_bug.cgi?id=80004
62
63         Reviewed by Eric Seidel.
64
65         No new tests / refactoring only.
66
67         * css/CSSStyleApplyProperty.cpp:
68         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
69         * css/CSSStyleSelector.cpp:
70         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
71
72 2012-02-29  Pavel Podivilov  <podivilov@chromium.org>
73
74         Web Inspector: abstract out the common pattern of creating auto-updated locations.
75         https://bugs.webkit.org/show_bug.cgi?id=79906
76
77         Reviewed by Vsevolod Vlasov.
78
79         * inspector/front-end/DebuggerPresentationModel.js:
80         (WebInspector.PresentationCallFrame.prototype.uiLocation):
81         (WebInspector.DebuggerPresentationModel.CallFramePlacard):
82         (WebInspector.DebuggerPresentationModel.CallFramePlacard.prototype.discard):
83         (WebInspector.DebuggerPresentationModel.CallFramePlacard.prototype._update):
84         (WebInspector.DebuggerPresentationModel.LinkifierFormatter.prototype.formatRawSourceCodeAnchor):
85         (WebInspector.DebuggerPresentationModel.DefaultLinkifierFormatter.prototype.formatRawSourceCodeAnchor):
86         (WebInspector.DebuggerPresentationModel.Linkifier):
87         (WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyRawSourceCode):
88         (WebInspector.DebuggerPresentationModel.Linkifier.prototype.reset):
89         (WebInspector.DebuggerPresentationModel.Linkifier.prototype._updateAnchor):
90         * inspector/front-end/RawSourceCode.js:
91         (WebInspector.RawSourceCode.prototype.createLiveLocation):
92         (WebInspector.RawSourceCode.LiveLocation):
93         (WebInspector.RawSourceCode.LiveLocation.prototype.init):
94         (WebInspector.RawSourceCode.LiveLocation.prototype.dispose):
95         (WebInspector.RawSourceCode.LiveLocation.prototype._update):
96
97 2012-03-01  Kenneth Rohde Christiansen  <kenneth@webkit.org>
98
99         Make the tiling code slightly smarter
100         https://bugs.webkit.org/show_bug.cgi?id=80015
101
102         Reviewed by Simon Hausmann.
103
104         Avoid doing the same tranformations all over in each call to
105         tileRectForCoordinate.
106
107         Do not resize tiles and then drop them because they are not out of
108         the keep rect; instead drop before resizing.
109
110         Rename dropTilesOutsideRect to setKeepRect as it now stored the keep
111         rect. This is used to avoid unneeded iteration of all tiles for
112         invalidates outside the keep rect.
113
114         * platform/graphics/TiledBackingStore.cpp:
115         (WebCore::TiledBackingStore::invalidate):
116         (WebCore):
117         (WebCore::TiledBackingStore::commitScaleChange):
118         (WebCore::TiledBackingStore::coverageRatio):
119         (WebCore::TiledBackingStore::createTiles):
120         (WebCore::TiledBackingStore::adjustForContentsRect):
121         (WebCore::TiledBackingStore::resizeEdgeTiles):
122         (WebCore::TiledBackingStore::setKeepRect):
123         (WebCore::TiledBackingStore::removeAllNonVisibleTiles):
124         (WebCore::TiledBackingStore::tileRectForCoordinate):
125         (WebCore::TiledBackingStore::setSupportsAlpha):
126         * platform/graphics/TiledBackingStore.h:
127         (TiledBackingStore):
128
129 2012-02-29  Kinuko Yasuda  <kinuko@chromium.org>
130
131         Use the new createSnapshotFileAndReadMetadata API for FileEntry.file()
132         https://bugs.webkit.org/show_bug.cgi?id=79928
133
134         Reviewed by David Levin.
135
136         No new tests: no functionality changes.
137         fast/filesystem/ tests should use the new code (they should pass once
138         the corresponding chromium change is rolled in).
139
140         * fileapi/DOMFileSystem.cpp:
141         (WebCore::DOMFileSystem::createFile): Updated to use the new API.
142         * fileapi/DOMFileSystemSync.cpp:
143         (WebCore::DOMFileSystemSync::createFile): Updated to use the new API.
144         * fileapi/FileSystemCallbacks.cpp:
145         * fileapi/FileSystemCallbacks.h:
146         (FileSystemCallbacksBase):
147         * platform/AsyncFileSystem.h:
148         (AsyncFileSystem):
149         * platform/AsyncFileSystemCallbacks.h: Added default implementation (which just calls ASSERT_NOTREACHED()) so that subclasses can focus only on the callback methods that they're interested in.
150
151 2012-02-29  Pavel Podivilov  <podivilov@chromium.org>
152
153         Web Inspector: add UISourceCode.isEditable property.
154         https://bugs.webkit.org/show_bug.cgi?id=79909
155
156         Reviewed by Vsevolod Vlasov.
157
158         * inspector/front-end/DebuggerPresentationModel.js:
159         (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
160         * inspector/front-end/RawSourceCode.js:
161         (WebInspector.RawSourceCode.prototype._createUISourceCode):
162         * inspector/front-end/UISourceCode.js:
163         (WebInspector.UISourceCode):
164
165 2012-02-29  Shinya Kawanaka  <shinyak@chromium.org> 
166
167         Fallback elements in non-youngest shadow tree should not be rendered.
168         https://bugs.webkit.org/show_bug.cgi?id=80002
169
170         Reviewed by Hajime Morita.
171
172         Fallback elements in non-youngest shadow tree should not be rendered, so its phase should be
173         AttachingNotDistributed instead of AttachingFallbacked.
174
175         Tests: multiple-shadowroot-rendering.html covers this patch.
176
177         * dom/NodeRenderingContext.cpp:
178         (WebCore::NodeRenderingContext::NodeRenderingContext):
179
180 2012-02-29  Adam Barth  <abarth@webkit.org>
181
182         ScriptExecutionContext has too many ifdef ENABLE(SQL_DATABASE)
183         https://bugs.webkit.org/show_bug.cgi?id=79633
184
185         Reviewed by Eric Seidel.
186
187         This class creates a DatabaseContext object to supplement the
188         ScriptExecutionContext with database-specific information.  This new
189         object lets us remove a bunch of database-specific (and ifdefed) logic
190         from ScriptExecutionContext.(cpp|h).
191
192         * CMakeLists.txt:
193         * GNUmakefile.list.am:
194         * Target.pri:
195         * WebCore.exp.in:
196         * WebCore.gypi:
197         * WebCore.vcproj/WebCore.vcproj:
198         * WebCore.xcodeproj/project.pbxproj:
199         * dom/ScriptExecutionContext.cpp:
200         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
201         (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
202         (WebCore):
203         * dom/ScriptExecutionContext.h:
204         (WebCore):
205         (ScriptExecutionContext):
206         * history/PageCache.cpp:
207         (WebCore::logCanCacheFrameDecision):
208         (WebCore::PageCache::canCachePageContainingThisFrame):
209         * loader/FrameLoader.cpp:
210         (WebCore::FrameLoader::stopLoading):
211         * platform/Supplementable.h:
212         (WebCore::Supplementable::provideSupplement):
213         (WebCore::Supplementable::requireSupplement):
214         (Supplementable):
215         * storage/AbstractDatabase.cpp:
216         (WebCore::AbstractDatabase::AbstractDatabase):
217         * storage/AbstractDatabase.h:
218         (WebCore):
219         (WebCore::AbstractDatabase::databaseContext):
220         (AbstractDatabase):
221         * storage/Database.cpp:
222         (WebCore::Database::openDatabase):
223         (WebCore::Database::Database):
224         (WebCore::Database::openAndVerifyVersion):
225         (WebCore::Database::markAsDeletedAndClose):
226         (WebCore::Database::close):
227         (WebCore::Database::closeImmediately):
228         (WebCore::Database::performOpenAndVerify):
229         (WebCore::Database::scheduleTransaction):
230         (WebCore::Database::scheduleTransactionStep):
231         (WebCore::Database::transactionClient):
232         (WebCore::Database::transactionCoordinator):
233         (WebCore::Database::tableNames):
234         (WebCore::Database::securityOrigin):
235         * storage/DatabaseContext.cpp: Added.
236         (WebCore):
237         (WebCore::existingDatabaseContextFrom):
238         (WebCore::DatabaseContext::DatabaseContext):
239         (WebCore::DatabaseContext::~DatabaseContext):
240         (WebCore::DatabaseContext::from):
241         (WebCore::DatabaseContext::databaseThread):
242         (WebCore::DatabaseContext::hasOpenDatabases):
243         (WebCore::DatabaseContext::stopDatabases):
244         * storage/DatabaseContext.h: Added.
245         (WebCore):
246         (DatabaseContext):
247         (WebCore::DatabaseContext::setHasOpenDatabases):
248         * storage/SQLTransaction.cpp:
249         (WebCore::SQLTransaction::checkAndHandleClosedOrInterruptedDatabase):
250         (WebCore::SQLTransaction::notifyDatabaseThreadIsShuttingDown):
251         * workers/WorkerThread.cpp:
252         (WebCore::WorkerThreadShutdownStartTask::performTask):
253
254 2012-02-29  Shinya Kawanaka  <shinyak@chromium.org>
255
256         Refactoring: HTMLContentSelector should be InsertionPoint-aware.
257         https://bugs.webkit.org/show_bug.cgi?id=79901
258
259         Reviewed by Hajime Morita.
260
261         ContentSelectorQuery took HTMLContentElement as argument, but patch changes it to take InsertionPoint instead.
262         If InsertionPoint is not HTMLContentElement, ContentSelectorQuery will selects the rest of light children.
263
264         Now InsertionPoint has pure virtual method 'select'. <shadow> will implement this as a method returning empty string.
265
266         * dom/ShadowRoot.cpp:
267         (WebCore::ShadowRoot::hasInsertionPoint):
268         * dom/ShadowRoot.h:
269         (ShadowRoot):
270         * dom/ShadowTree.cpp:
271         (WebCore::ShadowTree::needsReattachHostChildrenAndShadow):
272         (WebCore::ShadowTree::hostChildrenChanged):
273         * html/shadow/ContentSelectorQuery.cpp:
274         (WebCore::ContentSelectorQuery::ContentSelectorQuery):
275         (WebCore::ContentSelectorQuery::matches):
276         * html/shadow/ContentSelectorQuery.h:
277         (WebCore):
278         (ContentSelectorQuery):
279         * html/shadow/HTMLContentElement.cpp:
280         (WebCore::HTMLContentElement::detach):
281         * html/shadow/HTMLContentElement.h:
282         (WebCore::toHTMLContentElement):
283         (WebCore):
284         * html/shadow/HTMLContentSelector.cpp:
285         (WebCore::HTMLContentSelector::select):
286         * html/shadow/HTMLContentSelector.h:
287         (HTMLContentSelector):
288         * html/shadow/InsertionPoint.h:
289         (InsertionPoint):
290
291 2012-02-29  Luke Macpherson   <macpherson@chromium.org>
292
293         Handle CSSPropertySpeak in CSSStyleApplyProperty.
294         https://bugs.webkit.org/show_bug.cgi?id=79879
295
296         Reviewed by Eric Seidel.
297
298         No new tests / refactoring only.
299
300         * css/CSSStyleApplyProperty.cpp:
301         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
302         * css/CSSStyleSelector.cpp:
303         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
304         * rendering/style/RenderStyle.h:
305
306 2012-02-29  Luke Macpherson   <macpherson@chromium.org>
307
308         Handle CSSPropertyWebkitColumnAxis in CSSStyleApplyProperty.
309         https://bugs.webkit.org/show_bug.cgi?id=79869
310
311         Reviewed by Eric Seidel.
312
313         No new tests / refactoring only.
314
315         * css/CSSStyleApplyProperty.cpp:
316         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
317         * css/CSSStyleSelector.cpp:
318         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
319
320 2012-02-29  Erik Arvidsson  <arv@chromium.org>
321
322         Rename DOMSelection to Selection
323         https://bugs.webkit.org/show_bug.cgi?id=79688
324
325         Reviewed by Adam Barth.
326
327         No new tests. Existing tests have been updated to cover this.
328
329         * page/DOMSelection.idl:
330         * page/DOMWindow.idl:
331
332 2012-02-29  Joshua Bell  <jsbell@chromium.org>
333
334         IndexedDB: IDBDatabase.objectStoreNames and IDObjectStore.indexNames results should be sorted
335         https://bugs.webkit.org/show_bug.cgi?id=79950
336
337         Reviewed by Tony Chang.
338
339         Test: storage/indexeddb/list-ordering.html
340
341         * dom/DOMStringList.cpp: Added sort method, not exposed via IDL.
342         (WebCore::DOMStringList::sort):
343         (WebCore):
344         * dom/DOMStringList.h:
345         (DOMStringList):
346         * storage/IDBDatabaseBackendImpl.cpp:
347         (WebCore::IDBDatabaseBackendImpl::objectStoreNames):
348         * storage/IDBObjectStoreBackendImpl.cpp:
349         (WebCore::IDBObjectStoreBackendImpl::indexNames):
350
351 2012-02-29  W. James MacLean  <wjmaclean@chromium.org>
352
353         [chromium] Estimate pixel count for frame rate control
354         https://bugs.webkit.org/show_bug.cgi?id=74982
355
356         Reviewed by James Robinson.
357
358         Value checks added to unit tests.
359
360         Adds mechanism to compute and collect statistics on pixel overdraw for selected frames.
361
362         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
363         (WebCore::CCLayerTreeHostImpl::optimizeRenderPasses):
364         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
365         (WebCore::wedgeProduct):
366         (WebCore):
367         (WebCore::quadArea):
368         (WebCore::CCQuadCuller::cullOccludedQuads):
369         * platform/graphics/chromium/cc/CCQuadCuller.h:
370         (CCQuadCuller):
371         * platform/graphics/chromium/cc/CCRenderPass.cpp:
372         (WebCore::CCRenderPass::optimizeQuads):
373         * platform/graphics/chromium/cc/CCRenderPass.h:
374         (CCOverdrawCounts):
375         (WebCore):
376         (CCRenderPass):
377
378 2012-02-29  Jason Liu  <jason.liu@torchmobile.com.cn>
379
380         [BlackBerry]Make about:cache feature available in release version.
381         https://bugs.webkit.org/show_bug.cgi?id=79866
382
383         Reviewed by Antonio Gomes.
384
385         No tests.
386         * platform/network/blackberry/NetworkJob.cpp:
387         (WebCore::NetworkJob::handleAbout):
388
389 2012-02-29  James Simonsen  <simonjam@chromium.org>
390
391         [chromium] Fix navigation start time on cross-renderer navigation
392         https://bugs.webkit.org/show_bug.cgi?id=75922
393
394         Reviewed by Darin Fisher.
395
396         * loader/DocumentLoadTiming.cpp:
397         (WebCore::DocumentLoadTiming::setNavigationStart): Added.
398         * loader/DocumentLoadTiming.h:
399
400 2012-02-29  Stephen Chenney  <schenney@chromium.org>
401
402         SVG <use> element allows invalid contents
403         https://bugs.webkit.org/show_bug.cgi?id=77764
404
405         Reviewed by Nikolas Zimmermann.
406
407         Modify the isDisallowedElement method to disallow all of the
408         disallowed elements, instead of just a few. It is now a whitelist
409         implementation.
410
411         This also fixes bugs 78807, 78838 and 79798 related to memory
412         corruption issues.
413
414         Tests: svg/custom/bug78807.svg
415                svg/custom/bug78838.html
416                svg/custom/bug79798.html
417
418         * svg/SVGUseElement.cpp:
419         (WebCore::isDisallowedElement):
420
421 2012-02-29  Ami Fischman  <fischman@chromium.org>
422
423         Continue the search for playable mime types among <source> children of <video> even when using data: URLs
424         https://bugs.webkit.org/show_bug.cgi?id=79934
425
426         Reviewed by Eric Carlson.
427
428         Test: media/sources-fallback-codecs.html
429
430         * html/HTMLMediaElement.cpp:
431         (WebCore::HTMLMediaElement::selectNextSourceChild):
432
433 2012-02-29  Ian Vollick  <vollick@chromium.org>
434
435         [chromium] Add impl-thread support for animation-timing-function
436         https://bugs.webkit.org/show_bug.cgi?id=79819
437
438         Reviewed by James Robinson.
439
440         * WebCore.gypi:
441         * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.cpp:
442         (WebCore::CCKeyframe::CCKeyframe):
443         (WebCore):
444         (WebCore::CCKeyframe::~CCKeyframe):
445         (WebCore::CCKeyframe::time):
446         (WebCore::CCKeyframe::timingFunction):
447         (WebCore::CCFloatKeyframe::create):
448         (WebCore::CCFloatKeyframe::CCFloatKeyframe):
449         (WebCore::CCFloatKeyframe::~CCFloatKeyframe):
450         (WebCore::CCFloatKeyframe::value):
451         (WebCore::CCFloatKeyframe::clone):
452         (WebCore::CCTransformKeyframe::create):
453         (WebCore::CCTransformKeyframe::CCTransformKeyframe):
454         (WebCore::CCTransformKeyframe::~CCTransformKeyframe):
455         (WebCore::CCTransformKeyframe::value):
456         (WebCore::CCTransformKeyframe::clone):
457         (WebCore::CCKeyframedFloatAnimationCurve::create):
458         (WebCore::CCKeyframedFloatAnimationCurve::CCKeyframedFloatAnimationCurve):
459         (WebCore::CCKeyframedFloatAnimationCurve::addKeyframe):
460         (WebCore::CCKeyframedFloatAnimationCurve::duration):
461         (WebCore::CCKeyframedFloatAnimationCurve::clone):
462         (WebCore::CCKeyframedFloatAnimationCurve::getValue):
463         (WebCore::CCKeyframedTransformAnimationCurve::create):
464         (WebCore::CCKeyframedTransformAnimationCurve::CCKeyframedTransformAnimationCurve):
465         (WebCore::CCKeyframedTransformAnimationCurve::~CCKeyframedTransformAnimationCurve):
466         (WebCore::CCKeyframedTransformAnimationCurve::addKeyframe):
467         (WebCore::CCKeyframedTransformAnimationCurve::duration):
468         (WebCore::CCKeyframedTransformAnimationCurve::clone):
469         (WebCore::CCKeyframedTransformAnimationCurve::getValue):
470         * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.h:
471         (CCKeyframe):
472         (CCFloatKeyframe):
473         (WebCore):
474         (CCTransformKeyframe):
475         (CCKeyframedFloatAnimationCurve):
476         (CCKeyframedTransformAnimationCurve):
477         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
478         * platform/graphics/chromium/cc/CCTimingFunction.cpp: Added.
479         (WebCore):
480         (WebCore::CCTimingFunction::CCTimingFunction):
481         (WebCore::CCTimingFunction::~CCTimingFunction):
482         (WebCore::CCTimingFunction::duration):
483         (WebCore::CCCubicBezierTimingFunction::create):
484         (WebCore::CCCubicBezierTimingFunction::CCCubicBezierTimingFunction):
485         (WebCore::CCCubicBezierTimingFunction::~CCCubicBezierTimingFunction):
486         (WebCore::CCCubicBezierTimingFunction::getValue):
487         (WebCore::CCCubicBezierTimingFunction::clone):
488         (WebCore::CCEaseTimingFunction::create):
489         (WebCore::CCEaseInTimingFunction::create):
490         (WebCore::CCEaseOutTimingFunction::create):
491         (WebCore::CCEaseInOutTimingFunction::create):
492         * platform/graphics/chromium/cc/CCTimingFunction.h: Added.
493         (WebCore):
494         (CCTimingFunction):
495         (CCCubicBezierTimingFunction):
496         (CCEaseTimingFunction):
497         (CCEaseInTimingFunction):
498         (CCEaseOutTimingFunction):
499         (CCEaseInOutTimingFunction):
500
501 2012-02-29  Shinya Kawanaka  <shinyak@chromium.org>
502
503         Methods in ShadowTree and TreeScopeAdopter should be multiple shadow roots aware.
504         https://bugs.webkit.org/show_bug.cgi?id=79768
505
506         Reviewed by Hajime Morita.
507
508         Some methods in ShadowTree and TreeScopeAdopter were not multiple shadow roots aware.
509         They should consider multiple shadow roots.
510
511         Test: fast/dom/shadow/multiple-shadowroot-adopt.html
512
513         * dom/ShadowTree.cpp:
514         (WebCore::ShadowTree::setParentTreeScope):
515         (WebCore):
516         (WebCore::ShadowTree::childNeedsStyleRecalc):
517         (WebCore::ShadowTree::needsStyleRecalc):
518         * dom/ShadowTree.h:
519         (WebCore):
520         (ShadowTree):
521         * dom/TreeScopeAdopter.cpp:
522         (WebCore::shadowTreeFor):
523         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
524         (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
525         (WebCore::TreeScopeAdopter::moveShadowTreeToNewDocument):
526         (WebCore):
527         * dom/TreeScopeAdopter.h:
528         (TreeScopeAdopter):
529
530 2012-02-29  David Levin  <levin@chromium.org>
531
532         [chromium] Add the ability to turn off autoresize.
533         https://bugs.webkit.org/show_bug.cgi?id=77452
534
535         Reviewed by Darin Fisher.
536
537         Test: fast/autoresize/turn-off-autoresize.html
538
539         * page/FrameView.cpp:
540         (WebCore::FrameView::enableAutoSizeMode): Fix the code
541         path for turning off autoresize to set the scrollbars to auto.
542
543 2012-02-29  David Barton  <dbarton@mathscribe.com>
544
545         <msubsup> setNeedsLayout() correction
546         https://bugs.webkit.org/show_bug.cgi?id=79856
547
548         Reviewed by Julien Chaffraix.
549
550         m_scripts->setNeedsLayout(true, false); needs to be added to the fix for bug 79274.
551
552         No new tests. It's actually difficult to test the need for this with the current code,
553         because there are a lot of extra setNeedsLayout() calls right now. I caught this after
554         removing some of those calls that should be redundant, for a future patch. Actually
555         removing those calls now changes other behavior, due to other bugs, so I'll save all
556         that for future patches. We should land this fix now though I think, as it could
557         possibly matter in some cases.
558
559         * rendering/mathml/RenderMathMLSubSup.cpp:
560         (WebCore::RenderMathMLSubSup::layout):
561
562 2012-02-29  Andreas Kling  <awesomekling@apple.com>
563
564         IsSynchronizingStyleAttributeFlag could be purged.
565         <http://webkit.org/b/79313>
566
567         Reviewed by Anders Carlsson.
568
569         We were using IsSynchronizingStyleAttributeFlag to prevent various things from
570         happening below setAttribute() when serializing the "style" attribute based on
571         an element's inline style.
572
573         Simplify the whole thing by adding a way to set an attribute without triggering
574         any callbacks (a 'notifyChanged' argument to Element::setAttribute().)
575         This removes the need for IsSynchronizingStyleAttributeFlag in the first place
576         and makes StyledElement::updateStyleAttribute() a bit cheaper to boot.
577
578         * dom/Element.cpp:
579         (WebCore::Element::setAttribute):
580         (WebCore::Element::setAttributeInternal):
581         (WebCore::Element::willModifyAttribute):
582         (WebCore::Element::didModifyAttribute):
583         (WebCore::Element::didRemoveAttribute):
584         * dom/Element.h:
585         * dom/Node.h:
586         * dom/StyledElement.cpp:
587         (WebCore::StyledElement::updateStyleAttribute):
588         (WebCore::StyledElement::attributeChanged):
589         * html/HTMLElement.cpp:
590         (WebCore::StyledElement::copyNonAttributeProperties):
591
592 2012-02-29  Daniel Cheng  <dcheng@chromium.org>
593
594         [chromium] REGRESSION: Cannot drag a file out
595         https://bugs.webkit.org/show_bug.cgi?id=79817
596
597         Reviewed by Ryosuke Niwa.
598
599         Temporary fix for file drag out. This change won't be needed once DataTransferItemList
600         support is better implemented.
601
602         Test: platform/chromium/fast/events/drag-downloadURL.html
603
604         * platform/chromium/ChromiumDataObject.cpp:
605         (WebCore::ChromiumDataObject::types):
606
607 2012-02-29  Luke Macpherson   <macpherson@chromium.org>
608
609         Clean up CSSPrimitiveValue::computeLengthDouble().
610         https://bugs.webkit.org/show_bug.cgi?id=77065
611
612         Reviewed by Eric Seidel.
613
614         Refactoring only / no behavioral change.
615
616         * css/CSSPrimitiveValue.cpp:
617         (WebCore::CSSPrimitiveValue::computeLengthDouble):
618
619 2012-02-29  Beth Dakin  <bdakin@apple.com>
620
621         Speculative build-fix.
622
623         * rendering/RenderImage.cpp:
624         (WebCore::RenderImage::paintReplaced):
625
626 2012-02-29  Beth Dakin  <bdakin@apple.com>
627
628         https://bugs.webkit.org/show_bug.cgi?id=79705
629         didNewFirstVisuallyNonEmptyLayout should be enhanced to look at size instead 
630         of a raw tally
631         -and corresponding-
632         <rdar://problem/10821314>
633
634         Reviewed by Dave Hyatt.
635
636         Instead of firing didNewFirstVisuallyNonEmptyLayout() when a raw tally of 
637         relevant painted objects has reached a port-defined threshold, this patch 
638         looks at the size of those objects with respect to the view area. The patch 
639         also looks at relevant objects that cannot yet be fully painted, such as 
640         incrementally loading images. 
641
642         We no longer need a HashSet for the relevant painted objects since Region can 
643         do all of the heavy lifting. We now have a Region for the painted and 
644         unpainted regions. We do need a HashSet for the unpainted objects though, 
645         because we need to know if a painted object needs to be subtracted from the 
646         unpainted region before being added to the painted region.
647         * page/Page.cpp:
648         (WebCore):
649         (WebCore::Page::isCountingRelevantRepaintedObjects):
650         (WebCore::Page::startCountingRelevantRepaintedObjects):
651         (WebCore::Page::resetRelevantPaintedObjectCounter):
652         (WebCore::Page::addRelevantRepaintedObject):
653         (WebCore::Page::addRelevantUnpaintedObject):
654         * page/Page.h:
655         (Page):
656
657         New function on Region iterates through the rects and calculates the total 
658         area.
659         * platform/graphics/Region.cpp:
660         (WebCore::Region::totalArea):
661         (WebCore):
662         * platform/graphics/Region.h:
663         (Region):
664
665         Remove code from these classes since they are not actually relevant objects.
666         * rendering/InlineBox.cpp:
667         (WebCore::InlineBox::paint):
668         * rendering/RenderRegion.cpp:
669         (WebCore::RenderRegion::paintReplaced):
670         * rendering/RenderReplaced.cpp:
671         (WebCore::RenderReplaced::paint):
672
673         All of these other callers send a rect that actually represents their size 
674         (usually the visualOverflowRect) instead of the paintInfo's paintRect, and 
675         they call addRelevantUnpaintedObject when appropriate.
676         * rendering/InlineTextBox.cpp:
677         (WebCore::InlineTextBox::paint):
678         * rendering/RenderEmbeddedObject.cpp:
679         (WebCore::RenderEmbeddedObject::paint):
680         (WebCore::RenderEmbeddedObject::paintReplaced):
681         * rendering/RenderHTMLCanvas.cpp:
682         (WebCore::RenderHTMLCanvas::paintReplaced):
683         * rendering/RenderImage.cpp:
684         (WebCore::RenderImage::paintReplaced):
685         * rendering/RenderVideo.cpp:
686         (WebCore::RenderVideo::paintReplaced):
687         * rendering/svg/RenderSVGRoot.cpp:
688         (WebCore::RenderSVGRoot::paintReplaced):
689
690 2012-02-29  Joshua Bell  <jsbell@chromium.org>
691
692         IndexedDB: Resource leak with IDBObjectStore.openCursor
693         https://bugs.webkit.org/show_bug.cgi?id=79835
694
695         IDBCursor object that were never continue()'d to the end would leak due to a 
696         reference cycle with IDBRequest. In addition, the IDBRequest would never be
697         marked "finished" which would prevent GC from reclaiming it. IDBTransactions
698         now track and notify IDBCursors to break these references when the transaction
699         can no longer not process requests.
700
701         Reviewed by Tony Chang.
702
703         Tests: storage/indexeddb/cursor-continue.html
704
705         * storage/IDBCursor.cpp:
706         (WebCore::IDBCursor::IDBCursor): Register with IDBTransaction bookkeeping.
707         (WebCore::IDBCursor::continueFunction): Early error if transaction has finished.
708         (WebCore::IDBCursor::close): Break the reference cycle with IDBRequest, and notify it
709         that the cursor is finished.
710         (WebCore):
711         * storage/IDBCursor.h:
712         (WebCore):
713         (IDBCursor):
714         * storage/IDBRequest.cpp:
715         (WebCore::IDBRequest::IDBRequest):
716         (WebCore::IDBRequest::finishCursor): If there is no request in flight, mark itself as
717         finished to allow GC.
718         (WebCore):
719         (WebCore::IDBRequest::dispatchEvent): Once an in-flight request has been processed,
720         mark the request as finished if the cursor is finished, to allow GC.
721         * storage/IDBRequest.h:
722         (IDBRequest):
723         * storage/IDBTransaction.cpp: Track open cursors, close them when finished.
724         (WebCore::IDBTransaction::OpenCursorNotifier::OpenCursorNotifier):
725         (WebCore):
726         (WebCore::IDBTransaction::OpenCursorNotifier::~OpenCursorNotifier):
727         (WebCore::IDBTransaction::registerOpenCursor):
728         (WebCore::IDBTransaction::unregisterOpenCursor):
729         (WebCore::IDBTransaction::closeOpenCursors):
730         (WebCore::IDBTransaction::onAbort):
731         (WebCore::IDBTransaction::onComplete):
732         * storage/IDBTransaction.h:
733         (WebCore):
734         (OpenCursorNotifier):
735         (IDBTransaction):
736
737 2012-02-29  David Hyatt  <hyatt@apple.com>
738
739         https://bugs.webkit.org/show_bug.cgi?id=79940
740         <rdar://problem/10080189>
741         
742         Add support in WebKit for an intra-line character grid for Japanese text layout.
743         
744         Patch logicalLeftOffsetForLine and logicalRightOffsetForLine in order to get the
745         basic edge snapping grid functionality up and running. See all the FIXMEs in the function for
746         some of the issues that still have to be dealt with for it to really work well.
747
748         Reviewed by Dan Bernstein.
749
750         Added new tests in fast/line-grid.
751
752         * rendering/RenderBlock.cpp:
753         (WebCore::RenderBlock::logicalLeftOffsetForLine):
754         (WebCore::RenderBlock::logicalRightOffsetForLine):
755
756 2012-02-29  Anders Carlsson  <andersca@apple.com>
757
758         [Chromium] Some Layout Tests in platform/chromium/rubberbanding and platform/chromium/compositing/rubberbanding are failing
759         https://bugs.webkit.org/show_bug.cgi?id=79878
760
761         Reviewed by James Robinson.
762
763         Make sure that ScrollableArea::setScrollOffsetFromAnimation doesn't end up
764         setting the ScrollAnimator's current scroll position by making a new function, scrollPositionChanged,
765         that both notifyScrollPositionChanged and setScrollOffsetFromAnimation call and move the call to update
766         the position to notifyScrollPositionChanged.
767
768         * platform/ScrollableArea.cpp:
769         (WebCore::ScrollableArea::notifyScrollPositionChanged):
770         (WebCore):
771         (WebCore::ScrollableArea::scrollPositionChanged):
772         (WebCore::ScrollableArea::setScrollOffsetFromAnimation):
773         * platform/ScrollableArea.h:
774         (ScrollableArea):
775
776 2012-02-29  Dana Jansens  <danakj@chromium.org>
777
778         [chromium] Don't let invalidation for next frame prevent tile upload
779         https://bugs.webkit.org/show_bug.cgi?id=79841
780
781         Reviewed by James Robinson.
782
783         We currently don't push dirty tiles to the impl thread so there are no
784         tiles with garbage data on the impl thread. However, this judgement is
785         overzealous and blocks tiles that get invalidated by WebKit for the
786         next frame during the paint of the current frame.
787
788         Instead, check if a tile is dirty and was not painted for the current
789         frame when deciding to push the tile to the impl thread. This requires
790         that we know if a tile was painted during the current frame, which we
791         can do if we always reset m_updateRect to be empty each frame.
792
793         New unit tests: TiledLayerChromiumTest.pushTilesMarkedDirtyDuringPaint
794                         TiledLayerChromiumTest.pushTilesLayerMarkedDirtyDuringPaintOnNextLayer
795                         TiledLayerChromiumTest.pushTilesLayerMarkedDirtyDuringPaintOnPreviousLayer
796
797         * platform/graphics/chromium/TiledLayerChromium.cpp:
798         (WebCore::UpdatableTile::isDirtyForCurrentFrame):
799         (WebCore::TiledLayerChromium::pushPropertiesTo):
800         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
801         (WebCore::TiledLayerChromium::resetUpdateState):
802         (WebCore):
803         (WebCore::TiledLayerChromium::prepareToUpdate):
804         * platform/graphics/chromium/TiledLayerChromium.h:
805         (TiledLayerChromium):
806
807 2012-02-29  Tommy Widenflycht  <tommyw@google.com>
808
809         MediaStream API: MediaStreamTrackList out-of-bounds access fix
810         https://bugs.webkit.org/show_bug.cgi?id=79889
811
812         Reviewed by Adam Barth.
813
814         Out-of-bounds access to MediaStreamTrackList ASSERTS instead of returning 0,
815         this is not according to ecmascript standard. Also fixed a similar issue in MediaStreamList.
816
817         Test: fast/mediastream/peerconnection-mediastreamlist.html
818
819         * Modules/mediastream/MediaStreamList.cpp:
820         (WebCore::MediaStreamList::item):
821         * Modules/mediastream/MediaStreamTrackList.cpp:
822         (WebCore::MediaStreamTrackList::item):
823
824 2012-02-29  Leo Yang  <leo.yang@torchmobile.com.cn>
825
826         [BlackBerry] Upstream the BlackBerry change to platform/graphics/FloatSize.h
827         https://bugs.webkit.org/show_bug.cgi?id=79893
828
829         Reviewed by Antonio Gomes.
830
831         Add conversion convenience between WebCore::FloatSize and BlackBerry::Platform::FloatSize.
832
833         The porting can't be built yet, no new tests.
834
835         * platform/graphics/FloatSize.h:
836         (Platform):
837         (FloatSize):
838
839 2012-02-29  Leo Yang  <leo.yang@torchmobile.com.cn>
840
841         [BlackBerry] Upstream the BlackBerry change to platform/graphics/FloatRect.h
842         https://bugs.webkit.org/show_bug.cgi?id=79891
843
844         Reviewed by Antonio Gomes.
845
846         Add conversion convenience between WebCore::FloatRect and BlackBerry::Platform::FloatRect.
847
848         The porting can't be built yet, no new tests.
849
850         * platform/graphics/FloatRect.h:
851         (Platform):
852         (FloatRect):
853
854 2012-02-29  Tim Horton  <timothy_horton@apple.com>
855
856         Make use of CG rounded-rect primitives
857         https://bugs.webkit.org/show_bug.cgi?id=79932
858         <rdar://problem/9274953>
859
860         Reviewed by Simon Fraser.
861
862         Dispatch to potentially platform-specific rounded rectangle path
863         construction from addPathForRoundedRect. Make use of this to call
864         wkCGPathAddRoundedRect on Lion and above, as long as the rounded
865         corners are all equivalent.
866
867         No new tests, as this is covered by many that use rounded corners,
868         and is only a performance improvement.
869
870         * WebCore.exp.in:
871         * platform/graphics/Path.cpp:
872         (WebCore::Path::addRoundedRect):
873         (WebCore):
874         (WebCore::Path::addPathForRoundedRect):
875         * platform/graphics/Path.h:
876         (Path):
877         * platform/graphics/cg/PathCG.cpp:
878         (WebCore::Path::addPathForRoundedRect):
879         (WebCore):
880         * platform/mac/WebCoreSystemInterface.h:
881         * platform/mac/WebCoreSystemInterface.mm:
882
883 2012-02-29  Leo Yang  <leo.yang@torchmobile.com.cn>
884
885         [BlackBerry] Upstream the BlackBerry change to platform/graphics/FloatPoint.h
886         https://bugs.webkit.org/show_bug.cgi?id=79887
887
888         Reviewed by Antonio Gomes.
889
890         Add conversion convenience between WebCore::FloatPoint and BlackBerry::Platform::FloatPoint.
891
892         The porting can't be built yet, no new tests.
893
894         * platform/graphics/FloatPoint.h:
895         (Platform):
896         (FloatPoint):
897
898 2012-02-29  Kaustubh Atrawalkar  <kaustubh@motorola.com>
899
900         ShadowRoot need innerHTML
901         https://bugs.webkit.org/show_bug.cgi?id=78473
902
903         Reviewed by Hajime Morita.
904
905         Refactor code for sharing common code between HTMLElement & ShadowRoot.
906         Implement innerHTML attribute for ShadowRoot.
907
908         Test: fast/dom/shadow/shadow-root-innerHTML.html
909
910         * dom/ShadowRoot.cpp:
911         (WebCore::ShadowRoot::cloneNode):
912         (WebCore):
913         (WebCore::ShadowRoot::innerHTML):
914         (WebCore::ShadowRoot::setInnerHTML):
915         * dom/ShadowRoot.h:
916         (ShadowRoot):
917         * dom/ShadowRoot.idl:
918         * editing/markup.cpp:
919         (WebCore::urlToMarkup):
920         (WebCore):
921         (WebCore::createFragmentFromSource):
922         (WebCore::hasOneChild):
923         (WebCore::hasOneTextChild):
924         (WebCore::replaceChildrenWithFragment):
925         (WebCore::replaceChildrenWithText):
926         * editing/markup.h:
927         * html/HTMLElement.cpp:
928         (WebCore):
929
930 2012-02-29  Julien Chaffraix  <jchaffraix@webkit.org>
931
932         Stop doubling maximalOutlineSize during painting
933         https://bugs.webkit.org/show_bug.cgi?id=79724
934
935         Reviewed by Tony Chang.
936
937         Refactoring only, covered by existing tests (mostly repaint ones).
938
939         * rendering/RenderReplaced.cpp:
940         (WebCore::RenderReplaced::shouldPaint):
941         * rendering/RenderTableCell.cpp:
942         (WebCore::RenderTableCell::paintCollapsedBorders):
943         Introduce a local repaint rectangle that we inflate by the maximalOutlineSize
944         to simplify the comparison logic. Also tried to make it clearer what's going on
945         by tweaking the existing code.
946
947         * rendering/RenderTableSection.cpp:
948         (WebCore::RenderTableSection::paintObject):
949         Remove the doubling.
950
951 2012-02-29  Ken Buchanan  <kenrb@chromium.org>
952
953         Crash when changing list marker locations
954         https://bugs.webkit.org/show_bug.cgi?id=79681
955
956         Reviewed by David Hyatt.
957
958         This fixes a regression crash from r108548.
959
960         There are some conditions where removing the anonymous block
961         parent at that point can cause problems. One is when there is
962         a continuation from it, and another when it is a sibling of
963         lineBoxParent and it causes lineBoxParent to be deleted
964         incidentally. This patch delays the destruction until after
965         lineBoxParent has been used and makes an exception for
966         continuations.
967
968         * rendering/RenderListItem.cpp:
969         (WebCore::RenderListItem::updateMarkerLocation)
970
971 2012-02-29  Max Feil  <mfeil@rim.com>
972
973         [BlackBerry] Add support for FLAC audio and OGG/Vorbis audio
974         https://bugs.webkit.org/show_bug.cgi?id=79519
975
976         Reviewed by Antonio Gomes.
977
978         A layout test already exists for OGG. We do not support OGG
979         video at this time, only audio.
980
981         Test: media/media-can-play-flac-audio.html
982
983         * platform/blackberry/MIMETypeRegistryBlackBerry.cpp:
984         (WebCore):
985
986 2012-02-28  Beth Dakin  <bdakin@apple.com>
987
988         https://bugs.webkit.org/show_bug.cgi?id=79868
989         Overlay scrollbars should respond to AppKit's NSEventPhaseMayBegin
990         -and corresponding-
991         <rdar://problem/10688637>
992
993         Reviewed by Anders Carlsson.
994
995         Scrollbars are currently drawn on the main thread even when scrolling happens 
996         on the scrolling thread, so we have to call back to the main thread for the 
997         time being to make the right drawing calls for NSEventPhaseMayBegin.
998         * page/scrolling/ScrollingCoordinator.cpp:
999         (WebCore::ScrollingCoordinator::handleWheelEventPhase):
1000         (WebCore):
1001         * page/scrolling/ScrollingCoordinator.h:
1002         (ScrollingCoordinator):
1003         * page/scrolling/ScrollingTree.cpp:
1004         (WebCore::ScrollingTree::handleWheelEventPhase):
1005         (WebCore):
1006         * page/scrolling/ScrollingTree.h:
1007         * page/scrolling/mac/ScrollingTreeNodeMac.mm:
1008         (WebCore::ScrollingTreeNodeMac::handleWheelEvent):
1009         * platform/ScrollAnimator.h:
1010         (WebCore::ScrollAnimator::handleWheelEventPhase):
1011         (ScrollAnimator):
1012
1013         Call into AppKit on NSEventPhaseMayBegin.
1014         * platform/mac/ScrollAnimatorMac.h:
1015         (ScrollAnimatorMac):
1016         * platform/mac/ScrollAnimatorMac.mm:
1017         (WebCore::ScrollAnimatorMac::mayBeginScrollGesture):
1018         (WebCore):
1019         (WebCore::ScrollAnimatorMac::handleWheelEventPhase):
1020         (WebCore::ScrollAnimatorMac::handleWheelEvent):
1021
1022 2012-02-28  Jer Noble  <jer.noble@apple.com>
1023
1024         Full screen video volume slider has "progress bar"
1025         https://bugs.webkit.org/show_bug.cgi?id=79812
1026
1027         Reviewed by Eric Carlson.
1028
1029         No new tests; strictly a platform-specific look-and-feel change.
1030
1031         The full-screen volume slider has a "media-slider"" appearance, which is rendering as if
1032         the volume slider has a "progress".  Make a concrete "media-fullscreen-volume-slider" appearance
1033         which has the correct look-and-feel.
1034
1035         Add two new appearance keywords, media-fullscreen-volume-slider and thumb, and their associated
1036         types and CSS keywords:
1037         * css/CSSValueKeywords.in:
1038         * css/CSSPrimitiveValueMappings.h:
1039         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1040         * html/shadow/MediaControlElements.h:
1041         * platform/ThemeTypes.h:
1042
1043         Handle the new slider and thumb types when rendering:
1044         * rendering/RenderMediaControls.cpp:
1045         (WebCore::RenderMediaControls::adjustMediaSliderThumbSize):
1046         (WebCore::RenderMediaControls::paintMediaControlsPart):
1047         * rendering/RenderTheme.cpp:
1048         (WebCore::RenderTheme::adjustStyle):
1049         (WebCore::RenderTheme::paint):
1050         * rendering/RenderTheme.h:
1051         (WebCore::RenderTheme::paintMediaFullScreenVolumeSliderTrack):
1052         (WebCore::RenderTheme::paintMediaFullScreenVolumeSliderThumb):
1053         * rendering/RenderThemeMac.h:
1054         (RenderThemeMac):
1055         * rendering/RenderThemeMac.mm:
1056         (WebCore::RenderThemeMac::adjustMediaSliderThumbSize):
1057         (WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderTrack):
1058         (WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderThumb):
1059         * rendering/RenderMediaControlsChromium.cpp:
1060         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
1061
1062         * accessibility/AccessibilitySlider.cpp:
1063         (WebCore::AccessibilitySlider::orientation): Mark the fullscreen volume slider as horizontal.
1064         * html/shadow/SliderThumbElement.cpp:
1065         (WebCore::RenderSliderThumb::updateAppearance): Give MediaFullScreenVolumeSliderParts 
1066             MediaFullScreenVolumeSliderThumbParts.
1067         * css/fullscreenQuickTime.css: Change the styles for the fullscreen slider, min, and max buttons.
1068         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-volume-min-button):
1069         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-volume-slider):
1070         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-volume-max-button):
1071         * html/shadow/MediaControlRootElement.cpp:
1072         (WebCore::MediaControlRootElement::reset): Set the value of the fullscreen volume slider
1073             when resetting.
1074
1075 2012-02-29  Antti Koivisto  <antti@apple.com>
1076
1077         Applying region style should not need to access parent rules
1078         https://bugs.webkit.org/show_bug.cgi?id=79910 
1079          
1080         Reviewed by Andreas Kling.
1081
1082         Currently CSSStyleSelector::applyProperties looks into parent rules to see if a rule is
1083         part of region style. The plan is to eliminate the rule parent pointer so this needs to be refactored.
1084         
1085         Add a bit to RuleData to indicate if the StyleRule is part of a region style.
1086
1087         * css/CSSStyleSelector.cpp:
1088         (RuleData):
1089         (WebCore::RuleData::isInRegionRule):
1090         (RuleSet):
1091         (WebCore::CSSStyleSelector::addMatchedProperties):
1092         (WebCore::CSSStyleSelector::sortAndTransferMatchedRules):
1093         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1094         * css/CSSStyleSelector.h:
1095         (CSSStyleSelector):
1096
1097 2012-02-27  Vsevolod Vlasov  <vsevik@chromium.org>
1098
1099         Web Inspector: [InspectorIndexedDB] Add refresh to IndexedDB support.
1100         https://bugs.webkit.org/show_bug.cgi?id=79695
1101
1102         Reviewed by Pavel Feldman.
1103
1104         * inspector/front-end/IndexedDBViews.js:
1105         (WebInspector.IDBDataView):
1106         (WebInspector.IDBDataView.prototype._refreshButtonClicked):
1107         (WebInspector.IDBDataView.prototype.get statusBarItems):
1108         * inspector/front-end/ResourcesPanel.js:
1109         (WebInspector.IndexedDBTreeElement):
1110         (WebInspector.IndexedDBTreeElement.prototype.onattach):
1111         (WebInspector.IndexedDBTreeElement.prototype._handleContextMenuEvent):
1112         (WebInspector.IDBDatabaseTreeElement.prototype.onattach):
1113         (WebInspector.IDBDatabaseTreeElement.prototype._handleContextMenuEvent):
1114         (WebInspector.IDBDatabaseTreeElement.prototype._refreshIndexedDB):
1115
1116 2012-02-29  Andrey Kosyakov  <caseq@chromium.org>
1117
1118         Web Inspector: timeline markers are not shown on the timeline panel
1119         https://bugs.webkit.org/show_bug.cgi?id=79921
1120
1121         Reviewed by Pavel Feldman.
1122
1123         * inspector/front-end/TimelinePanel.js:
1124         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline.addTimestampRecords):
1125         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
1126
1127 2012-02-29  Kenichi Ishibashi  <bashi@chromium.org>
1128
1129         Align InlineBox::m_expansion to a byte boundary
1130         https://bugs.webkit.org/show_bug.cgi?id=79761
1131
1132         Add a bit to m_expansion to align a byte boundary.
1133         This will make valgrind memcheck happy.
1134         I confirmed sizeof(InlineBox) is unchanged.
1135
1136         Reviewed by Hajime Morita.
1137
1138         No new tests. No behavior changes.
1139
1140         * rendering/InlineBox.h:
1141         (InlineBox): Aligned m_expansion to a byte boundary.
1142
1143 2012-02-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1144
1145         Do not iterate all tiles for resizing when the content didn't change
1146         https://bugs.webkit.org/show_bug.cgi?id=79787
1147
1148         Reviewed by Simon Hausmann.
1149
1150         * platform/graphics/TiledBackingStore.cpp:
1151         (WebCore::TiledBackingStore::createTiles):
1152
1153 2012-02-29  Parag Radke  <parag@motorola.com>
1154
1155         Crash in WebCore::CompositeEditCommand::insertNodeAt
1156         https://bugs.webkit.org/show_bug.cgi?id=67764
1157
1158         Reviewed by Ryosuke Niwa.
1159
1160         If caret position after deletion and destination position coincides then
1161         removing the node will result in removing the destination node also. Hence crash.
1162
1163         Test: editing/deleting/delete-block-merge-contents-025.html
1164
1165         * editing/CompositeEditCommand.cpp:
1166         (WebCore::CompositeEditCommand::cleanupAfterDeletion):
1167         If the caret position after delete and the destination position
1168         renderes at the same place, pruning the node and making an early exit.
1169
1170 2012-02-29  Pavel Feldman  <pfeldman@google.com>
1171
1172         Web Inspector: remove calculator's updateBoundaries in the timeline panel.
1173         https://bugs.webkit.org/show_bug.cgi?id=79907
1174
1175         Reviewed by Yury Semikhatsky.
1176
1177         * inspector/front-end/NetworkPanel.js:
1178         (WebInspector.NetworkBaseCalculator.prototype.computeBarGraphLabels):
1179         (WebInspector.NetworkBaseCalculator.prototype.formatTime):
1180         (WebInspector.NetworkTimeCalculator.prototype.computeBarGraphLabels):
1181         (WebInspector.NetworkTimeCalculator.prototype.formatTime):
1182         (WebInspector.NetworkTransferTimeCalculator.prototype.formatTime):
1183         (WebInspector.NetworkTransferDurationCalculator.prototype.formatTime):
1184         * inspector/front-end/TimelineGrid.js:
1185         (WebInspector.TimelineGrid.prototype.updateDividers):
1186         * inspector/front-end/TimelineOverviewPane.js:
1187         (WebInspector.TimelineOverviewCalculator.prototype.formatTime):
1188         (WebInspector.TimelineStartAtZeroOverview):
1189         (WebInspector.TimelineStartAtZeroOverview.prototype.update):
1190         * inspector/front-end/TimelinePanel.js:
1191         (WebInspector.TimelinePanel):
1192         (WebInspector.TimelinePanel.prototype._toggleStartAtZeroButtonClicked):
1193         (WebInspector.TimelinePanel.prototype._refresh):
1194         (WebInspector.TimelinePanel.prototype._refreshRecords):
1195         (WebInspector.TimelinePanel.prototype.get timelinePaddingLeft):
1196         (WebInspector.TimelineCalculator):
1197         (WebInspector.TimelineCalculator.prototype.setWindow):
1198         (WebInspector.TimelineCalculator.prototype.setRecords):
1199         (WebInspector.TimelineCalculator.prototype.formatTime):
1200         (WebInspector.TimelineFitInWindowCalculator):
1201         (WebInspector.TimelineFitInWindowCalculator.prototype.setWindow):
1202         (WebInspector.TimelineFitInWindowCalculator.prototype.setRecords):
1203         * inspector/front-end/TimelinePresentationModel.js:
1204         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
1205
1206 2012-02-29  Yury Semikhatsky  <yurys@chromium.org>
1207
1208         Web Inspector: enable Profiles panel for workers
1209         https://bugs.webkit.org/show_bug.cgi?id=79908
1210
1211         Introduced worker profiler agent. Enabled script profiling for
1212         workers.
1213
1214         Reviewed by Pavel Feldman.
1215
1216         * bindings/js/ScriptProfiler.cpp:
1217         (WebCore::ScriptProfiler::startForPage):
1218         (WebCore):
1219         (WebCore::ScriptProfiler::startForWorkerContext):
1220         (WebCore::ScriptProfiler::stopForPage):
1221         (WebCore::ScriptProfiler::stopForWorkerContext):
1222         * bindings/js/ScriptProfiler.h:
1223         (WebCore):
1224         (ScriptProfiler):
1225         * bindings/v8/ScriptProfiler.cpp:
1226         (WebCore::ScriptProfiler::startForPage):
1227         (WebCore):
1228         (WebCore::ScriptProfiler::startForWorkerContext):
1229         (WebCore::ScriptProfiler::stopForPage):
1230         (WebCore::ScriptProfiler::stopForWorkerContext):
1231         * bindings/v8/ScriptProfiler.h:
1232         (WebCore):
1233         (ScriptProfiler):
1234         * inspector/InspectorProfilerAgent.cpp:
1235         (WebCore):
1236         (PageProfilerAgent):
1237         (WebCore::PageProfilerAgent::PageProfilerAgent):
1238         (WebCore::PageProfilerAgent::~PageProfilerAgent):
1239         (WebCore::PageProfilerAgent::startProfiling):
1240         (WebCore::PageProfilerAgent::stopProfiling):
1241         (WebCore::InspectorProfilerAgent::create):
1242         (WorkerProfilerAgent):
1243         (WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
1244         (WebCore::WorkerProfilerAgent::~WorkerProfilerAgent):
1245         (WebCore::WorkerProfilerAgent::startProfiling):
1246         (WebCore::WorkerProfilerAgent::stopProfiling):
1247         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
1248         (WebCore::InspectorProfilerAgent::start):
1249         (WebCore::InspectorProfilerAgent::stop):
1250         * inspector/InspectorProfilerAgent.h:
1251         (WebCore):
1252         (InspectorProfilerAgent):
1253         * inspector/WorkerInspectorController.cpp:
1254         (WebCore::WorkerInspectorController::WorkerInspectorController):
1255         (WebCore::WorkerInspectorController::connectFrontend):
1256         (WebCore::WorkerInspectorController::disconnectFrontend):
1257         (WebCore::WorkerInspectorController::restoreInspectorStateFromCookie):
1258         * inspector/WorkerInspectorController.h:
1259         (WebCore):
1260         (WorkerInspectorController):
1261         * inspector/front-end/ProfilesPanel.js:
1262         * inspector/front-end/inspector.js:
1263         (WebInspector._createPanels):
1264
1265 2012-02-29  Alexander Pavlov  <apavlov@chromium.org>
1266
1267         Web Inspector: Clicking relative links fails when query string contains a slash
1268         https://bugs.webkit.org/show_bug.cgi?id=79905
1269
1270         Reviewed by Vsevolod Vlasov.
1271
1272         * inspector/front-end/ResourceUtils.js:
1273         (WebInspector.completeURL):
1274
1275 2012-02-29  Pavel Feldman  <pfeldman@google.com>
1276
1277         Web Inspector: Ctrl R should reload page from the console panel as well.
1278         https://bugs.webkit.org/show_bug.cgi?id=79883
1279
1280         Reviewed by Vsevolod Vlasov.
1281
1282         * inspector/front-end/inspector.js:
1283         (WebInspector.documentKeyDown):
1284
1285 2012-02-28  Pavel Podivilov  <podivilov@chromium.org>
1286
1287         Extended attributes list should go before 'static' and 'const' modifiers in IDLs.
1288         https://bugs.webkit.org/show_bug.cgi?id=79807
1289
1290         Reviewed by Kentaro Hara.
1291
1292         No new tests. Generated code isn't changed.
1293
1294         * bindings/scripts/IDLParser.pm:
1295         (ParseInterface):
1296         * bindings/scripts/IDLStructure.pm:
1297         * bindings/scripts/test/TestObj.idl:
1298         * bindings/scripts/test/TestSupplemental.idl:
1299         * html/DOMURL.idl:
1300         * html/HTMLMediaElement.idl:
1301         * html/HTMLTrackElement.idl:
1302
1303 2012-02-28  Yury Semikhatsky  <yurys@chromium.org>
1304
1305         Web Inspector: move DOM counter graphs out of experimental
1306         https://bugs.webkit.org/show_bug.cgi?id=79802
1307
1308         Enable DOM counter graphs by default.
1309
1310         Reveal nearest record from the left hand side when there is no
1311         record containing the point where the user clicked.
1312
1313         Reviewed by Pavel Feldman.
1314
1315         * inspector/front-end/Settings.js:
1316         (WebInspector.ExperimentsSettings):
1317         * inspector/front-end/TimelinePanel.js:
1318         (WebInspector.TimelinePanel):
1319         (WebInspector.TimelinePanel.prototype._endSplitterDragging):
1320         (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded):
1321         (WebInspector.TimelinePanel.prototype.sidebarResized):
1322         (WebInspector.TimelinePanel.prototype._resetPanel):
1323         (WebInspector.TimelinePanel.prototype._refresh):
1324         (WebInspector.TimelinePanel.prototype.revealRecordAt):
1325
1326 2012-02-28  MORITA Hajime  <morrita@google.com>
1327
1328         [Refactoring] Shadow related attach paths should be in ShadowTree.
1329         https://bugs.webkit.org/show_bug.cgi?id=79854
1330
1331         Reviewed by Ryosuke Niwa.
1332
1333         No new tests. No behavior change.
1334
1335         This change introduces ShadowTree::attachHost() and ShadowTree::detachHost()
1336         and moves shadow-enabled attachment code from Element to ShadowRoot.
1337         This also factored out small ContainerNode method to use it from ShadowTree.
1338
1339         Even after this change, the traveral order in ShadowTree
1340         attachment has some unclear part. Coming changes will clarify
1341         these. This change is aimed to be purely textural.
1342
1343         * dom/ContainerNode.cpp:
1344         (WebCore::ContainerNode::attach):
1345         (WebCore::ContainerNode::detach):
1346         * dom/ContainerNode.h:
1347         (ContainerNode):
1348         (WebCore::ContainerNode::attachAsNode): Added.
1349         (WebCore::ContainerNode::attachChildren): Added.
1350         (WebCore::ContainerNode::attachChildrenIfNeeded): Added.
1351         (WebCore::ContainerNode::attachChildrenLazily): Added.
1352         (WebCore::ContainerNode::detachAsNode): Added.
1353         (WebCore::ContainerNode::detachChildrenIfNeeded): Added.
1354         (WebCore::ContainerNode::detachChildren): Added.
1355         * dom/Element.cpp:
1356         (WebCore::Element::attach):
1357         (WebCore::Element::detach):
1358         * dom/ShadowTree.cpp:
1359         (WebCore::ShadowTree::addShadowRoot):
1360         (WebCore::ShadowTree::removeAllShadowRoots):
1361         (WebCore::ShadowTree::detachHost):
1362         (WebCore):
1363         (WebCore::ShadowTree::attachHost):
1364         (WebCore::ShadowTree::reattachHostChildrenAndShadow):
1365         * dom/ShadowTree.h:
1366         (ShadowTree):
1367
1368 2012-02-28  Arko Saha  <arko@motorola.com>
1369
1370         Microdata: Implement HTMLPropertiesCollection collection.namedItem().
1371         https://bugs.webkit.org/show_bug.cgi?id=73156
1372
1373         Reviewed by Kentaro Hara.
1374
1375         Tests: fast/dom/MicroData/nameditem-must-be-case-sensitive.html
1376                fast/dom/MicroData/nameditem-must-return-correct-item-properties.html
1377                fast/dom/MicroData/properties-collection-nameditem-test.html
1378
1379         * bindings/scripts/CodeGeneratorJS.pm: Modified code generator to generate
1380         JS bindings code for HTMLPropertiesCollection [NamedGetter] property.
1381         (GenerateImplementation):
1382         * html/HTMLPropertiesCollection.cpp:
1383         (WebCore::HTMLPropertiesCollection::names):
1384         (WebCore):
1385         (WebCore::HTMLPropertiesCollection::namedItem): Returns a NodeList object
1386         containing any elements that add a property named name.
1387         (WebCore::HTMLPropertiesCollection::hasNamedItem): Checks if the items can
1388         be retrieved or not based on the property named name.
1389         * html/HTMLPropertiesCollection.h: Added namedItem(), hasProperty(),
1390         hasNamedItem() methods.
1391         (HTMLPropertiesCollection):
1392         * html/HTMLPropertiesCollection.idl: Added namedItem() IDL method.
1393
1394 2012-02-28  Kinuko Yasuda  <kinuko@chromium.org>
1395
1396         Add size field to Metadata in FileSystem API
1397         https://bugs.webkit.org/show_bug.cgi?id=79813
1398
1399         Reviewed by David Levin.
1400
1401         Test: fast/filesystem/op-get-metadata.html
1402
1403         * fileapi/FileSystemCallbacks.cpp:
1404         (WebCore::MetadataCallbacks::didReadMetadata):
1405         * fileapi/Metadata.h:
1406         (WebCore::Metadata::create):
1407         (WebCore::Metadata::modificationTime):
1408         (WebCore::Metadata::size): Added.
1409         (WebCore::Metadata::Metadata):
1410         * fileapi/Metadata.idl:
1411
1412 2012-02-28  Dmitry Lomov  <dslomov@google.com>
1413
1414         [JSC] Implement ArrayBuffer transfer
1415         https://bugs.webkit.org/show_bug.cgi?id=73493.
1416         Implement ArrayBuffer transfer, per Khronos spec:  http://www.khronos.org/registry/typedarray/specs/latest/#9.
1417         This brings parity with V8 implementation of transferable typed arrays.
1418
1419         Reviewed by Oliver Hunt.
1420
1421         Covered by existing tests.
1422
1423         * bindings/js/JSDOMWindowCustom.cpp:
1424         (WebCore::handlePostMessage):
1425         * bindings/js/JSDictionary.cpp:
1426         (WebCore::JSDictionary::convertValue):
1427         * bindings/js/JSHistoryCustom.cpp:
1428         (WebCore::JSHistory::pushState):
1429         (WebCore::JSHistory::replaceState):
1430         * bindings/js/JSMessageEventCustom.cpp:
1431         (WebCore::handleInitMessageEvent):
1432         * bindings/js/JSMessagePortCustom.cpp:
1433         (WebCore::fillMessagePortArray):
1434         * bindings/js/JSMessagePortCustom.h:
1435         (WebCore):
1436         (WebCore::handlePostMessage):
1437         * bindings/js/ScriptValue.cpp:
1438         (WebCore::ScriptValue::serialize):
1439         * bindings/js/SerializedScriptValue.cpp:
1440         (WebCore):
1441         (WebCore::CloneSerializer::serialize):
1442         (CloneSerializer):
1443         (WebCore::CloneSerializer::CloneSerializer):
1444         (WebCore::CloneSerializer::fillTransferMap):
1445         (WebCore::CloneSerializer::dumpArrayBufferView):
1446         (WebCore::CloneSerializer::dumpIfTerminal):
1447         (WebCore::CloneDeserializer::deserialize):
1448         (WebCore::CloneDeserializer::CloneDeserializer):
1449         (WebCore::CloneDeserializer::readTerminal):
1450         (CloneDeserializer):
1451         (WebCore::SerializedScriptValue::SerializedScriptValue):
1452         (WebCore::SerializedScriptValue::transferArrayBuffers):
1453         (WebCore::SerializedScriptValue::create):
1454         (WebCore::SerializedScriptValue::deserialize):
1455         * bindings/js/SerializedScriptValue.h:
1456         (WebCore):
1457         (SerializedScriptValue):
1458
1459 2012-02-28  Kevin Ollivier  <kevino@theolliviers.com>
1460
1461         [wx] Unreviewed. Build fixes after recent bindings changes.
1462
1463         * bindings/scripts/CodeGeneratorCPP.pm: 
1464         (ShouldSkipType):
1465         * testing/Internals.idl:
1466
1467 2012-02-28  Yoshifumi Inoue  <yosin@chromium.org>
1468
1469         [Forms] Spin button sometimes ignores Indeterminate of m_upDownState
1470         https://bugs.webkit.org/show_bug.cgi?id=79754
1471
1472         Reviewed by Kent Tamura.
1473
1474         This patch checks enum value Indeterminate before using m_upDownState. This make
1475         sure Indeterminate state doesn't act like Down state.
1476
1477         m_upDownState can be Indeterminate at mousedown event if mouse pointer is on
1478         spin button when it is displayed.
1479
1480         Test: fast/forms/number/spin-button-state.html
1481
1482         * html/shadow/TextControlInnerElements.cpp:
1483         (WebCore::SpinButtonElement::defaultEventHandler):
1484         (WebCore::SpinButtonElement::repeatingTimerFired):
1485
1486 2012-02-27  MORITA Hajime  <morrita@google.com>
1487
1488         [Refactoring] RenderSummary and RenderDetail is no longer needed.
1489         https://bugs.webkit.org/show_bug.cgi?id=79641
1490
1491         Reviewed by Kent Tamura.
1492
1493         Removed RenderDetails and RenderSummary because its only
1494         modification they had is already handled by RenderBlock::styleWillChange().
1495         These are just a historical artifact. We could have removed these
1496         classes when they were switched to shadow-based implementations.
1497
1498         Tests: fast/html/details-inline-expected.html
1499                fast/html/details-inline.html
1500
1501         * CMakeLists.txt:
1502         * GNUmakefile.list.am:
1503         * Target.pri:
1504         * WebCore.gypi:
1505         * WebCore.vcproj/WebCore.vcproj:
1506         * WebCore.xcodeproj/project.pbxproj:
1507         * html/HTMLDetailsElement.cpp:
1508         (WebCore::HTMLDetailsElement::createRenderer):
1509         * html/HTMLSummaryElement.cpp:
1510         (WebCore::HTMLSummaryElement::createRenderer):
1511         (WebCore::HTMLSummaryElement::defaultEventHandler):
1512         * rendering/RenderDetails.cpp: Removed.
1513         * rendering/RenderDetails.h: Removed.
1514         * rendering/RenderDetailsMarker.cpp:
1515         (WebCore::RenderDetailsMarker::isOpen):
1516         * rendering/RenderDetailsMarker.h:
1517         (RenderDetailsMarker):
1518         * rendering/RenderObject.h:
1519         (RenderObject):
1520         * rendering/RenderSummary.cpp: Removed.
1521         * rendering/RenderSummary.h: Removed.
1522         * rendering/RenderingAllInOne.cpp:
1523
1524 2012-02-28  Simon Fraser  <simon.fraser@apple.com>
1525
1526         Optimize the rects being drawn into compositing layers
1527         https://bugs.webkit.org/show_bug.cgi?id=79852
1528
1529         Reviewed by Dan Bernstein.
1530
1531         Use the newly added WebKitSystemInterface method
1532         to limit the area being painted in a CALayer
1533         -drawInContext callback. This avoids redundant drawing,
1534         for performance.
1535
1536         * platform/graphics/mac/WebLayer.mm:
1537         (drawLayerContents):
1538
1539 2012-02-28  Simon Fraser  <simon.fraser@apple.com>
1540
1541         Fix the SnowLeopard build.
1542
1543         * WebCore.exp.in:
1544
1545 2012-02-28  Anders Carlsson  <andersca@apple.com>
1546
1547         With tiled drawing enabled, pressing Down arrow after scrolling via mouse gesture causes page to jump back up to top
1548         https://bugs.webkit.org/show_bug.cgi?id=79249
1549         <rdar://problem/10866273>
1550
1551         Reviewed by Sam Weinig.
1552
1553         ScrollableArea::notifyScrollPositionChanged must make sure that the scroll animator position is kept up to date.
1554
1555         * platform/ScrollAnimator.cpp:
1556         (WebCore::ScrollAnimator::setCurrentPosition):
1557         (WebCore):
1558         * platform/ScrollAnimator.h:
1559         (ScrollAnimator):
1560         * platform/ScrollableArea.cpp:
1561         (WebCore::ScrollableArea::notifyScrollPositionChanged):
1562
1563 2012-02-28  Daniel Cheng  <dcheng@chromium.org>
1564
1565         Unreviewed, rolling out r107894.
1566         http://trac.webkit.org/changeset/107894
1567         https://bugs.webkit.org/show_bug.cgi?id=30416
1568
1569         dataTransfer.types should be an Array since DOMStringList is deprecated.
1570
1571         * bindings/js/JSClipboardCustom.cpp:
1572         (WebCore::JSClipboard::types):
1573         (WebCore):
1574         * bindings/v8/custom/V8ClipboardCustom.cpp:
1575         (WebCore::V8Clipboard::typesAccessorGetter):
1576         (WebCore):
1577         * dom/Clipboard.cpp:
1578         (WebCore::Clipboard::hasStringOfType):
1579         * dom/Clipboard.h:
1580         (Clipboard):
1581         * dom/Clipboard.idl:
1582         * platform/blackberry/ClipboardBlackBerry.cpp:
1583         (WebCore::ClipboardBlackBerry::types):
1584         * platform/blackberry/ClipboardBlackBerry.h:
1585         (ClipboardBlackBerry):
1586         * platform/chromium/ChromiumDataObject.cpp:
1587         (WebCore::ChromiumDataObject::types):
1588         * platform/chromium/ChromiumDataObject.h:
1589         (ChromiumDataObject):
1590         * platform/chromium/ClipboardChromium.cpp:
1591         (WebCore::ClipboardChromium::types):
1592         (WebCore::ClipboardChromium::mayUpdateItems):
1593         * platform/chromium/ClipboardChromium.h:
1594         (ClipboardChromium):
1595         * platform/chromium/DragDataChromium.cpp:
1596         (WebCore::containsHTML):
1597         (WebCore::DragData::containsURL):
1598         (WebCore::DragData::asURL):
1599         (WebCore::DragData::containsPlainText):
1600         (WebCore::DragData::canSmartReplace):
1601         (WebCore::DragData::asFragment):
1602         * platform/efl/ClipboardEfl.cpp:
1603         (WebCore::ClipboardEfl::types):
1604         * platform/efl/ClipboardEfl.h:
1605         (ClipboardEfl):
1606         * platform/gtk/ClipboardGtk.cpp:
1607         (WebCore::ClipboardGtk::types):
1608         * platform/gtk/ClipboardGtk.h:
1609         (ClipboardGtk):
1610         * platform/mac/ClipboardMac.h:
1611         (ClipboardMac):
1612         * platform/mac/ClipboardMac.mm:
1613         (WebCore::addHTMLClipboardTypesForCocoaType):
1614         (WebCore::ClipboardMac::types):
1615         * platform/qt/ClipboardQt.cpp:
1616         (WebCore::ClipboardQt::types):
1617         * platform/qt/ClipboardQt.h:
1618         (ClipboardQt):
1619         * platform/win/ClipboardWin.cpp:
1620         (WebCore::addMimeTypesForFormat):
1621         (WebCore::ClipboardWin::types):
1622         * platform/win/ClipboardWin.h:
1623         (ClipboardWin):
1624         * platform/wx/ClipboardWx.cpp:
1625         (WebCore::ClipboardWx::types):
1626         * platform/wx/ClipboardWx.h:
1627         (ClipboardWx):
1628
1629 2012-02-28  Simon Fraser  <simon.fraser@apple.com>
1630
1631         Update WebKitSystemInterface.
1632
1633         Reviewed by Sam Weinig.
1634
1635         * WebCore.exp.in:
1636         (drawLayerContents):
1637         * platform/mac/WebCoreSystemInterface.h:
1638         * platform/mac/WebCoreSystemInterface.mm:
1639
1640 2012-02-27  MORITA Hajime  <morrita@google.com>
1641
1642         <content> element should behave as HTMLUnknownElement outside of a shadow DOM subtree
1643         https://bugs.webkit.org/show_bug.cgi?id=79551
1644
1645         Reviewed by Dimitri Glazkov.
1646
1647         The problem happened because HTMLContentElement doesn't create renderer anytime.
1648         
1649         This change allows it to create a renderer unless the HTMLContentElement is shadowed.
1650         Since this could happen not only on <content> but also on upcoming <shadow>,
1651         the corresponding part of the code is pulled up to InsertionPoint.
1652
1653         Tests: fast/dom/shadow/content-element-outside-shadow-style-expected.html
1654                fast/dom/shadow/content-element-outside-shadow-style.html
1655
1656         * dom/NodeRenderingContext.cpp:
1657         (WebCore::NodeRenderingContext::NodeRenderingContext):
1658         * dom/ShadowRoot.h:
1659         (WebCore):
1660         (WebCore::TreeScope::isShadowRoot):
1661         * dom/TreeScope.h:
1662         (TreeScope):
1663         * html/shadow/HTMLContentElement.h:
1664         * html/shadow/InsertionPoint.cpp:
1665         (WebCore::InsertionPoint::isShadowBoundary):
1666         (WebCore):
1667         * html/shadow/InsertionPoint.h:
1668         (InsertionPoint):
1669         (WebCore::isShadowBoundary):
1670         (WebCore):
1671
1672 2012-02-28  Daniel Cheng  <dcheng@chromium.org>
1673
1674         Clipboard::getData should return an empty string instead of undefined
1675         https://bugs.webkit.org/show_bug.cgi?id=79712
1676
1677         Reviewed by Tony Chang.
1678
1679         Per the spec, an empty string should be returned when there is no data for the given typestring.
1680
1681         Test: fast/events/dataTransfer-getData-returns-empty-string.html
1682
1683         * bindings/js/JSClipboardCustom.cpp:
1684         * bindings/v8/custom/V8ClipboardCustom.cpp:
1685         * dom/Clipboard.h:
1686         (Clipboard):
1687         * dom/Clipboard.idl:
1688         * platform/blackberry/ClipboardBlackBerry.cpp:
1689         (WebCore::ClipboardBlackBerry::getData):
1690         * platform/blackberry/ClipboardBlackBerry.h:
1691         (ClipboardBlackBerry):
1692         * platform/chromium/ClipboardChromium.cpp:
1693         (WebCore::ClipboardChromium::getData):
1694         * platform/chromium/ClipboardChromium.h:
1695         (ClipboardChromium):
1696         * platform/efl/ClipboardEfl.cpp:
1697         (WebCore::ClipboardEfl::getData):
1698         * platform/efl/ClipboardEfl.h:
1699         (ClipboardEfl):
1700         * platform/gtk/ClipboardGtk.cpp:
1701         (WebCore::ClipboardGtk::getData):
1702         * platform/gtk/ClipboardGtk.h:
1703         (ClipboardGtk):
1704         * platform/mac/ClipboardMac.h:
1705         (ClipboardMac):
1706         * platform/mac/ClipboardMac.mm:
1707         (WebCore::ClipboardMac::getData):
1708         * platform/qt/ClipboardQt.cpp:
1709         (WebCore::ClipboardQt::getData):
1710         * platform/qt/ClipboardQt.h:
1711         (ClipboardQt):
1712         * platform/win/ClipboardUtilitiesWin.cpp:
1713         (WebCore::getFullCFHTML):
1714         (WebCore::getURL):
1715         (WebCore::getPlainText):
1716         (WebCore::getTextHTML):
1717         (WebCore::getCFHTML):
1718         (WebCore::fragmentFromHTML):
1719         * platform/win/ClipboardUtilitiesWin.h:
1720         (WebCore):
1721         * platform/win/ClipboardWin.cpp:
1722         (WebCore::ClipboardWin::getData):
1723         * platform/win/ClipboardWin.h:
1724         (ClipboardWin):
1725         * platform/wx/ClipboardWx.cpp:
1726         (WebCore::ClipboardWx::getData):
1727         * platform/wx/ClipboardWx.h:
1728         (ClipboardWx):
1729
1730 2012-02-28  Kenichi Ishibashi  <bashi@chromium.org>
1731
1732         [Chromium] Uninitialized value in LocaleToScriptCodeForFontSelection
1733         https://bugs.webkit.org/show_bug.cgi?id=79779
1734
1735         Set USCRIPT_COMMON to scriptCode as the initial value.
1736
1737         Reviewed by Kent Tamura.
1738
1739         No new tests. No behavior change.
1740
1741         * platform/text/LocaleToScriptMappingICU.cpp:
1742         (WebCore::localeToScriptCodeForFontSelection):
1743
1744 2012-02-28  Kenneth Russell  <kbr@google.com>
1745
1746         [chromium] Work around IOSurface-related corruption during readback
1747         https://bugs.webkit.org/show_bug.cgi?id=79735
1748
1749         Reviewed by James Robinson.
1750
1751         Copy the compositor's IOSurface-backed output into a temporary
1752         texture and perform the ReadPixels operation against that texture.
1753
1754         It is infeasible to write an automated test for this issue.
1755         Tested manually by performing print preview multiple times against
1756         pages containing WebGL content on 10.7 and observing that the
1757         corruption in the output is no longer present.
1758
1759         * platform/graphics/chromium/LayerRendererChromium.cpp:
1760         (WebCore::LayerRendererChromium::getFramebufferPixels):
1761
1762 2012-02-28  Adrienne Walker  <enne@google.com>
1763
1764         [chromium] Inform v8 about extra memory used for PatternSkia clamp mode
1765         https://bugs.webkit.org/show_bug.cgi?id=79846
1766
1767         Reviewed by James Robinson.
1768
1769         For large images, creating a non-repeating Pattern in Skia can
1770         allocate a lot of memory. Inform v8 about this so that it can
1771         potentially garbage collect any Pattern objects that aren't being used
1772         and that are holding onto large image copies.
1773
1774         * platform/graphics/Pattern.cpp:
1775         (WebCore::Pattern::Pattern):
1776         * platform/graphics/Pattern.h:
1777         (Pattern):
1778         * platform/graphics/skia/PatternSkia.cpp:
1779         (WebCore::Pattern::platformDestroy):
1780         (WebCore::Pattern::platformPattern):
1781
1782 2012-02-28  Jonathan Backer  <backer@chromium.org>
1783
1784         [chromium] Reset damage tracker on visibility change.
1785         https://bugs.webkit.org/show_bug.cgi?id=79267
1786
1787         Reviewed by James Robinson.
1788
1789         Unit tests: CCLayerTreeHostImplTest.cpp
1790
1791         * platform/graphics/chromium/LayerRendererChromium.cpp:
1792         (WebCore::LayerRendererChromium::setVisible):
1793
1794 2012-02-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1795
1796         Unreviewed, rolling out r108834.
1797         http://trac.webkit.org/changeset/108834
1798         https://bugs.webkit.org/show_bug.cgi?id=79840
1799
1800         Seems to cause a number of crashes under
1801         FrameView::doDeferredRepaints (Requested by jamesr__ on
1802         #webkit).
1803
1804         * svg/graphics/SVGImage.cpp:
1805         (WebCore::SVGImage::draw):
1806         * svg/graphics/SVGImage.h:
1807         * svg/graphics/SVGImageCache.cpp:
1808         (WebCore::SVGImageCache::imageContentChanged):
1809         (WebCore::SVGImageCache::redrawTimerFired):
1810         * svg/graphics/SVGImageCache.h:
1811         (SVGImageCache):
1812
1813 2012-02-29  Mario Sanchez Prada  <msanchez@igalia.com>
1814
1815         [GTK] Add support for nested event loops in RunLoop
1816         https://bugs.webkit.org/show_bug.cgi?id=79499
1817
1818         Reviewed by Martin Robinson.
1819
1820         Run a new nested mainloop if the main event loop is already
1821         running when calling to RunLoop::run(), and take care of stopping
1822         the right main loop too when RunLoop::stop() is invoked.
1823
1824         * platform/RunLoop.h:
1825         (RunLoop):
1826         * platform/gtk/RunLoopGtk.cpp:
1827         (WebCore::RunLoop::RunLoop):
1828         (WebCore::RunLoop::~RunLoop):
1829         (WebCore::RunLoop::run):
1830         (WebCore::RunLoop::innermostLoop):
1831         (WebCore::RunLoop::pushNestedMainLoop):
1832         (WebCore::RunLoop::popNestedMainLoop):
1833         (WebCore):
1834         (WebCore::RunLoop::stop):
1835
1836 2012-02-28  Julien Chaffraix  <jchaffraix@webkit.org>
1837
1838         Move RenderLayer::size() calls to a common function
1839         https://bugs.webkit.org/show_bug.cgi?id=76972
1840
1841         Reviewed by Simon Fraser.
1842
1843         Refactoring only.
1844
1845         This change introduces RenderBox::cachedSizeForOverflowClip() that handles all the cached size
1846         requests that currently goes through the RenderLayer. This indirection helps to decouple the need
1847         for a RenderLayer so that we can lazily allocate RenderLayers as part of bug 75568.
1848
1849         * rendering/RenderBox.cpp:
1850         (WebCore::RenderBox::cachedSizeForOverflowClip):
1851         Added this function to handle the calls to RenderLayer's size(). Unfortunately a lot of the
1852         code calls RenderLayer::size() directly so I could not make it private.
1853
1854         * rendering/LayoutState.cpp:
1855         (WebCore::LayoutState::LayoutState):
1856         * rendering/RenderBox.cpp:
1857         (WebCore::RenderBox::computeRectForRepaint):
1858         * rendering/RenderBox.h:
1859         (RenderBox):
1860         * rendering/RenderInline.cpp:
1861         (WebCore::RenderInline::clippedOverflowRectForRepaint):
1862         (WebCore::RenderInline::computeRectForRepaint):
1863         * rendering/RenderObject.cpp:
1864         (WebCore::RenderObject::computeRectForRepaint):
1865         Fixed the call sites above.
1866
1867 2012-02-28  Tim Dresser  <tdresser@chromium.org>
1868
1869         Provide DefaultDeviceScaleFactor though WebSettings
1870         https://bugs.webkit.org/show_bug.cgi?id=79534
1871
1872         Reviewed by Darin Fisher.
1873
1874         * page/Settings.cpp:
1875         (WebCore::Settings::Settings):
1876         (WebCore::Settings::setDefaultDeviceScaleFactor):
1877         (WebCore):
1878         * page/Settings.h:
1879         (Settings):
1880         (WebCore::Settings::defaultDeviceScaleFactor):
1881
1882 2012-02-28  Oliver Hunt  <oliver@apple.com>
1883
1884         Fix build.
1885
1886         * mathml/MathMLElement.cpp:
1887         (WebCore::MathMLElement::collectStyleForAttribute):
1888
1889 2012-02-28  Dean Jackson  <dino@apple.com>
1890
1891         https://bugs.webkit.org/show_bug.cgi?id=79824
1892
1893         Unreviewed build fix for when ENABLE(CSS_FILTERS) is on
1894         but ENABLE(CSS_SHADERS) is off.
1895
1896         * css/WebKitCSSFilterValue.cpp:
1897         (WebCore::WebKitCSSFilterValue::typeUsesSpaceSeparator):
1898
1899 2012-02-28  Dave Moore  <davemoore@chromium.org>
1900
1901         Slow content causes choppy scrolling
1902         https://bugs.webkit.org/show_bug.cgi?id=79403
1903
1904         Reviewed by James Robinson.
1905
1906         This code helps make scrolling (via wheel or pad) less choppy
1907         when the content takes a long time to respond to the fake mouse moves
1908         generated during scrolls.
1909
1910
1911  * page/EventHandler.cpp:
1912         (WebCore):
1913         (MaximumDurationTracker):
1914         (WebCore::MaximumDurationTracker::MaximumDurationTracker):
1915         (WebCore::MaximumDurationTracker::~MaximumDurationTracker):
1916         (WebCore::EventHandler::EventHandler):
1917         (WebCore::EventHandler::clear):
1918         (WebCore::EventHandler::mouseMoved):
1919         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
1920         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoonInQuad):
1921         * page/EventHandler.h:
1922
1923 2012-02-28  Andreas Kling  <awesomekling@apple.com>
1924
1925         StyledElement::isPresentationAttribute() only needs the attribute name.
1926         <http://webkit.org/b/79828>
1927
1928         Reviewed by Anders Carlsson.
1929
1930         Pass the QualifiedName to isPresentationAttribute instead of the whole
1931         Attribute. We only need the name to know what kind of attribute it is.
1932
1933         This makes the code a little less ugly and makes it possible to use
1934         the function without having an Attribute object.
1935
1936         * dom/StyledElement.cpp:
1937         (WebCore::StyledElement::attributeChanged):
1938         * dom/StyledElement.h:
1939         (WebCore::StyledElement::isPresentationAttribute):
1940         * html/HTMLBRElement.cpp:
1941         (WebCore::HTMLBRElement::isPresentationAttribute):
1942         * html/HTMLBRElement.h:
1943         * html/HTMLBodyElement.cpp:
1944         (WebCore::HTMLBodyElement::isPresentationAttribute):
1945         * html/HTMLBodyElement.h:
1946         * html/HTMLButtonElement.cpp:
1947         (WebCore::HTMLButtonElement::isPresentationAttribute):
1948         * html/HTMLButtonElement.h:
1949         * html/HTMLDivElement.cpp:
1950         (WebCore::HTMLDivElement::isPresentationAttribute):
1951         * html/HTMLDivElement.h:
1952         * html/HTMLElement.cpp:
1953         (WebCore::HTMLElement::isPresentationAttribute):
1954         * html/HTMLElement.h:
1955         * html/HTMLEmbedElement.cpp:
1956         (WebCore::HTMLEmbedElement::isPresentationAttribute):
1957         * html/HTMLEmbedElement.h:
1958         * html/HTMLFontElement.cpp:
1959         (WebCore::HTMLFontElement::isPresentationAttribute):
1960         * html/HTMLFontElement.h:
1961         * html/HTMLFrameSetElement.cpp:
1962         (WebCore::HTMLFrameSetElement::isPresentationAttribute):
1963         * html/HTMLFrameSetElement.h:
1964         * html/HTMLHRElement.cpp:
1965         (WebCore::HTMLHRElement::isPresentationAttribute):
1966         * html/HTMLHRElement.h:
1967         * html/HTMLIFrameElement.cpp:
1968         (WebCore::HTMLIFrameElement::isPresentationAttribute):
1969         * html/HTMLIFrameElement.h:
1970         * html/HTMLImageElement.cpp:
1971         (WebCore::HTMLImageElement::isPresentationAttribute):
1972         * html/HTMLImageElement.h:
1973         * html/HTMLInputElement.cpp:
1974         (WebCore::HTMLInputElement::isPresentationAttribute):
1975         * html/HTMLInputElement.h:
1976         * html/HTMLLIElement.cpp:
1977         (WebCore::HTMLLIElement::isPresentationAttribute):
1978         * html/HTMLLIElement.h:
1979         * html/HTMLMarqueeElement.cpp:
1980         (WebCore::HTMLMarqueeElement::isPresentationAttribute):
1981         * html/HTMLMarqueeElement.h:
1982         * html/HTMLOListElement.cpp:
1983         (WebCore::HTMLOListElement::isPresentationAttribute):
1984         * html/HTMLOListElement.h:
1985         * html/HTMLObjectElement.cpp:
1986         (WebCore::HTMLObjectElement::isPresentationAttribute):
1987         * html/HTMLObjectElement.h:
1988         * html/HTMLParagraphElement.cpp:
1989         (WebCore::HTMLParagraphElement::isPresentationAttribute):
1990         * html/HTMLParagraphElement.h:
1991         * html/HTMLPlugInElement.cpp:
1992         (WebCore::HTMLPlugInElement::isPresentationAttribute):
1993         * html/HTMLPlugInElement.h:
1994         * html/HTMLPreElement.cpp:
1995         (WebCore::HTMLPreElement::isPresentationAttribute):
1996         * html/HTMLPreElement.h:
1997         * html/HTMLSelectElement.cpp:
1998         (WebCore::HTMLSelectElement::isPresentationAttribute):
1999         * html/HTMLSelectElement.h:
2000         * html/HTMLTableCaptionElement.cpp:
2001         (WebCore::HTMLTableCaptionElement::isPresentationAttribute):
2002         * html/HTMLTableCaptionElement.h:
2003         * html/HTMLTableCellElement.cpp:
2004         (WebCore::HTMLTableCellElement::isPresentationAttribute):
2005         * html/HTMLTableCellElement.h:
2006         * html/HTMLTableColElement.cpp:
2007         (WebCore::HTMLTableColElement::isPresentationAttribute):
2008         * html/HTMLTableColElement.h:
2009         * html/HTMLTableElement.cpp:
2010         (WebCore::HTMLTableElement::isPresentationAttribute):
2011         * html/HTMLTableElement.h:
2012         * html/HTMLTablePartElement.cpp:
2013         (WebCore::HTMLTablePartElement::isPresentationAttribute):
2014         * html/HTMLTablePartElement.h:
2015         * html/HTMLTextAreaElement.cpp:
2016         (WebCore::HTMLTextAreaElement::isPresentationAttribute):
2017         * html/HTMLTextAreaElement.h:
2018         * html/HTMLUListElement.cpp:
2019         (WebCore::HTMLUListElement::isPresentationAttribute):
2020         * html/HTMLUListElement.h:
2021         * html/HTMLVideoElement.cpp:
2022         (WebCore::HTMLVideoElement::isPresentationAttribute):
2023         * html/HTMLVideoElement.h:
2024         * mathml/MathMLElement.cpp:
2025         (WebCore::MathMLElement::isPresentationAttribute):
2026         * mathml/MathMLElement.h:
2027         * svg/SVGImageElement.cpp:
2028         (WebCore::SVGImageElement::isPresentationAttribute):
2029         * svg/SVGImageElement.h:
2030         * svg/SVGStyledElement.cpp:
2031         (WebCore::SVGStyledElement::isPresentationAttribute):
2032         * svg/SVGStyledElement.h:
2033         * svg/SVGTextContentElement.cpp:
2034         (WebCore::SVGTextContentElement::isPresentationAttribute):
2035         * svg/SVGTextContentElement.h:
2036
2037 2012-02-28  Enrica Casucci  <enrica@apple.com>
2038
2039         More Pasteboard code cleanup.
2040         https://bugs.webkit.org/show_bug.cgi?id=79816
2041
2042         Removing the last references to NSPasteboard.
2043
2044         Reviewed by Alexey Proskuryakov.
2045
2046         No new tests. No change in functionality.
2047
2048         * WebCore.xcodeproj/project.pbxproj:
2049         * editing/mac/EditorMac.mm:
2050         (WebCore::Editor::pasteWithPasteboard):
2051         (WebCore::Editor::takeFindStringFromSelection):
2052         * loader/EmptyClients.h:
2053         (WebCore::EmptyEditorClient::setInsertionPasteboard):
2054         * page/DragClient.h:
2055         * page/EditorClient.h:
2056         * platform/DragData.h:
2057         * platform/Pasteboard.h:
2058         * platform/mac/ClipboardMac.h:
2059         * platform/mac/PasteboardHelper.h: Removed.
2060
2061 2012-02-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2062
2063         Unreviewed, rolling out r109137.
2064         http://trac.webkit.org/changeset/109137
2065         https://bugs.webkit.org/show_bug.cgi?id=79833
2066
2067         Broke cr-mac build (Requested by aklein on #webkit).
2068
2069         * platform/graphics/mac/SimpleFontDataMac.mm:
2070         (WebCore):
2071         (WebCore::pathFromFont):
2072
2073 2012-02-28  Jungshik Shin  <jshin@chromium.org>
2074
2075         Add a fallback path to LineBreakIteratorPoolICU when the locale
2076         name from a web page is invalid and ICU fails to get a line break
2077         iterator instance. Also add a null check to 
2078         TextBreakIteratorICU::acquireLineBreakIterator.
2079
2080         Reviewed by Dan Bernstein.
2081
2082         https://bugs.webkit.org/show_bug.cgi?id=67640
2083
2084         Test: fast/text/invalid-locale.html
2085
2086         * platform/text/LineBreakIteratorPoolICU.h:
2087         (WebCore::LineBreakIteratorPool::take):
2088         * platform/text/TextBreakIteratorICU.cpp:
2089         (WebCore::acquireLineBreakIterator):
2090
2091 2012-02-28  Abhishek Arya  <inferno@chromium.org>
2092
2093         Crash due to accessing removed continuation in multi-column layout.
2094         https://bugs.webkit.org/show_bug.cgi?id=78417
2095
2096         Reviewed by David Hyatt.
2097
2098         This patch addresses two problems:
2099         1. Run-in block got split due to addition of a column-span child.
2100         The clone part was incorrectly intruding into the sibling block,
2101         even when it was part of the continuation chain.
2102         2. Like r73296, we don't need to set continuation on an
2103         anonymous block since we haven't split a real element.
2104
2105         Test: fast/multicol/span/runin-continuation-crash.html
2106
2107         * rendering/RenderBlock.cpp:
2108         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
2109         (WebCore::RenderBlock::handleRunInChild):
2110
2111 2012-02-28  Abhishek Arya  <inferno@chromium.org>
2112
2113         Incorrect before child parent calculation when adding new children
2114         to anonymous column blocks.
2115         https://bugs.webkit.org/show_bug.cgi?id=79755
2116
2117         Reviewed by David Hyatt.
2118
2119         before child can be wrapped in anonymous containers, so need to
2120         take care of that in before child parent calculation.
2121
2122         Test: fast/multicol/span/before-child-anonymous-column-block.html
2123
2124         * rendering/RenderBlock.cpp:
2125         (WebCore::RenderBlock::addChildToAnonymousColumnBlocks):
2126
2127 2012-02-28  Ned Holbrook  <nholbrook@apple.com>
2128
2129         Reimplement pathFromFont() in SimpleFontDataMac.mm
2130         https://bugs.webkit.org/show_bug.cgi?id=79811
2131
2132         Reviewed by Dan Bernstein.
2133
2134         Debug-only function, so no new tests.
2135
2136         * platform/graphics/mac/SimpleFontDataMac.mm:
2137         (WebCore::pathFromFont): Reimplemented.
2138
2139 2012-02-28  Alexis Menard  <alexis.menard@openbossa.org>
2140
2141         getComputedStyle fails for 'first-line' pseudo-element
2142         https://bugs.webkit.org/show_bug.cgi?id=57505
2143
2144         Reviewed by Tony Chang.
2145
2146         Querying the selector with a pseudo-element using getComputedStyle should work
2147         even if the selector was not declared in the stylesheet. When not declared, we need
2148         to use the RenderStyle created to do the rendering as there is no pseudo-style.
2149         This match the behavior of Firefox.
2150
2151         No new tests : Updated expectation and extended getComputedStyle-with-pseudo-element.html.
2152
2153         * dom/Element.cpp:
2154         (WebCore::Element::computedStyle):
2155
2156 2012-02-28  Ashod Nakashian  <ashodnakashian@yahoo.com>
2157
2158         Move FILE_SYSTEM code out of WorkerContext and into the fileapi folder
2159         https://bugs.webkit.org/show_bug.cgi?id=79449
2160
2161         Reviewed by Adam Barth.
2162
2163         This moves FILE_SYSTEM code out of WorkerContext and into the fileapi/WorkerContextFileSystem.
2164         None-functional changes, no new tests necessary.
2165
2166         * CMakeLists.txt:
2167         * DerivedSources.make:
2168         * DerivedSources.pri:
2169         * GNUmakefile.list.am:
2170         * Target.pri:
2171         * WebCore.gypi:
2172         * WebCore.vcproj/WebCore.vcproj:
2173         * fileapi/WorkerContextFileSystem.cpp: Added.
2174         (WebCore):
2175         (WebCore::WorkerContextFileSystem::webkitRequestFileSystem):
2176         (WebCore::WorkerContextFileSystem::webkitRequestFileSystemSync):
2177         (WebCore::WorkerContextFileSystem::webkitResolveLocalFileSystemURL):
2178         (WebCore::WorkerContextFileSystem::webkitResolveLocalFileSystemSyncURL):
2179         * fileapi/WorkerContextFileSystem.h: Added.
2180         (WebCore):
2181         (WorkerContextFileSystem):
2182         * fileapi/WorkerContextFileSystem.idl: Added.
2183         * workers/WorkerContext.cpp:
2184         (WebCore::WorkerContext::ensureEventTargetData):
2185         * workers/WorkerContext.h:
2186         (WebCore):
2187         (WorkerContext):
2188         * workers/WorkerContext.idl:
2189
2190 2012-02-28  Alexey Proskuryakov  <ap@apple.com>
2191
2192         FileReader crashes when file is not readable
2193         https://bugs.webkit.org/show_bug.cgi?id=79715
2194
2195         Reviewed by Jian Li.
2196
2197         Test: fast/files/file-reader-directory-crash.html
2198
2199         * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::SharedBuffer): Crash early if a caller
2200         mixed up in-band error signal with length again.
2201
2202         * platform/network/BlobResourceHandle.cpp:
2203         (WebCore): Changed errors into an enum. Added a proper domain for blob errors.
2204         (WebCore::BlobResourceHandle::didReceiveResponse): There is already a constant for INT_MAX
2205         in C/C++.
2206         (WebCore::BlobResourceHandle::didRead): Don't send "-1" for failure down the success path.
2207         (WebCore::BlobResourceHandle::notifyFail): Use a proper domain for blob errors, and a non-
2208         empty message.
2209
2210 2012-02-28  Adam Klein  <adamk@chromium.org>
2211
2212         Unreviewed, fix cr-win build after r109119.
2213
2214         * platform/graphics/chromium/TransparencyWin.h:
2215         (TransparencyWin):
2216
2217 2012-02-28  Mario Sanchez Prada  <msanchez@igalia.com>
2218
2219         [GTK] Add GMainLoop and GMainContext to be handled by GRefPtr
2220         https://bugs.webkit.org/show_bug.cgi?id=79496
2221
2222         Reviewed by Martin Robinson.
2223
2224         Updated places where raw pointers to GMainLoop and GMainContext
2225         were being used, replacing them with GRefPtr-based code.
2226
2227         * platform/RunLoop.h:
2228         (RunLoop):
2229         * platform/gtk/RunLoopGtk.cpp:
2230         (WebCore::RunLoop::RunLoop):
2231         (WebCore::RunLoop::~RunLoop):
2232         (WebCore::RunLoop::mainLoop):
2233         (WebCore::RunLoop::stop):
2234         (WebCore::RunLoop::wakeUp):
2235         (WebCore::RunLoop::TimerBase::start):
2236         * platform/network/soup/ResourceHandleSoup.cpp:
2237         (WebCoreSynchronousLoader):
2238         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
2239         (WebCore::WebCoreSynchronousLoader::~WebCoreSynchronousLoader):
2240         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
2241         (WebCore::WebCoreSynchronousLoader::run):
2242
2243 2012-02-28  Alok Priyadarshi  <alokp@chromium.org>
2244
2245         Heap-use-after-free in WebCore::RenderLayer::addChild
2246         https://bugs.webkit.org/show_bug.cgi?id=79698
2247
2248         Reviewed by Simon Fraser.
2249
2250         This patch fixes a regression introduced in r108659.
2251         The reflection layer was moved to the parent by mistake. It was then
2252         deleted and the parent was left holding on to a deleted pointer. This
2253         patch restores the location where reflection layer is removed - before
2254         moving the child layers.
2255
2256         Test: fast/reflections/toggle-reflection-crash.html
2257
2258         * rendering/RenderLayer.cpp:
2259         (WebCore::RenderLayer::removeOnlyThisLayer):
2260
2261 2012-02-28  Ken Buchanan  <kenrb@chromium.org>
2262
2263         Crash from list marker having inline and block children
2264         https://bugs.webkit.org/show_bug.cgi?id=79793
2265
2266         Reviewed by Julien Chaffraix.
2267
2268         Crashing condition in which an anonymous block was being collapsed
2269         even though it had a block sibling. removeChild() was not checking
2270         for siblings that might precede :before content renderers, such
2271         as list items. This patch corrects that.
2272
2273         * rendering/RenderBlock.cpp:
2274         (WebCore::RenderBlock::removeChild)
2275
2276 2012-02-28  Adam Klein  <adamk@chromium.org>
2277
2278         Unreviewed, speculative test fix after r109016.
2279
2280         * platform/graphics/chromium/TransparencyWin.cpp:
2281         (WebCore::TransparencyWin::OwnedBuffers::OwnedBuffers): Explicitly pass a scale of 1 to ImageBuffer::create.
2282         * platform/graphics/chromium/TransparencyWin.h:
2283         (WebCore): Update names of re-enabled tests.
2284
2285 2012-02-28  Antti Koivisto  <antti@apple.com>
2286
2287         Give StyleRule files of its own
2288         https://bugs.webkit.org/show_bug.cgi?id=79778
2289
2290         Totally rubber-stamped by Andreas Kling.
2291
2292         * CMakeLists.txt:
2293         * GNUmakefile.list.am:
2294         * Target.pri:
2295         * WebCore.gypi:
2296         * WebCore.vcproj/WebCore.vcproj:
2297         * WebCore.xcodeproj/project.pbxproj:
2298         * css/CSSParser.cpp:
2299         * css/CSSStyleRule.cpp:
2300         (WebCore):
2301         (WebCore::CSSStyleRule::style):
2302         * css/CSSStyleRule.h:
2303         (WebCore):
2304         (CSSStyleRule):
2305         * css/CSSStyleSelector.cpp:
2306         * css/CSSStyleSheet.cpp:
2307         * css/StyleRule.cpp: Copied from Source/WebCore/css/CSSStyleRule.cpp.
2308         (WebCore):
2309         * css/StyleRule.h: Copied from Source/WebCore/css/CSSStyleRule.h.
2310         (WebCore):
2311         * editing/EditingStyle.cpp:
2312         * inspector/InspectorCSSAgent.cpp:
2313         * inspector/InspectorInstrumentation.cpp:
2314         * inspector/InspectorStyleSheet.cpp:
2315         * page/PageSerializer.cpp:
2316
2317 2012-02-28  Pavel Feldman  <pfeldman@google.com>
2318
2319         Web Inspector: remove window aspects from the timeline presentation model.
2320         https://bugs.webkit.org/show_bug.cgi?id=79803
2321
2322         Reviewed by Yury Semikhatsky.
2323
2324         * inspector/front-end/TimelineOverviewPane.js:
2325         (WebInspector.TimelineOverviewPane):
2326         (WebInspector.TimelineOverviewPane.prototype.accept):
2327         (WebInspector.TimelineOverviewPane.prototype._setWindowIndices):
2328         (WebInspector.TimelineOverviewPane.prototype.windowLeft):
2329         (WebInspector.TimelineOverviewPane.prototype.windowRight):
2330         (WebInspector.TimelineOverviewPane.prototype._fireWindowChanged):
2331         (WebInspector.TimelineOverviewWindow.prototype._dragWindow):
2332         (WebInspector.TimelineOverviewPane.WindowSelector):
2333         * inspector/front-end/TimelinePanel.js:
2334         (WebInspector.TimelinePanel):
2335         (WebInspector.TimelinePanel.prototype._onCategoryCheckboxClicked):
2336         (WebInspector.TimelinePanel.prototype._updateBoundaries):
2337         * inspector/front-end/TimelinePresentationModel.js:
2338         (WebInspector.TimelinePresentationModel.prototype.reset):
2339         (WebInspector.TimelineCategory):
2340         (WebInspector.TimelineCategory.prototype.get hidden):
2341         (WebInspector.TimelineCategory.prototype.set hidden):
2342
2343 2012-02-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2344
2345         Improve the visual of the tiling
2346         https://bugs.webkit.org/show_bug.cgi?id=79648
2347
2348         Reviewed by Noam Rosenthal.
2349
2350         When we cover the view with tiles[1], we do so from the center
2351         and out, in bigger and bigger cicles by finding the current minimum
2352         covered distance.
2353
2354         This looks like painting a rect, then a cross, then a rect, ...
2355         and can be noticed when a page blocks during tiling.
2356
2357         We can do this better by only covering with tiles in rects at a time.
2358
2359         The original code was done so that it gave preference to tiles in
2360         vertical direction due to that being the most common scrolling
2361         direction. This is not needed anymore as we are now using the
2362         trajectory vector when panning, which always gives preference for
2363         creating tiles in the panned direction.
2364
2365         [1] It should be noted that we always cover the visibleRect in one go,
2366             and that we here are talking about covering the coverRect beyond
2367             the visibleRect
2368
2369         * platform/graphics/TiledBackingStore.cpp:
2370         (WebCore::TiledBackingStore::tileDistance):
2371
2372 2012-02-28  Yury Semikhatsky  <yurys@chromium.org>
2373
2374         Web Inspector: preserve memory counters size after frontend reopening
2375         https://bugs.webkit.org/show_bug.cgi?id=79792
2376
2377         Clear collected counter values when timeline panel is reset. Persist
2378         timeline grid/counters splitter position to restore it when front-end
2379         is opened next time.
2380
2381         Reviewed by Pavel Feldman.
2382
2383         * inspector/front-end/MemoryStatistics.js:
2384         (WebInspector.MemoryStatistics.prototype.reset):
2385         * inspector/front-end/TimelinePanel.js:
2386         (WebInspector.TimelinePanel):
2387         (WebInspector.TimelinePanel.prototype._setSplitterPosition):
2388         (WebInspector.TimelinePanel.prototype._resetPanel):
2389         * inspector/front-end/timelinePanel.css:
2390         (#counter-values-bar):
2391
2392 2012-02-28  Pavel Feldman  <pfeldman@google.com>
2393
2394         Web Inspector: move filtering of the timeline records into the presentation model.
2395         https://bugs.webkit.org/show_bug.cgi?id=79789
2396
2397         Reviewed by Yury Semikhatsky.
2398
2399         * inspector/front-end/TimelineModel.js:
2400         * inspector/front-end/TimelineOverviewPane.js:
2401         (WebInspector.TimelineOverviewPane):
2402         (WebInspector.TimelineOverviewPane.prototype.setStartAtZero):
2403         (WebInspector.TimelineOverviewPane.prototype.scrollWindow):
2404         (WebInspector.TimelineOverviewPane.prototype.accept):
2405         (WebInspector.TimelineOverviewPane.prototype._setWindowIndices):
2406         (WebInspector.TimelineStartAtZeroOverview):
2407         (WebInspector.TimelineStartAtZeroOverview.prototype._onWindowChanged):
2408         * inspector/front-end/TimelinePanel.js:
2409         (WebInspector.TimelinePanel):
2410         (WebInspector.TimelinePanel.prototype._createStatusbarButtons):
2411         (WebInspector.TimelinePanel.prototype._updateRecordsCounter):
2412         (WebInspector.TimelinePanel.prototype._glueParentButtonClicked):
2413         (WebInspector.TimelinePanel.prototype._toggleStartAtZeroButtonClicked):
2414         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
2415         (WebInspector.TimelinePanel.prototype._resetPanel):
2416         (WebInspector.TimelinePanel.prototype._refresh):
2417         (WebInspector.TimelinePanel.prototype.revealRecordAt):
2418         (WebInspector.TimelinePanel.prototype._refreshRecords):
2419         (WebInspector.TimelineExpandableElement.prototype._update):
2420         (WebInspector.TimelineCategoryFilter):
2421         (WebInspector.TimelineCategoryFilter.prototype.accept):
2422         (WebInspector.TimelineIsLongFilter):
2423         (WebInspector.TimelineIsLongFilter.prototype.accept):
2424         * inspector/front-end/TimelinePresentationModel.js:
2425         (WebInspector.TimelinePresentationModel):
2426         (WebInspector.TimelinePresentationModel.prototype.addFilter):
2427         (WebInspector.TimelinePresentationModel.prototype.reset):
2428         (WebInspector.TimelinePresentationModel.prototype.minimumRecordTime):
2429         (WebInspector.TimelinePresentationModel.prototype.maximumRecordTime):
2430         (WebInspector.TimelinePresentationModel.prototype.addRecord):
2431         (WebInspector.TimelinePresentationModel.prototype._updateBoundaries):
2432         (WebInspector.TimelinePresentationModel.prototype._findParentRecord):
2433         (WebInspector.TimelinePresentationModel.prototype.setGlueRecords):
2434         (WebInspector.TimelinePresentationModel.prototype.fireWindowChanged):
2435         (WebInspector.TimelinePresentationModel.prototype.get _recordStyles):
2436         (WebInspector.TimelinePresentationModel.prototype.filteredRecords):
2437         (WebInspector.TimelinePresentationModel.prototype._filterRecords):
2438         (WebInspector.TimelinePresentationModel.Record.prototype.get visibleChildrenCount):
2439         (WebInspector.TimelinePresentationModel.Record.prototype.get invisibleChildrenCount):
2440         (WebInspector.TimelinePresentationModel.Filter):
2441         (WebInspector.TimelinePresentationModel.Filter.prototype.accept):
2442
2443 2012-02-28  Florin Malita  <fmalita@google.com>
2444
2445         Percent width/height SVG not always scaled on window resize
2446         https://bugs.webkit.org/show_bug.cgi?id=79490
2447
2448         Reviewed by Nikolas Zimmermann.
2449
2450         Tests: fast/repaint/percent-minheight-resize-expected.html
2451                fast/repaint/percent-minheight-resize.html
2452                svg/custom/svg-percent-scale-expected.html
2453                svg/custom/svg-percent-scale-vonly-expected.html
2454                svg/custom/svg-percent-scale-vonly.html
2455                svg/custom/svg-percent-scale.html
2456
2457         Fix a couple of problems preventing correct SVG scaling on window resize:
2458
2459         - RenderReplaced::computePreferredLogicalWidths is not SVG attribute aware and computes
2460         a non-zero m_minPreferredLogicalWidth even when the SVG widh/height are percentages.
2461
2462         - RenderBlock::layoutInlineChildren is also not SVG attribute aware and does not trigger
2463         percent height child layouts on vertical-only resizes.
2464
2465         * rendering/RenderBlockLineLayout.cpp:
2466         (WebCore::RenderBlock::layoutInlineChildren):
2467         Use hasRelativeDimensions() instead of direct width/height->isPercent tests. This also fixes
2468         an HTML issue where percent {min,max}Height inline elements are not updated on vertical-only resizes.
2469
2470         * rendering/RenderBox.cpp:
2471         (WebCore::RenderBox::hasRelativeDimensions):
2472         (WebCore):
2473         * rendering/RenderBox.h:
2474         (RenderBox):
2475         Add virtual hasRelativeDimensions() method.
2476
2477         * rendering/RenderReplaced.cpp:
2478         (WebCore::RenderReplaced::computePreferredLogicalWidths):
2479         Use hasRelativeDimensions() instead of direct width/height->isPercent tests.
2480
2481         * rendering/svg/RenderSVGRoot.cpp:
2482         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
2483         (WebCore::RenderSVGRoot::willBeDestroyed):
2484         Register percent-height SVG elements with the gPercentHeightDescendantsMap, and clean-up on destruction
2485         or height unit change.
2486
2487         (WebCore::RenderSVGRoot::hasRelativeDimensions):
2488         (WebCore):
2489         * rendering/svg/RenderSVGRoot.h:
2490         (RenderSVGRoot):
2491         SVG-aware hasRelativeDimensions() override.
2492
2493 2012-02-28  Yury Semikhatsky  <yurys@chromium.org>
2494
2495         Web Inspector: show resource dividers on memory counter graphs
2496         https://bugs.webkit.org/show_bug.cgi?id=79782
2497
2498         Resource dividers are drawn on the memory counter graphs.
2499
2500         Reviewed by Pavel Feldman.
2501
2502         * inspector/front-end/MemoryStatistics.js:
2503         (WebInspector.MemoryStatistics.prototype.updateDividers):
2504         (WebInspector.MemoryStatistics.prototype.setMainTimelineGrid):
2505         (WebInspector.MemoryStatistics.prototype._updateSize):
2506         (WebInspector.MemoryStatistics.prototype.show):
2507         (WebInspector.MemoryStatistics.prototype.refresh):
2508         (WebInspector.MemoryStatistics.prototype._refreshDividers):
2509         * inspector/front-end/TimelineGrid.js:
2510         (WebInspector.TimelineGrid.prototype.get dividersElement):
2511         (WebInspector.TimelineGrid.prototype.updateDividers):
2512         * inspector/front-end/TimelinePanel.js:
2513         (WebInspector.TimelinePanel):
2514         (WebInspector.TimelinePanel.prototype._timelinesOverviewModeChanged):
2515         (WebInspector.TimelinePanel.prototype._refreshRecords):
2516         (WebInspector.TimelinePanel.prototype.get timlinePaddingLeft):
2517         * inspector/front-end/timelinePanel.css:
2518         (#memory-graphs-canvas-container):
2519         (#memory-graphs-canvas-container .resources-dividers):
2520
2521 2012-02-28  Nikolas Zimmermann  <nzimmermann@rim.com>
2522
2523         Integrate SVGUseElement within the new shadow root concept
2524         https://bugs.webkit.org/show_bug.cgi?id=78902
2525
2526         Reviewed by Zoltan Herczeg.
2527
2528         Replace SVG shadow tree implementation with the new, modern #shadow-root implementation.
2529
2530         Current situation in trunk:
2531         SVGUseElement doesn't create/hold the shadow tree, unlike its expected in
2532         the modern #shadow-root concept, but its renderer RenderSVGShadowTreeRootContainer.
2533         That creates a cycle, as the actual DOM tree is stored as RefPtr<SVGGElement> inside
2534         a renderer - that's weak conceptually, and has lead to sublte security bugs in the past.
2535
2536         Whenever a target element of a <use> element changed, invalidateShadowTree() is called
2537         which calls setNeedsStyleRecalc(), and sets m_needsShadodwTreeRecreation to true.
2538         Once style recalculation happens, the RenderSVGShadowTreeRootContainer then eventually
2539         built the shadow tree, by cloning the target node, building the SVGElementInstance tree
2540         etc, -- all within the render tree.
2541
2542         To easy reviewing, here's a dump of the current render tree for a simple <use> example:
2543         <defs><rect id="rect"/></defs><use xlink:href="#rect"/>
2544
2545         Dump of render tree:
2546         RenderSVGHiddenContainer {defs}        // <defs> (SVGDefsElement)
2547             RenderSVGRect {rect}               // <rect> (SVGRectElement)
2548         RenderSVGShadowTreeRootContainer {use} // <use> (SVGUseElement)
2549             RenderSVGContainer {g}             // <g> (SVGShadowTreeRootElement)
2550                 RenderSVGRect {rect}           // <rect> (SVGRectElement, clone of <rect> in <defs>)
2551
2552         The SVGShadowTreeRootElement is created & stored by RenderSVGShadowTreeRootContainer,
2553         the renderer of the <use> element. The RenderSVGTransformableContainer renderer created
2554         for the SVGShadowTreeRootElement stores the x/y translation induced by the <use> attributes.
2555
2556         There are lots of places all over WebCore that assume the existance of a <g> renderer
2557         as first child of the <use> element, representing the "SVG shadow tree root".
2558
2559         Summary of this patch:
2560         Let SVGUseElement create&maintain a #shadow-root, and append the cloned target elements
2561         into this shadow root. We no longer have to take care of attachment/detachment, style
2562         recalculation, etc. - that's handled transparenly by ShadowRoot(List) now.
2563
2564         This makes SVGShadowTreeElements & RenderSVGShadowTreeRootContainer obsolete. Switch
2565         SVGUseElement to create a RenderSVGTransformableContainer as its renderer, and make
2566         it respect the translation induced by the x/y attributes, given for a <use> element.
2567
2568         Remove all occourences of SVGShadowRoot, remove all special cases it induced.
2569
2570         It's all covered by existing tests, took a while to make them all pass again.
2571
2572         * CMakeLists.txt: Remove SVGShadowTreeElements/RenderSVGShadowTreeRootContainer from build.
2573         * GNUmakefile.list.am: Ditto.
2574         * Target.pri: Ditto.
2575         * WebCore.gypi: Ditto.
2576         * WebCore.vcproj/WebCore.vcproj: Ditto.
2577         * WebCore.xcodeproj/project.pbxproj: Ditto.
2578         * css/CSSStyleSelector.cpp:
2579         (WebCore::CSSStyleSelector::collectMatchingRulesForList): Enable fast path for selector checking, now that special shadow tree rules are gone.
2580         * css/SelectorChecker.cpp:
2581         (WebCore::linkAttribute): No need to guard this code with ENABLE(SVG).
2582         (WebCore::SelectorChecker::checkSelector): Remove obsolete SVG shadow root special case.
2583         * dom/EventDispatcher.cpp:
2584         (WebCore::eventTargetRespectingSVGTargetRules): Remove loop, simplify & cleanup this code.
2585         (WebCore::EventDispatcher::adjustToShadowBoundaries): s/isShadowRootOrSVGShadowRoot/isShadowRoot/.
2586         (WebCore::EventDispatcher::adjustRelatedTarget): Ditto.
2587         (WebCore::EventDispatcher::ensureEventAncestors): Simplify logic for SVG, fixed a FIXME.
2588         * dom/Node.cpp: Remove obsolete svgShadowHost().
2589         (WebCore::Node::shadowTreeRootNode): Remove obsolete isSVGShadowRoot() checks.
2590         (WebCore::Node::nonBoundaryShadowTreeRootNode): Ditto.
2591         (WebCore::Node::isInShadowTree): Make it const.
2592         * dom/Node.h: Remove isSVGShadowRoot/svgShadowHost.
2593         (WebCore::Node::isShadowRoot): s/IsShadowRootOrSVGShadowRootFlag/isShadowRoot/.
2594         (WebCore::Node::parentNode): Augment comments.
2595         (WebCore::Node::parentNodeGuaranteedHostFree): Ditto.
2596         * dom/Range.cpp:
2597         (WebCore::Range::checkNodeBA): Remove obsolete SVG shadow root special case.
2598         * dom/ScriptElement.cpp:
2599         (WebCore::ScriptElement::prepareScript): Ditto.
2600         * rendering/RenderObject.h: Remove isSVGShadowTreeRootContainer.
2601         (WebCore::RenderObject::isSVGTransformableContainer): Added.
2602         * rendering/svg/RenderSVGAllInOne.cpp: Remove SVGShadowTreeElements/RenderSVGShadowTreeRootContainer from build.
2603         * rendering/svg/RenderSVGModelObject.cpp:
2604         (WebCore::isGraphicsElement): To check for <use>, a tag name comparision is needed now, as it no longer has a special renderer.
2605         * rendering/svg/RenderSVGResourceClipper.cpp:
2606         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage): Ditto.
2607         (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect): Ditto.
2608         (WebCore::RenderSVGResourceClipper::hitTestClipContent): Ditto.
2609         * rendering/svg/RenderSVGResourceContainer.cpp: Remove RenderSVGShadowTreeRootContainer.h include.
2610         * rendering/svg/RenderSVGShadowTreeRootContainer.cpp: Removed.
2611         * rendering/svg/RenderSVGShadowTreeRootContainer.h: Removed.
2612         * rendering/svg/RenderSVGTransformableContainer.cpp: Keep track of last used additional x/y translation.
2613         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform): Handle x/y translation for <use> contains here, instead of storing it in the SVGShadowTreeRootElement.
2614         * rendering/svg/RenderSVGTransformableContainer.h: Store last used x/y translation.
2615         (WebCore::RenderSVGTransformableContainer::isSVGTransformableContainer): Return true.
2616         (WebCore::toRenderSVGTransformableContainer): Add conversion helpers.
2617         * rendering/svg/RenderSVGViewportContainer.cpp: Ditto.
2618         (WebCore::RenderSVGViewportContainer::calcViewport): Handle width/height attributes inheritance from the <use> element, if we're a <svg> or <symbol> replacement in the shadow tree.
2619         * rendering/svg/RenderSVGViewportContainer.h: Remove isSVGContainer() override which is not needed here (already present in RenderSVGContainer).
2620         * rendering/svg/SVGShadowTreeElements.cpp: Removed.
2621         * rendering/svg/SVGShadowTreeElements.h: Removed.
2622         * svg/SVGAElement.cpp:
2623         (WebCore::SVGAElement::createRenderer): Check if parentNode is really a SVGElement, before casting.
2624         * svg/SVGElement.cpp:
2625         (WebCore::SVGElement::isOutermostSVGSVGElement): Early exit if tag name isn't <svg>, or if we're in a shadow tree (can't be an outermost <svg> element then).
2626         (WebCore::hasLoadListener): Deploy parentOrHostElement() usage to remove any special cases, related to shadow boundaries.
2627         (WebCore::SVGElement::sendSVGLoadEventIfPossible): Ditto.
2628         (WebCore::SVGElement::customStyleForRenderer): Ditto.
2629         * svg/SVGElementInstance.cpp:
2630         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement): Call updateStyleIfNeeded() instead of updateLayoutIgnorePendingStylesheets().
2631         * svg/SVGGElement.cpp:
2632         (WebCore::SVGGElement::rendererIsNeeded): s/parentNode/parentOrHostElement/ - we need to cross shadow boundaries now.
2633         * svg/SVGGElement.h: Remove obsolete isShadowTreeContainerElement().
2634         * svg/SVGLocatable.cpp:
2635         (WebCore::SVGLocatable::nearestViewportElement): s/parentNode/parentOrHostElement/ - we need to cross shadow boundaries now.
2636         (WebCore::SVGLocatable::farthestViewportElement): Ditto.
2637         (WebCore::SVGLocatable::computeCTM): Ditto.
2638         * svg/SVGStyledElement.cpp:
2639         (WebCore::SVGStyledElement::title): Ditto. (+ simplify code a lot, no need to walk the shadow tree to find its root anymore, use isInShadowTree() helper.)
2640         (WebCore::SVGStyledElement::rendererIsNeeded): Ditto.
2641         * svg/SVGUseElement.cpp:
2642         (WebCore::SVGUseElement::SVGUseElement): Remove no longer needed m_updatesBlocked.
2643         (WebCore::SVGUseElement::create): Always call ensureShadowRoot(), to create a #shadow-root, upon creating a SVGUseElement.
2644         (WebCore::SVGUseElement::insertedIntoDocument): Align with SVGFEImageElement/SVGTRefElement - call buildPendingResource() from insertedIntoDocument(), finally! (no renderer needed anymore to update the SVG shadow subtree).
2645         (WebCore::SVGUseElement::removedFromDocument): Align with SVGFEImageElement/SVGTRefElement - immediately release the SVGElementInstance & shadow tree, once we're removed from the document.
2646         (WebCore::SVGUseElement::svgAttributeChanged): Simplify code a lot, no longer need to deal with x/y/width/height attributes, the renderes in the shadow tree grab these values from their corresponding <use> elements automatically now.
2647         (WebCore::SVGUseElement::willRecalcStyle):
2648             New main part of the logic. invalidateShadowTree() calls setNeedsStyleRecalc, and sets m_needsShadowTreeRecreation=true. If we encounter this case, force rebuilding the SVG shadow tree
2649             and the SVGElementInstance tree, immediately, before executing the actual style recalc. This allows us to lazily rebuild the SVG shadow tree for the <use> element. Consider:
2650             <defs><rect id="rect"></defs> <use xlink:href="#rect"/>. Now from a script we change the rect x/y/width/height attributes:
2651             rect.setAttribute("x", "10"); rect.setAttribute("y", "10")... each call will lead to a SVGUseElement::invalidateShadowTree() call by SVGElementInstance::invalidateAllInstancesOfElement, invoked after the <rect> element got parsed.
2652             This won't update the shadow tree four times, but only once upon the next style recalculation - otherwise performance is a nightmare.
2653             This will serve as future starting point, to explore partial SVG subtree re-clones, which should easily be doable now.
2654         (WebCore::dumpInstanceTree): Add a 'static' to allow DUMP_INSTANCE_TREE to be used in clang builds.
2655         (WebCore::SVGUseElement::clearResourceReferences): Added helper to release instance & shadow tree.
2656         (WebCore::SVGUseElement::buildPendingResource): Modeled exactly like SVGFEImageElement/SVGTRefElement. It's possible to share more code between these in future.
2657         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Cleanup code, adapt to new shadow-root concept.
2658         (WebCore::SVGUseElement::createRenderer): Create a RenderSVGTransformableContainer, no longer a <use> specific renderer.
2659         (WebCore::removeDisallowedElementsFromSubtree): Use new replacedChild/appendChild variants, that don't require a ExceptionCode to be passed in.
2660         (WebCore::SVGUseElement::buildShadowTree): Ditto.
2661         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Ditto.
2662         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Ditto.
2663         (WebCore::SVGUseElement::invalidateShadowTree): Only trigger style recalculations if needed.
2664         * svg/SVGUseElement.h: Remove lots of now unnecessary overrides: attach/detach/didRecalcStyle/updateContainerOffset/updateContainerSizes/etc..
2665         * svg/animation/SVGSMILElement.cpp:
2666         (WebCore::SVGSMILElement::insertedIntoDocument): No need to walk the shadow tree to find its root anymore, use isInShadowTree() helper.
2667
2668 2012-02-28  Shinya Kawanaka  <shinyak@chromium.org>
2669
2670         Element should be able to have multiple shadow roots.
2671         https://bugs.webkit.org/show_bug.cgi?id=77931
2672
2673         Reviewed by Hajime Morita.
2674
2675         This patch enables us to add multiple shadow subtrees into elements.
2676         Note that multiple shadow subtrees are enabled
2677         only if RuntimeEnabledFeatures::multipleShadowSubtrees is enabled.
2678
2679         Since we don't have <shadow> element yet, only the youngest shadow tree
2680         will be rendered. This patch includes tests to confirm adding a new shadow
2681         tree dynamically to confirm only the youngest shadow tree is renderered.
2682
2683         Tests: fast/dom/shadow/multiple-shadowroot-rendering.html
2684                fast/dom/shadow/multiple-shadowroot.html
2685
2686         * WebCore.exp.in:
2687         * dom/Element.cpp:
2688           Uses ShadowRootList interfaces directly instead of ShadowRootList emulation methods.
2689         (WebCore::Element::~Element):
2690         (WebCore::Element::attach):
2691         (WebCore::Element::addShadowRoot):
2692         (WebCore::Element::removeShadowRootList):
2693         * dom/Element.h:
2694         (Element):
2695         * dom/NodeRenderingContext.cpp:
2696           Makes non-youngest shadow subtrees hidden.
2697         (WebCore::NodeRenderingContext::NodeRenderingContext):
2698         (WebCore::NodeRenderingContext::hostChildrenChanged):
2699           Since non-youngest children may be changed, make sure host children are changed.
2700         * dom/ShadowRoot.cpp:
2701         (WebCore::ShadowRoot::create):
2702         * dom/ShadowRoot.h:
2703           Utility methods to make code intention clear are added.
2704         (WebCore::ShadowRoot::youngerShadowRoot):
2705         (WebCore::ShadowRoot::olderShadowRoot):
2706         (ShadowRoot):
2707         (WebCore::ShadowRoot::isYoungest):
2708         (WebCore::ShadowRoot::isOldest):
2709         * dom/ShadowRootList.cpp:
2710         (WebCore::ShadowRootList::popShadowRoot):
2711         (WebCore::ShadowRootList::attach):
2712         (WebCore::ShadowRootList::detach):
2713           Detaches shadow subtrees.
2714         * testing/Internals.cpp:
2715         (WebCore::Internals::address):
2716         (WebCore):
2717         (WebCore::Internals::youngerShadowRoot):
2718         (WebCore::Internals::olderShadowRoot):
2719         (WebCore::Internals::removeShadowRoot):
2720         * testing/Internals.h:
2721         (Internals):
2722         * testing/Internals.idl:
2723
2724 2012-02-28  Antti Koivisto  <antti@apple.com>
2725
2726         Split CSSStyleRule into internal and CSSOM type
2727         https://bugs.webkit.org/show_bug.cgi?id=79763
2728
2729         Reviewed by Andreas Kling.
2730
2731         - Split the data out as StyleRule
2732         - Make CSSStyleSelector operate on StyleRule instead of CSSStyleRule
2733         
2734         This is an intermediate step. Both CSSStyleRule and StyleRule are still always constructed so
2735         the patch increases memory consumption by a few pointers per css rule. Upcoming
2736         patches will make CSSStyleRules to be constructed on demand.
2737         
2738         The patch does not yet move StyleRule to a file of its own.
2739
2740         * css/CSSPageRule.cpp:
2741         (WebCore::CSSPageRule::CSSPageRule):
2742         * css/CSSPageRule.h:
2743         (WebCore::CSSPageRule::create):
2744         (CSSPageRule):
2745         * css/CSSParser.cpp:
2746         (WebCore::CSSParser::createStyleRule):
2747         (WebCore::CSSParser::createPageRule):
2748         * css/CSSRule.h:
2749         (WebCore::CSSRule::CSSRule):
2750         (CSSRule):
2751         * css/CSSStyleRule.cpp:
2752         (WebCore::StyleRule::StyleRule):
2753         (WebCore):
2754         (WebCore::StyleRule::~StyleRule):
2755         (WebCore::StyleRule::addSubresourceStyleURLs):
2756         (WebCore::StyleRule::ensureCSSStyleRule):
2757         (WebCore::CSSStyleRule::CSSStyleRule):
2758         (WebCore::CSSStyleRule::~CSSStyleRule):
2759         (WebCore::CSSStyleRule::generateSelectorText):
2760         (WebCore::CSSStyleRule::setSelectorText):
2761         (WebCore::CSSStyleRule::cssText):
2762         * css/CSSStyleRule.h:
2763         (WebCore):
2764         (StyleRule):
2765         (WebCore::StyleRule::selectorList):
2766         (WebCore::StyleRule::properties):
2767         (WebCore::StyleRule::sourceLine):
2768         (WebCore::StyleRule::adoptSelectorVector):
2769         (WebCore::StyleRule::adoptSelectorList):
2770         (WebCore::StyleRule::setProperties):
2771         (WebCore::CSSStyleRule::create):
2772         (WebCore::CSSStyleRule::style):
2773         (CSSStyleRule):
2774         (WebCore::CSSStyleRule::styleRule):
2775         * css/CSSStyleSelector.cpp:
2776         (RuleData):
2777         (WebCore::RuleData::rule):
2778         (RuleSet):
2779         (WebCore::CSSStyleSelector::addMatchedProperties):
2780         (WebCore::CSSStyleSelector::sortAndTransferMatchedRules):
2781         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2782         * css/CSSStyleSelector.h:
2783         (WebCore::CSSStyleSelector::RuleSelectorPair::RuleSelectorPair):
2784         (RuleSelectorPair):
2785         (MatchResult):
2786         (CSSStyleSelector):
2787         * css/CSSStyleSheet.cpp:
2788         (WebCore::CSSStyleSheet::addSubresourceStyleURLs):
2789         * editing/EditingStyle.cpp:
2790         (WebCore::styleFromMatchedRulesForElement):
2791         * inspector/InspectorCSSAgent.cpp:
2792         (WebCore::SelectorProfile::startSelector):
2793         * inspector/InspectorInstrumentation.cpp:
2794         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
2795         (WebCore::InspectorInstrumentation::willProcessRuleImpl):
2796         * inspector/InspectorInstrumentation.h:
2797         (WebCore):
2798         (InspectorInstrumentation):
2799         (WebCore::InspectorInstrumentation::willMatchRule):
2800         (WebCore::InspectorInstrumentation::willProcessRule):
2801         * inspector/InspectorStyleSheet.cpp:
2802         (WebCore::InspectorStyleSheet::buildObjectForRule):
2803         (WebCore::InspectorStyleSheet::revalidateStyle):
2804         * page/PageSerializer.cpp:
2805         (WebCore::PageSerializer::serializeFrame):
2806         (WebCore::PageSerializer::serializeCSSStyleSheet):
2807         (WebCore::PageSerializer::retrieveResourcesForRule):
2808         (WebCore::PageSerializer::retrieveResourcesForProperties):
2809         * page/PageSerializer.h:
2810         (WebCore):
2811         (PageSerializer):
2812
2813 2012-02-28  Roland Steiner  <rolandsteiner@chromium.org>
2814
2815         RuntimeEnabledFeatures::setMultipleShadowSubtreesEnabled should not be inline
2816         https://bugs.webkit.org/show_bug.cgi?id=79753
2817
2818         Moved the function implementation to the .cpp file.
2819
2820         Reviewed by Hajime Morita.
2821
2822         No new tests. (no functional change)
2823
2824         * bindings/generic/RuntimeEnabledFeatures.cpp:
2825         (WebCore::RuntimeEnabledFeatures::setMultipleShadowSubtreesEnabled):
2826         (WebCore):
2827         * bindings/generic/RuntimeEnabledFeatures.h:
2828         (RuntimeEnabledFeatures):
2829
2830 2012-02-28  Noel Gordon  <noel.gordon@gmail.com>
2831
2832         Fix comment about RGB swizzle decoding and Adobe transform=0 images
2833         https://bugs.webkit.org/show_bug.cgi?id=79457
2834
2835         Unreviewed. No new tests, comment change only.
2836
2837         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2838         (WebCore::JPEGImageReader::decode):
2839
2840 2012-02-27  Shinya Kawanaka  <shinyak@chromium.org>
2841
2842         Element::removeShadowRoot() and setShadowRoot() should be moved into ShadowTree.
2843         https://bugs.webkit.org/show_bug.cgi?id=78313
2844
2845         Reviewed by Hajime Morita.
2846
2847         This patch is for refactoring ShadowTree related code.
2848           (1) Element::removeShadowRoot() and Element::setShadowRoot() are moved into ShadowTree.
2849           (2) ShadowTree is now put on its own heap.
2850
2851         No new tests, no change in behavior.
2852
2853         * WebCore.exp.in:
2854         * dom/Element.cpp:
2855         (WebCore::Element::~Element):
2856         (WebCore::Element::shadowTree):
2857         (WebCore::Element::ensureShadowTree):
2858           Ensure the existence of ShadowTree. This does not ensure ShadowRoot exists.
2859         * dom/Element.h:
2860         (Element):
2861         * dom/ElementRareData.h:
2862           Makes ShadowTree on Heap.
2863         (ElementRareData):
2864         (WebCore::ElementRareData::~ElementRareData):
2865         * dom/ShadowRoot.cpp:
2866         (WebCore::ShadowRoot::create):
2867         * dom/ShadowTree.cpp:
2868         (WebCore::validateShadowRoot):
2869         (WebCore):
2870         (WebCore::ShadowTree::addShadowRoot):
2871         (WebCore::ShadowTree::removeAllShadowRoots):
2872         * dom/ShadowTree.h:
2873         (ShadowTree):
2874         * testing/Internals.cpp:
2875         (WebCore::Internals::removeShadowRoot):
2876
2877 2012-02-27  David Barton  <dbarton@mathscribe.com>
2878
2879         Fix <msubsup> formatting, especially for a tall base, subscript, or superscript
2880         https://bugs.webkit.org/show_bug.cgi?id=79274
2881
2882         Reviewed by Julien Chaffraix.
2883
2884         Move the <msubsup> formatting code in stretchToHeight() to layout(). Then revise the
2885         combined code to produce more vertically accurate results, and without extra white
2886         space. Finally, don't multiply msub/msup/msubsup operator stretching by 1.2.
2887
2888         Test: Added the bug report's attached test case to mathml/presentation/subsup.xhtml, and
2889         it and 5 other test files in mathml/presentation now produce improved results. The
2890         integral sign in mo-stretch.html is no longer scaled up by an extra 1.2, and baselines
2891         are more accurate so the base is higher in msubsup-sub-changed.png. Several examples are
2892         slightly tighter vertically, because their (somewhat) anonymous blocks wrapping
2893         subscripts and superscripts now have the correct font size.
2894
2895         * rendering/mathml/RenderMathMLSubSup.cpp:
2896         (WebCore):
2897         (WebCore::RenderMathMLSubSup::addChild):
2898         (WebCore::RenderMathMLSubSup::stretchToHeight):
2899         (WebCore::RenderMathMLSubSup::layout):
2900         * rendering/mathml/RenderMathMLSubSup.h:
2901         (RenderMathMLSubSup):
2902         * rendering/style/RenderStyle.h:
2903
2904 2012-02-27  Ned Holbrook  <nholbrook@apple.com>
2905
2906         kCTFontTableOptionExcludeSynthetic is unneeded
2907         https://bugs.webkit.org/show_bug.cgi?id=79744
2908
2909         Reviewed by Dan Bernstein.
2910
2911         The aforementioned option is a no-op, so no new tests.
2912
2913         * platform/graphics/mac/SimpleFontDataMac.mm:
2914         (WebCore::fontHasVerticalGlyphs): Specify no options.
2915
2916 2012-02-27  Wei James  <james.wei@intel.com>
2917
2918         Multi-Channel support in AudioBufferSourceNode
2919         https://bugs.webkit.org/show_bug.cgi?id=79202
2920
2921         Reviewed by Chris Rogers.
2922
2923         Test: webaudio/audiobuffersource-multi-channels.html
2924
2925         * webaudio/AudioBufferSourceNode.cpp:
2926         (WebCore::AudioBufferSourceNode::renderSilenceAndFinishIfNotLooping):
2927         (WebCore::AudioBufferSourceNode::renderFromBuffer):
2928         (WebCore::AudioBufferSourceNode::setBuffer):
2929         * webaudio/AudioBufferSourceNode.h:
2930         (AudioBufferSourceNode):
2931
2932 2012-02-27  Leo Yang  <leo.yang@torchmobile.com.cn>
2933
2934         [BlackBerry] Upstream the BlackBerry change to platform/graphics/IntRect.h
2935         https://bugs.webkit.org/show_bug.cgi?id=79732
2936
2937         Reviewed by Antonio Gomes.
2938
2939         Add conversion convenience between WebCore::IntRect and BlackBerry::Platform::IntRect.
2940
2941         The porting can't be built yet, no new tests.
2942
2943         * platform/graphics/IntRect.h:
2944         (Platform):
2945         (IntRect):
2946
2947 2012-02-27  Emil A Eklund  <eae@chromium.org>
2948
2949         Printed font-size should not be dependant on zoom level
2950         https://bugs.webkit.org/show_bug.cgi?id=79717
2951
2952         Reviewed by Adam Barth.
2953
2954         Ignore full page zoom level when printing a document.
2955
2956         Test: printing/zoomed-document.html
2957
2958         * css/CSSStyleSelector.cpp:
2959         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2960
2961 2012-02-27  Kenichi Ishibashi  <bashi@chromium.org>
2962
2963         [Chromium] Unreviewed gardening, further compile fixes for
2964         TransparencyWinTest.
2965
2966         * platform/graphics/chromium/TransparencyWin.h:
2967         (WebCore):
2968
2969 2012-02-27  Kenichi Ishibashi  <bashi@chromium.org>
2970
2971         [Chromium] Unreviewed gardening, fix compile error after r109043
2972
2973         * platform/graphics/chromium/TransparencyWin.h:
2974         (TransparencyWin):
2975
2976 2012-02-27  Adam Barth  <abarth@webkit.org>
2977
2978         EventFactory.in should be named EventNames.in
2979         https://bugs.webkit.org/show_bug.cgi?id=79727
2980
2981         Reviewed by Kentaro Hara.
2982
2983         Originally EventFactory.in was just used to generate EventFactory.cpp,
2984         but now we're able to generate a bunch of other Event-related code from
2985         this "in" file.
2986
2987         In writing some documentation about how to use these mechanisms, the
2988         name EventFactory.in didn't seem like the right name.  This patch
2989         renames EventFactory.in to EventNames.in, which more accurately
2990         describes the role of this file (and matches the naming convention of
2991         HTMLTagNames.in).
2992
2993         * CMakeLists.txt:
2994         * DerivedSources.make:
2995         * DerivedSources.pri:
2996         * GNUmakefile.am:
2997         * WebCore.gyp/WebCore.gyp:
2998         * WebCore.gyp/scripts/action_makenames.py:
2999         (main):
3000         * WebCore.xcodeproj/project.pbxproj:
3001         * dom/EventNames.in: Copied from Source/WebCore/dom/EventFactory.in.
3002         * dom/EventFactory.in: Removed.
3003
3004 2012-02-27  Yoshifumi Inoue  <yosin@chromium.org>
3005
3006         [Forms] Make order of attribute/method in HTMLInputElement.idl as same as specification
3007         https://bugs.webkit.org/show_bug.cgi?id=79622
3008
3009         For ease of maintainability, this patch reorders attributes and methods declaration
3010         matching with specification.
3011
3012         Reviewed by Adam Barth.
3013
3014         No new tests. No behavior change.
3015
3016         * html/HTMLInputElement.idl: Reorder and remove obsolete comments.
3017
3018 2012-02-27  Luke Macpherson   <macpherson@chromium.org>
3019
3020         Sort CSSStyleSelector property handler constructors by CSS property name.
3021         https://bugs.webkit.org/show_bug.cgi?id=79713
3022
3023         Reviewed by Andreas Kling.
3024
3025         No new tests / refactoring only.
3026
3027         This patch is simply an automated sort of the property constructors.
3028         Presently they are all over the place and it is difficult to know where to insert new rules.
3029         This patch provides a clear pattern and should reduce future conflicts when adding properties.
3030
3031         * css/CSSStyleApplyProperty.cpp:
3032         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
3033
3034 2012-02-27  James Kozianski  <koz@chromium.org>
3035
3036         [chromium] Plumb extensionGroup into didCreateScriptContext().
3037         https://bugs.webkit.org/show_bug.cgi?id=79072
3038
3039         Reviewed by Darin Fisher.
3040
3041         * bindings/v8/V8DOMWindowShell.cpp:
3042         (WebCore::V8DOMWindowShell::initContextIfNeeded):
3043         * bindings/v8/V8IsolatedContext.cpp:
3044         (WebCore::V8IsolatedContext::V8IsolatedContext):
3045         * loader/EmptyClients.h:
3046         (WebCore::EmptyFrameLoaderClient::didCreateScriptContext):
3047         * loader/FrameLoaderClient.h:
3048         (FrameLoaderClient):
3049
3050 2012-02-27  Huang Dongsung  <luxtella@company100.net>
3051
3052         Fixed a typo in CanvasRenderingContext2D::drawImage(HTMLCanvasElement);
3053         incorrect source and destination rect used.
3054         https://bugs.webkit.org/show_bug.cgi?id=79566
3055
3056         Pass dstRect and bufferSrcRect to
3057         CanvasRenderingContext2D::fullCanvasCompositedDrawImage() for the destination
3058         and source rect, respectively.
3059
3060         Reviewed by Daniel Bates.
3061
3062         * html/canvas/CanvasRenderingContext2D.cpp:
3063         (WebCore::CanvasRenderingContext2D::drawImage):
3064
3065 2012-02-27  Hyowon Kim  <hw1008.kim@samsung.com>
3066
3067         [EFL] Initial implementation of GraphicsContext3DPrivate
3068         https://bugs.webkit.org/show_bug.cgi?id=62961
3069
3070         Reviewed by Noam Rosenthal.
3071
3072         This patch adds the GraphicsContext3DPrivate class using Evas_GL.
3073         GraphicsContext3DPrivate delegates all GL function calls to Evas_GL_API.
3074
3075         * platform/graphics/efl/GraphicsContext3DPrivate.cpp: Added.
3076         (WebCore):
3077         (WebCore::GraphicsContext3DPrivate::create):
3078         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
3079         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
3080         (WebCore::GraphicsContext3DPrivate::initialize):
3081         (WebCore::GraphicsContext3DPrivate::createSurface):
3082         (WebCore::GraphicsContext3DPrivate::platformGraphicsContext3D):
3083         (WebCore::GraphicsContext3DPrivate::makeContextCurrent):
3084         (WebCore::GraphicsContext3DPrivate::isGLES2Compliant):
3085         (WebCore::GraphicsContext3DPrivate::activeTexture):
3086         (WebCore::GraphicsContext3DPrivate::attachShader):
3087         (WebCore::GraphicsContext3DPrivate::bindAttribLocation):
3088         (WebCore::GraphicsContext3DPrivate::bindBuffer):
3089         (WebCore::GraphicsContext3DPrivate::bindFramebuffer):
3090         (WebCore::GraphicsContext3DPrivate::bindRenderbuffer):
3091         (WebCore::GraphicsContext3DPrivate::bindTexture):
3092         (WebCore::GraphicsContext3DPrivate::blendColor):
3093         (WebCore::GraphicsContext3DPrivate::blendEquation):
3094         (WebCore::GraphicsContext3DPrivate::blendEquationSeparate):
3095         (WebCore::GraphicsContext3DPrivate::blendFunc):
3096         (WebCore::GraphicsContext3DPrivate::blendFuncSeparate):
3097         (WebCore::GraphicsContext3DPrivate::bufferData):
3098         (WebCore::GraphicsContext3DPrivate::bufferSubData):
3099         (WebCore::GraphicsContext3DPrivate::checkFramebufferStatus):
3100         (WebCore::GraphicsContext3DPrivate::clear):
3101         (WebCore::GraphicsContext3DPrivate::clearColor):
3102         (WebCore::GraphicsContext3DPrivate::clearDepth):
3103         (WebCore::GraphicsContext3DPrivate::clearStencil):
3104         (WebCore::GraphicsContext3DPrivate::colorMask):
3105         (WebCore::GraphicsContext3DPrivate::compileShader):
3106         (WebCore::GraphicsContext3DPrivate::copyTexImage2D):
3107         (WebCore::GraphicsContext3DPrivate::copyTexSubImage2D):
3108         (WebCore::GraphicsContext3DPrivate::cullFace):
3109         (WebCore::GraphicsContext3DPrivate::depthFunc):
3110         (WebCore::GraphicsContext3DPrivate::depthMask):
3111         (WebCore::GraphicsContext3DPrivate::depthRange):
3112         (WebCore::GraphicsContext3DPrivate::detachShader):
3113         (WebCore::GraphicsContext3DPrivate::disable):
3114         (WebCore::GraphicsContext3DPrivate::disableVertexAttribArray):
3115         (WebCore::GraphicsContext3DPrivate::drawArrays):
3116         (WebCore::GraphicsContext3DPrivate::drawElements):
3117         (WebCore::GraphicsContext3DPrivate::enable):
3118         (WebCore::GraphicsContext3DPrivate::enableVertexAttribArray):
3119         (WebCore::GraphicsContext3DPrivate::finish):
3120         (WebCore::GraphicsContext3DPrivate::flush):
3121         (WebCore::GraphicsContext3DPrivate::framebufferRenderbuffer):
3122         (WebCore::GraphicsContext3DPrivate::framebufferTexture2D):
3123         (WebCore::GraphicsContext3DPrivate::frontFace):
3124         (WebCore::GraphicsContext3DPrivate::generateMipmap):
3125         (WebCore::GraphicsContext3DPrivate::getActiveAttrib):
3126         (WebCore::GraphicsContext3DPrivate::getActiveUniform):
3127         (WebCore::GraphicsContext3DPrivate::getAttachedShaders):
3128         (WebCore::GraphicsContext3DPrivate::getAttribLocation):
3129         (WebCore::GraphicsContext3DPrivate::getBooleanv):
3130         (WebCore::GraphicsContext3DPrivate::getBufferParameteriv):
3131         (WebCore::GraphicsContext3DPrivate::getContextAttributes):
3132         (WebCore::GraphicsContext3DPrivate::getError):
3133         (WebCore::GraphicsContext3DPrivate::getFloatv):
3134         (WebCore::GraphicsContext3DPrivate::getFramebufferAttachmentParameteriv):
3135         (WebCore::GraphicsContext3DPrivate::getIntegerv):
3136         (WebCore::GraphicsContext3DPrivate::getProgramiv):
3137         (WebCore::GraphicsContext3DPrivate::getProgramInfoLog):
3138         (WebCore::GraphicsContext3DPrivate::getRenderbufferParameteriv):
3139         (WebCore::GraphicsContext3DPrivate::getShaderiv):
3140         (WebCore::GraphicsContext3DPrivate::getShaderInfoLog):
3141         (WebCore::GraphicsContext3DPrivate::getShaderSource):
3142         (WebCore::GraphicsContext3DPrivate::getString):
3143         (WebCore::GraphicsContext3DPrivate::getTexParameterfv):
3144         (WebCore::GraphicsContext3DPrivate::getTexParameteriv):
3145         (WebCore::GraphicsContext3DPrivate::getUniformfv):
3146         (WebCore::GraphicsContext3DPrivate::getUniformiv):
3147         (WebCore::GraphicsContext3DPrivate::getUniformLocation):
3148         (WebCore::GraphicsContext3DPrivate::getVertexAttribfv):
3149         (WebCore::GraphicsContext3DPrivate::getVertexAttribiv):
3150         (WebCore::GraphicsContext3DPrivate::getVertexAttribOffset):
3151         (WebCore::GraphicsContext3DPrivate::hint):
3152         (WebCore::GraphicsContext3DPrivate::isBuffer):
3153         (WebCore::GraphicsContext3DPrivate::isEnabled):
3154         (WebCore::GraphicsContext3DPrivate::isFramebuffer):
3155         (WebCore::GraphicsContext3DPrivate::isProgram):
3156         (WebCore::GraphicsContext3DPrivate::isRenderbuffer):
3157         (WebCore::GraphicsContext3DPrivate::isShader):
3158         (WebCore::GraphicsContext3DPrivate::isTexture):
3159         (WebCore::GraphicsContext3DPrivate::lineWidth):
3160         (WebCore::GraphicsContext3DPrivate::linkProgram):
3161         (WebCore::GraphicsContext3DPrivate::pixelStorei):
3162         (WebCore::GraphicsContext3DPrivate::polygonOffset):
3163         (WebCore::GraphicsContext3DPrivate::readPixels):
3164         (WebCore::GraphicsContext3DPrivate::renderbufferStorage):
3165         (WebCore::GraphicsContext3DPrivate::sampleCoverage):
3166         (WebCore::GraphicsContext3DPrivate::scissor):
3167         (WebCore::GraphicsContext3DPrivate::shaderSource):
3168         (WebCore::GraphicsContext3DPrivate::stencilFunc):
3169         (WebCore::GraphicsContext3DPrivate::stencilFuncSeparate):
3170         (WebCore::GraphicsContext3DPrivate::stencilMask):
3171         (WebCore::GraphicsContext3DPrivate::stencilMaskSeparate):
3172         (WebCore::GraphicsContext3DPrivate::stencilOp):
3173         (WebCore::GraphicsContext3DPrivate::stencilOpSeparate):
3174         (WebCore::GraphicsContext3DPrivate::texImage2D):
3175         (WebCore::GraphicsContext3DPrivate::texParameterf):
3176         (WebCore::GraphicsContext3DPrivate::texParameteri):
3177         (WebCore::GraphicsContext3DPrivate::texSubImage2D):
3178         (WebCore::GraphicsContext3DPrivate::uniform1f):
3179         (WebCore::GraphicsContext3DPrivate::uniform1fv):
3180         (WebCore::GraphicsContext3DPrivate::uniform1i):
3181         (WebCore::GraphicsContext3DPrivate::uniform1iv):
3182         (WebCore::GraphicsContext3DPrivate::uniform2f):
3183         (WebCore::GraphicsContext3DPrivate::uniform2fv):
3184         (WebCore::GraphicsContext3DPrivate::uniform2i):
3185         (WebCore::GraphicsContext3DPrivate::uniform2iv):
3186         (WebCore::GraphicsContext3DPrivate::uniform3f):
3187         (WebCore::GraphicsContext3DPrivate::uniform3fv):
3188         (WebCore::GraphicsContext3DPrivate::uniform3i):
3189         (WebCore::GraphicsContext3DPrivate::uniform3iv):
3190         (WebCore::GraphicsContext3DPrivate::uniform4f):
3191         (WebCore::GraphicsContext3DPrivate::uniform4fv):
3192         (WebCore::GraphicsContext3DPrivate::uniform4i):
3193         (WebCore::GraphicsContext3DPrivate::uniform4iv):
3194         (WebCore::GraphicsContext3DPrivate::uniformMatrix2fv):
3195         (WebCore::GraphicsContext3DPrivate::uniformMatrix3fv):
3196         (WebCore::GraphicsContext3DPrivate::uniformMatrix4fv):
3197         (WebCore::GraphicsContext3DPrivate::useProgram):
3198         (WebCore::GraphicsContext3DPrivate::validateProgram):
3199         (WebCore::GraphicsContext3DPrivate::vertexAttrib1f):
3200         (WebCore::GraphicsContext3DPrivate::vertexAttrib1fv):
3201         (WebCore::GraphicsContext3DPrivate::vertexAttrib2f):
3202         (WebCore::GraphicsContext3DPrivate::vertexAttrib2fv):
3203         (WebCore::GraphicsContext3DPrivate::vertexAttrib3f):
3204         (WebCore::GraphicsContext3DPrivate::vertexAttrib3fv):
3205         (WebCore::GraphicsContext3DPrivate::vertexAttrib4f):
3206         (WebCore::GraphicsContext3DPrivate::vertexAttrib4fv):
3207         (WebCore::GraphicsContext3DPrivate::vertexAttribPointer):
3208         (WebCore::GraphicsContext3DPrivate::viewport):
3209         (WebCore::GraphicsContext3DPrivate::createBuffer):
3210         (WebCore::GraphicsContext3DPrivate::createFramebuffer):
3211         (WebCore::GraphicsContext3DPrivate::createProgram):
3212         (WebCore::GraphicsContext3DPrivate::createRenderbuffer):
3213         (WebCore::GraphicsContext3DPrivate::createShader):
3214         (WebCore::GraphicsContext3DPrivate::createTexture):
3215         (WebCore::GraphicsContext3DPrivate::deleteBuffer):
3216         (WebCore::GraphicsContext3DPrivate::deleteFramebuffer):
3217         (WebCore::GraphicsContext3DPrivate::deleteProgram):
3218         (WebCore::GraphicsContext3DPrivate::deleteRenderbuffer):
3219         (WebCore::GraphicsContext3DPrivate::deleteShader):
3220         (WebCore::GraphicsContext3DPrivate::deleteTexture):
3221         (WebCore::GraphicsContext3DPrivate::synthesizeGLError):
3222         (WebCore::GraphicsContext3DPrivate::getExtensions):
3223         * platform/graphics/efl/GraphicsContext3DPrivate.h: Added.
3224         (WebCore):
3225         (GraphicsContext3DPrivate):
3226
3227 2012-02-27  Shawn Singh  <shawnsingh@chromium.org>
3228
3229         RenderLayer ClipRect not accounting for transforms
3230         https://bugs.webkit.org/show_bug.cgi?id=76486
3231
3232         Reviewed by Simon Fraser.
3233
3234         Test: compositing/layer-creation/overlap-transformed-and-clipped.html
3235
3236         This patch changes calculateClipRects() so that the clipRect
3237         offset is allowed to be converted across layers with
3238         transforms. This is necessary because the RenderLayerCompositor
3239         needs clipRects in document space, rather than with respect to
3240         some local clipping layer.
3241
3242         * rendering/RenderLayer.cpp:
3243         (WebCore::RenderLayer::calculateClipRects):
3244         * rendering/RenderObject.cpp:
3245         (WebCore::RenderObject::localToContainerPoint):
3246         (WebCore):
3247         * rendering/RenderObject.h:
3248         (RenderObject):
3249
3250 2012-02-27  Adam Klein  <adamk@chromium.org>
3251
3252         [MutationObservers] Clear pending mutation records on disconnect()
3253         https://bugs.webkit.org/show_bug.cgi?id=78639
3254
3255         Reviewed by Ojan Vafai.
3256
3257         Test: fast/mutation/disconnect-cancel-pending.html
3258
3259         * dom/WebKitMutationObserver.cpp:
3260         (WebCore::WebKitMutationObserver::disconnect): Clear pending records.
3261         (WebCore::WebKitMutationObserver::deliver): Avoid calling the callback if no records are pending delivery.
3262
3263 2012-02-27  Adam Klein  <adamk@chromium.org>
3264
3265         Always notify subtree of removal in ContainerNode::removeChildren
3266         https://bugs.webkit.org/show_bug.cgi?id=79316
3267
3268         Reviewed by Ryosuke Niwa.
3269
3270         In the inDocument case, Node::removedFromDocument is called.
3271         In the out-of-document case, call ContainerNode::removedFromTree to ensure,
3272         e.g., form-associated elements are properly disconnected.
3273
3274         Test: fast/forms/form-associated-element-removal.html
3275
3276         * dom/ContainerNode.cpp:
3277         (WebCore::ContainerNode::removeChildren):
3278
3279 2012-02-27  Adam Barth  <abarth@webkit.org>
3280
3281         Repair license blocks for files created during modularization
3282         https://bugs.webkit.org/show_bug.cgi?id=79721
3283
3284         Reviewed by Eric Seidel.
3285
3286         We failed to copy the license blocks correctly when moving code into
3287         these files.  This patch restores the correct license blocks.
3288
3289         * Modules/geolocation/NavigatorGeolocation.cpp:
3290         * Modules/geolocation/NavigatorGeolocation.h:
3291         * Modules/mediastream/NavigatorMediaStream.cpp:
3292         * Modules/mediastream/NavigatorMediaStream.h:
3293         * bindings/js/JSDOMWindowWebAudioCustom.cpp:
3294         * bindings/js/JSDOMWindowWebSocketCustom.cpp:
3295         * storage/DOMWindowSQLDatabase.cpp:
3296         * storage/DOMWindowSQLDatabase.h:
3297
3298 2012-02-27  Julien Chaffraix  <jchaffraix@webkit.org>
3299
3300         Extract the logic for computing the dirty rows / columns out of RenderTableSection::paintObject
3301         https://bugs.webkit.org/show_bug.cgi?id=79580
3302
3303         Reviewed by Eric Seidel.
3304
3305         Refactoring only.
3306
3307         * rendering/RenderTableSection.h:
3308         (CellSpan):
3309         (WebCore::CellSpan::CellSpan):
3310         (WebCore::CellSpan::start):
3311         (WebCore::CellSpan::end):
3312         Added this class to hold the span information.
3313
3314         (WebCore::RenderTableSection::fullTableRowSpan):
3315         (WebCore::RenderTableSection::fullTableColumnSpan):
3316         Those functions return the span corresponding to the full table.
3317
3318         * rendering/RenderTableSection.cpp:
3319         (WebCore::RenderTableSection::dirtiedRows):
3320         (WebCore::RenderTableSection::dirtiedColumns):
3321         Those functions compute the rows / columns impacted by a |damageRect|. On the slow painting path, they
3322         return the full table span.
3323
3324         (WebCore::RenderTableSection::paintObject):
3325         Updated this function to call the new ones. Also we now inflate the local rectangle with the outlineSize.
3326         This wasn't done previously and we had to manually patch some size comparison to account for the outline.
3327
3328 2012-02-27  Kentaro Hara  <haraken@chromium.org>
3329
3330         Rename resolve-supplemental.pl to preprocess-idls.pl
3331         https://bugs.webkit.org/show_bug.cgi?id=79660
3332
3333         Reviewed by Adam Barth.
3334
3335         Due to r108322, resolve-supplemental.pl not only resolves supplemental
3336         dependencies but also runs IDL attribute checker. For clarification,
3337         this patch renames resolve-supplemental.pl to preprocess-idls.pl.
3338
3339         No tests. Confirm that all builds pass.
3340
3341         * DerivedSources.make:
3342         * DerivedSources.pri:
3343         * GNUmakefile.am:
3344         * UseJSC.cmake:
3345         * UseV8.cmake:
3346         * WebCore.gyp/WebCore.gyp:
3347         * WebCore.vcproj/MigrateScripts:
3348         * WebCore.vcproj/WebCore.vcproj:
3349         * WebCore.xcodeproj/project.pbxproj:
3350         * bindings/scripts/preprocess-idls.pl: Renamed from Source/WebCore/bindings/scripts/resolve-supplemental.pl.
3351
3352 2012-02-27  Kentaro Hara  <haraken@chromium.org>
3353
3354         [JSC] Add [ConstructorParameters=] to all custom constructors
3355         https://bugs.webkit.org/show_bug.cgi?id=78221
3356
3357         Reviewed by Adam Barth.
3358
3359         This patch adds [ConstructorParameters=X] to IDL files that have
3360         custom constructors, where X is the maximum number of arguments
3361         of the constructor. [ConstructorParameters=X] is needed for custom
3362         constructors, because custom constructors do not have a signature
3363         in IDL files and thus CodeGeneratorJS.pm cannot know the number of
3364         constructor arguments.
3365
3366         Test: fast/js/constructor-length.html
3367
3368         * dom/WebKitMutationObserver.idl:
3369         * html/DOMFormData.idl:
3370         * html/canvas/ArrayBuffer.idl:
3371         * html/canvas/DataView.idl:
3372         * html/canvas/Float32Array.idl:
3373         * html/canvas/Float64Array.idl:
3374         * html/canvas/Int16Array.idl:
3375         * html/canvas/Int32Array.idl:
3376         * html/canvas/Int8Array.idl:
3377         * html/canvas/Uint16Array.idl:
3378         * html/canvas/Uint32Array.idl:
3379         * html/canvas/Uint8Array.idl:
3380         * html/canvas/Uint8ClampedArray.idl:
3381         * webaudio/AudioContext.idl:
3382
3383         * bindings/scripts/test/TestTypedArray.idl:
3384
3385         * bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests results.
3386         (WebCore::JSFloat64ArrayConstructor::finishCreation):
3387
3388 2012-02-23  Raphael Kubo da Costa  <kubo@profusion.mobi>
3389
3390         [BlackBerry][EFL] Provide dummy RunLoop implementations.
3391         https://bugs.webkit.org/show_bug.cgi?id=79398
3392
3393         Reviewed by Antonio Gomes.
3394
3395         r108067 fixed the EFL build by not building RunLoop.cpp on EFL and
3396         BlackBerry, as both platforms lack an implementation that provides the
3397         missing methods for the RunLoop class.
3398
3399         However, RunLoop.cpp is a generic file which should not be included
3400         directly in PlatformWinCE.cmake (plus it helps in converting the
3401         AppleWin port to CMake).
3402
3403         Fix this by providing a dummy implementation of the missing RunLoop
3404         methods for both EFL and BlackBerry.
3405
3406         * CMakeLists.txt:
3407         * PlatformBlackBerry.cmake:
3408         * PlatformEfl.cmake:
3409         * PlatformWinCE.cmake:
3410         * platform/blackberry/RunLoopBlackBerry.cpp: Added.
3411         (WebCore):
3412         (WebCore::RunLoop::RunLoop):
3413         (WebCore::RunLoop::~RunLoop):
3414         (WebCore::RunLoop::wakeUp):
3415         * platform/efl/RunLoopEfl.cpp: Added.
3416         (WebCore):
3417         (WebCore::RunLoop::RunLoop):
3418         (WebCore::RunLoop::~RunLoop):
3419         (WebCore::RunLoop::wakeUp):
3420
3421 2012-02-27  John Sullivan  <sullivan@apple.com>
3422
3423         Build fix (on Lion at least).
3424
3425         * dom/Attr.cpp:
3426         (WebCore::Attr::childrenChanged):
3427         Removed names of unused parameters.
3428         
3429         * dom/ContainerNode.cpp:
3430         (WebCore::ContainerNode::childrenChanged):
3431         Ditto.
3432
3433 2012-02-27  Kentaro Hara  <haraken@chromium.org>
3434
3435         Remove [ConstructorParameters] from IDL files that have [Constructor]
3436         https://bugs.webkit.org/show_bug.cgi?id=79643
3437
3438         Reviewed by Adam Barth.
3439
3440         This patch removes [ConstructorParameters] from IDL files that have [Constructor],
3441         since CodeGeneratorJS.pm can automatically detect the number of constructor
3442         arguments by the [Constructor(...)] signature.
3443
3444         Test: fast/js/constructor-length.html
3445
3446         * Modules/mediastream/PeerConnection.idl:
3447         * bindings/scripts/CodeGeneratorJS.pm:
3448         (GenerateConstructorDefinition):
3449         * css/WebKitCSSMatrix.idl:
3450         * page/EventSource.idl:
3451         * workers/SharedWorker.idl:
3452         * workers/Worker.idl:
3453
3454 2012-02-27  Julien Chaffraix  <jchaffraix@webkit.org>
3455
3456         Avoid doing 2 hash lookups if we override RenderBox's logical width / height
3457         https://bugs.webkit.org/show_bug.cgi?id=79591
3458
3459         Reviewed by Antonio Gomes.
3460
3461         Refactoring only.
3462
3463         * rendering/RenderBox.cpp:
3464         (WebCore::RenderBox::clearOverrideSize):
3465         Instead of doing one hash lookup as part of hasOverride{Height|Width}, let's
3466         just directly call HashMap::remove that will do the lookup instead.
3467
3468 2012-02-27  Adam Klein  <adamk@chromium.org>
3469
3470         Move WebCore-internal DOM notification methods from Node to ContainerNode where appropriate
3471         https://bugs.webkit.org/show_bug.cgi?id=79697
3472
3473         Reviewed by Ryosuke Niwa.
3474
3475         insertedIntoTree/removedFromTree are only used by subclasses of
3476         ContainerNode. Moreover, attempting to make use of these notifications
3477         in a non-container Node would currently not work, because
3478         Node::removedFromDocument/insertedIntoDocument do not dispatch to these methods.
3479         Rather than adding useless calls to an always-empty virtual method,
3480         this patch moves these methods to ContainerNode.
3481
3482         Meanwhile, childrenChanged moves to ContainerNode for an obvious reason:
3483         non-container Nodes have no children to change.
3484
3485         No new tests, refactoring only.
3486
3487         * dom/Attr.cpp:
3488         (WebCore::Attr::childrenChanged): Remove call to now-nonexistent Node::childrenChanged.
3489         * dom/ContainerNode.cpp:
3490         (WebCore::ContainerNode::removeChild): Check that the removed child is a container node before notifying it of removal.
3491         (WebCore::ContainerNode::parserRemoveChild): ditto.
3492         (WebCore::ContainerNode::insertedIntoTree): Remove call to now-nonexistent Node::insertedIntoTree.
3493         (WebCore::ContainerNode::removedFromTree): Remove call to now-nonexistent Node::removedFromTree.
3494         (WebCore::ContainerNode::childrenChanged): Remove call to now-nonexistent Node::childrenChanged.
3495         (WebCore::notifyChildInserted): Check that the inserted child is a container node before&