fccaae236a32684583af7144b1eff19f75330384
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-12-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2
3         Unreviewed, rolling out r103169.
4         http://trac.webkit.org/changeset/103169
5         https://bugs.webkit.org/show_bug.cgi?id=74809
6
7         it broke compilation on many platforms (Requested by loislo_
8         on #webkit).
9
10         * WebCore.gypi:
11         * platform/ColorChooser.cpp: Renamed from Source/WebKit/chromium/src/ColorChooserProxy.h.
12         (WebCore::ColorChooserClient::~ColorChooserClient):
13         (WebCore::ColorChooserClient::newColorChooser):
14         (WebCore::ColorChooserClient::discardChooser):
15         (WebCore::ColorChooser::ColorChooser):
16         (WebCore::ColorChooser::create):
17         (WebCore::ColorChooser::~ColorChooser):
18         (WebCore::ColorChooser::didChooseColor):
19         (WebCore::ColorChooser::didCleanup):
20
21 2011-12-18  Alexandru Chiculita  <achicu@adobe.com>
22
23         [CSS Shaders] Add FECustomFilter that renders custom filters
24         https://bugs.webkit.org/show_bug.cgi?id=73317
25
26         Using a GraphicsContext3D to render the shaders in GPU, read the
27         result back and use it in the software filters pipeline.
28
29         Reviewed by Chris Marrin.
30
31         Test: css3/filters/effect-custom.html
32
33         * CMakeLists.txt:
34         * GNUmakefile.list.am:
35         * Target.pri:
36         * WebCore.gypi:
37         * WebCore.vcproj/WebCore.vcproj:
38         * WebCore.xcodeproj/project.pbxproj:
39         * loader/cache/CachedShader.cpp:
40         (WebCore::CachedShader::CachedShader):
41         (WebCore::CachedShader::shaderString):
42         (WebCore::CachedShader::data):
43         * loader/cache/CachedShader.h:
44         * platform/graphics/filters/CustomFilterMesh.cpp: Added.
45         (WebCore::MeshGenerator::MeshGenerator):
46         (WebCore::MeshGenerator::vertices):
47         (WebCore::MeshGenerator::indices):
48         (WebCore::MeshGenerator::points):
49         (WebCore::MeshGenerator::pointsCount):
50         (WebCore::MeshGenerator::tiles):
51         (WebCore::MeshGenerator::tilesCount):
52         (WebCore::MeshGenerator::indicesCount):
53         (WebCore::MeshGenerator::floatsPerVertex):
54         (WebCore::MeshGenerator::vertexCount):
55         (WebCore::MeshGenerator::addTile):
56         (WebCore::MeshGenerator::addAttachedMeshIndex):
57         (WebCore::MeshGenerator::generateAttachedMesh):
58         (WebCore::MeshGenerator::addDetachedMeshVertexAndIndex):
59         (WebCore::MeshGenerator::generateDetachedMesh):
60         (WebCore::MeshGenerator::addPositionAttribute):
61         (WebCore::MeshGenerator::addTexCoordAttribute):
62         (WebCore::MeshGenerator::addMeshCoordAttribute):
63         (WebCore::MeshGenerator::addTriangleCoordAttribute):
64         (WebCore::MeshGenerator::addAttachedMeshVertexAttributes):
65         (WebCore::MeshGenerator::addDetachedMeshVertexAttributes):
66         (WebCore::MeshGenerator::dumpBuffers):
67         (WebCore::CustomFilterMesh::CustomFilterMesh):
68         (WebCore::CustomFilterMesh::~CustomFilterMesh):
69         * platform/graphics/filters/CustomFilterMesh.h: Added.
70         (WebCore::CustomFilterMesh::create):
71         (WebCore::CustomFilterMesh::verticesBufferObject):
72         (WebCore::CustomFilterMesh::bytesPerVertex):
73         (WebCore::CustomFilterMesh::elementsBufferObject):
74         (WebCore::CustomFilterMesh::indicesCount):
75         (WebCore::CustomFilterMesh::meshBox):
76         (WebCore::CustomFilterMesh::meshType):
77         * platform/graphics/filters/CustomFilterShader.cpp: Added.
78         (WebCore::CustomFilterShader::defaultVertexShaderString):
79         (WebCore::CustomFilterShader::defaultFragmentShaderString):
80         (WebCore::CustomFilterShader::CustomFilterShader):
81         (WebCore::CustomFilterShader::~CustomFilterShader):
82         * platform/graphics/filters/CustomFilterShader.h: Added.
83         * platform/graphics/filters/FECustomFilter.cpp: Added.
84         (WebCore::orthoMatrix):
85         (WebCore::FECustomFilter::FECustomFilter):
86         (WebCore::FECustomFilter::create):
87         (WebCore::FECustomFilter::platformApplySoftware):
88         (WebCore::FECustomFilter::dump):
89         (WebCore::FECustomFilter::externalRepresentation):
90         * platform/graphics/filters/FECustomFilter.h: Added.
91         * platform/graphics/gpu/Texture.cpp:
92         * platform/graphics/transforms/TransformationMatrix.cpp:
93         (WebCore::TransformationMatrix::toColumnMajorFloatArray):
94         * platform/graphics/transforms/TransformationMatrix.h:
95         * rendering/FilterEffectObserver.h: Copied from Source/WebCore/loader/cache/CachedShader.cpp.
96         (WebCore::FilterEffectObserver::~FilterEffectObserver):
97         * rendering/FilterEffectRenderer.cpp:
98         (WebCore::isWebGLEnabled):
99         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
100         (WebCore::FilterEffectRenderer::build):
101         (WebCore::FilterEffectRenderer::notifyFinished):
102         * rendering/FilterEffectRenderer.h:
103         (WebCore::FilterEffectRenderer::create):
104         * rendering/RenderLayer.cpp:
105         (WebCore::RenderLayer::updateOrRemoveFilterEffect):
106         (WebCore::RenderLayer::filterNeedsRepaint):
107         * rendering/RenderLayer.h:
108         * rendering/style/StyleCachedShader.h:
109         (WebCore::StyleCachedShader::cachedShader):
110         * rendering/style/StyleShader.h:
111         (WebCore::StyleShader::cachedShader):
112
113 2011-12-18  Keishi Hattori  <keishi@webkit.org>
114
115         Implement <input type=color> UI WebKit chromium part
116         https://bugs.webkit.org/show_bug.cgi?id=65897
117
118         Reviewed by Darin Fisher.
119
120         * WebCore.gypi: Added ColorChooser.h and ColorChooserClient.h
121
122 2011-12-17  Keishi Hattori  <keishi@webkit.org>
123
124         Refactor input type color WebCore part
125         https://bugs.webkit.org/show_bug.cgi?id=74591
126
127         Reviewed by Kent Tamura.
128
129         Changing ColorChooser to address issues raised in Bug 65897.
130         Chrome::createColorChooser will return a WebCore::ColorChooser instance
131         so the WebCore side (ColorInputType) and call the WebKit side. We pass the ColorChooserClient as an argument
132         to Chrome::createColorChooser so the WebKit side can call callbacks, didEndChooser and didChooseColor.
133
134         * html/ColorInputType.cpp:
135         (WebCore::ColorInputType::~ColorInputType):
136         (WebCore::ColorInputType::setValue):
137         (WebCore::ColorInputType::handleDOMActivateEvent): Calls createColorChooser to open the color chooser.
138         (WebCore::ColorInputType::detach):
139         (WebCore::ColorInputType::didEndChooser): Release the ColorChooser object.
140         (WebCore::ColorInputType::endColorChooser):
141         (WebCore::ColorInputType::updateColorSwatch): Added argument so it will compile again.
142         * html/ColorInputType.h:
143         * html/HTMLInputElement.cpp:
144         (WebCore::HTMLInputElement::selectColorInColorChooser):
145         * loader/EmptyClients.h:
146         (WebCore::EmptyChromeClient::createColorChooser):
147         * loader/FrameLoader.cpp:
148         * page/Chrome.cpp:
149         (WebCore::Chrome::createColorChooser): Opens the color chooser. Returns a ColorChooser PassOwnPtr.
150         * page/Chrome.h:
151         * page/ChromeClient.h:
152         * platform/ColorChooser.h:
153         (WebCore::ColorChooser::~ColorChooser):
154         (WebCore::ColorChooser::setSelectedColor):
155         (WebCore::ColorChooser::endChooser):
156         * platform/ColorChooserClient.h: Added.
157
158 2011-12-17  Sam Weinig  <sam@webkit.org>
159
160         Make PlatformTouchEvent inherit from PlatformEvent
161         https://bugs.webkit.org/show_bug.cgi?id=74777
162
163         Reviewed by Andreas Kling.
164
165         * platform/PlatformEvent.h:
166         Add TouchEvent types.
167
168         * platform/PlatformTouchEvent.h:
169         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
170         Make inherit from PlatformEvent.
171
172         * platform/blackberry/PlatformTouchEventBlackBerry.cpp:
173         (WebCore::touchEventType):
174         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
175         * platform/efl/PlatformTouchEventEfl.cpp:
176         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
177         * platform/qt/PlatformTouchEventQt.cpp:
178         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
179         Make necessary changes to work with new base class.
180
181 2011-12-17  Andreas Kling  <kling@webkit.org>
182
183         Cache and reuse the HTMLAllCollection returned by document.all.
184         <http://webkit.org/b/74768>
185
186         Reviewed by Antti Koivisto.
187
188         Let Document cache the document.all collection, just like we do for
189         the other collections (.links, .images, etc.)
190         This is primarily a memory optimization, as repeated calls to
191         document.all will no longer cause collection objects to stack up.
192
193         Tests: fast/dom/document-collection-idempotence.html
194                fast/dom/gc-9.html
195
196         * dom/Document.h:
197         * dom/Document.cpp:
198         (WebCore::Document::all):
199
200             Cache the HTMLAllCollection and reuse it across calls instead of
201             creating a new one each time.
202
203         * html/HTMLAllCollection.h:
204         * html/HTMLAllCollection.cpp:
205         (WebCore::HTMLAllCollection::create):
206         (WebCore::HTMLAllCollection::HTMLAllCollection):
207
208             Make the HTMLAllCollection constructor take a Document* to enforce
209             the fact that it's the only way it should ever be created.
210
211         * html/HTMLAllCollection.idl:
212         * bindings/scripts/CodeGeneratorJS.pm:
213         (GenerateImplementation):
214
215             Custom reachability code for JSC, same as HTMLCollection.
216
217 2011-12-17  Andreas Kling  <kling@webkit.org>
218
219         HTMLCollection: Simplify itemAfter().
220         <http://webkit.org/b/74795>
221
222         Reviewed by Antti Koivisto.
223
224         Whether to do deep traversal of children depends on m_type which
225         doesn't change after construction, so move that decision there
226         by caching it in a "m_includeChildren" bit.
227
228         Also factored out the big switch statement in itemAfter() into
229         an isAcceptableElement() function.
230
231         Last and least, use fastHasAttribute() to check for itempropAttr
232         since it's not SVG animatable.
233
234         * html/HTMLCollection.cpp:
235         (WebCore::HTMLCollection::HTMLCollection):
236         (WebCore::HTMLCollection::shouldIncludeChildren):
237         (WebCore::HTMLCollection::isAcceptableElement):
238         (WebCore::HTMLCollection::itemAfter):
239         * html/HTMLCollection.h:
240
241 2011-12-17  Andreas Kling  <kling@webkit.org>
242
243         TagNodeList: Optimize nodeMatches() for the common case.
244         <http://webkit.org/b/74796>
245
246         Reviewed by Antti Koivisto.
247
248         Reject based on tag name mismatch before comparing the namespaces,
249         as this case is vastly more common.
250
251         nodeMatches() is very hot on the DOM Query (Dojo) test on Dromaeo.
252         This change takes it from 8.3% to 7.7% on my MBP.
253
254         * dom/TagNodeList.cpp:
255         (WebCore::TagNodeList::nodeMatches):
256
257 2011-12-17  Andreas Kling  <kling@webkit.org>
258
259         NameNodeList: Use fastGetAttribute() in nodeMatches().
260         <http://webkit.org/b/74797>
261
262         Reviewed by Darin Adler.
263
264         It's safe and slightly more efficient to use fastGetAttribute()
265         for HTMLNames::nameAttr here.
266
267         * dom/NameNodeList.cpp:
268         (WebCore::NameNodeList::nodeMatches):
269
270 2011-12-17  Andreas Kling  <kling@webkit.org>
271
272         CSSPrimitiveValue: Inline getIdent().
273         <http://webkit.org/b/74793>
274
275         Reviewed by Antti Koivisto.
276
277         Inline the trivial getIdent(), the same as its getFoo() siblings.
278
279         * css/CSSPrimitiveValue.cpp:
280         * css/CSSPrimitiveValue.h:
281         (WebCore::CSSPrimitiveValue::getIdent):
282
283 2011-12-17  Andreas Kling  <kling@webkit.org>
284
285         CSSStyleSelector: Clean up matchRules().
286         <http://webkit.org/b/74794>
287
288         Reviewed by Antti Koivisto.
289
290         - Early return from the isCollectingRulesOnly() path to reduce nesting.
291         - Move the creation of m_ruleList out of the loop that builds the list.
292         - Removed some comments from the Captain Obvious department.
293
294         * css/CSSStyleSelector.cpp:
295         (WebCore::CSSStyleSelector::matchRules):
296
297 2011-12-17  Andreas Kling  <kling@webkit.org>
298
299         RuleSet: Remove style sheet null-check in addRulesFromSheet().
300         <http://webkit.org/b/74792>
301
302         Reviewed by Antti Koivisto.
303
304         Replace the "sheet" null-check in addRulesFromSheet() by an assertion.
305         The only call-site where it could be null was when adding rules from
306         an @import'ed sheet, so add a check there instead.
307
308         * css/CSSStyleSelector.cpp:
309         (WebCore::RuleSet::addRulesFromSheet):
310
311 2011-12-17  Andreas Kling  <kling@webkit.org>
312
313         CSSStyleSelector: Clean up getColorFromPrimitiveValue().
314         <http://webkit.org/b/74789>
315
316         Reviewed by Antti Koivisto.
317
318         Rename getColorFromPrimitiveValue() to colorFromPrimitiveValue() and rework
319         it to be a bit more readable.
320
321         * css/CSSGradientValue.cpp:
322         (WebCore::CSSGradientValue::addStops):
323         * css/CSSStyleApplyProperty.cpp:
324         (WebCore::ApplyPropertyColor::applyValue):
325         * css/CSSStyleSelector.cpp:
326         (WebCore::CSSStyleSelector::applyProperty):
327         (WebCore::CSSStyleSelector::colorFromPrimitiveValue):
328         (WebCore::CSSStyleSelector::createFilterOperations):
329         * css/CSSStyleSelector.h:
330         * css/SVGCSSStyleSelector.cpp:
331         (WebCore::CSSStyleSelector::applySVGProperty):
332
333 2011-12-17  Kenichi Ishibashi  <bashi@chromium.org>
334
335         Text dispappear when SVG font has no latin character
336         https://bugs.webkit.org/show_bug.cgi?id=71765
337
338         Reviewed by Nikolas Zimmermann.
339
340         Initialize SVG font metrics even if the font doesn't contain latin characters.
341
342         Test: svg/custom/svg-fonts-no-latin-glyph.html
343
344         * svg/SVGFontData.cpp:
345         (WebCore::SVGFontData::initializeFontData): Initializes metrics even if the zeroGlyphPage doesn't exist.
346
347 2011-12-17  David Barton  <dbarton@mathscribe.com>
348
349         Radical sign drawn incorrectly due to refactoring typo
350         https://bugs.webkit.org/show_bug.cgi?id=74780
351
352         Reviewed by Dan Bernstein.
353
354         LayoutTests/mathml/presentation/roots.xhtml shows the bug, but apparently its .png
355         checksum is ok so run-webkit-tests can't detect the problem.
356
357         * rendering/mathml/RenderMathMLRoot.cpp:
358         (WebCore::RenderMathMLRoot::paint):
359         In revision 88250, one paintOffset should have been adjustedPaintOffset.
360
361 2011-12-17  Adrienne Walker  <enne@google.com>
362
363         [chromium] Reverting r103011, r103135 due to Aura test failures
364
365         Unreviewed gardening.
366
367         * platform/graphics/chromium/ContentLayerChromium.cpp:
368         (WebCore::ContentLayerChromium::~ContentLayerChromium):
369         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
370         (WebCore::GraphicsLayerChromium::notifySyncRequired):
371         * platform/graphics/chromium/GraphicsLayerChromium.h:
372         * platform/graphics/chromium/ImageLayerChromium.cpp:
373         (WebCore::ImageLayerChromium::paintContentsIfDirty):
374         * platform/graphics/chromium/LayerChromium.cpp:
375         (WebCore::LayerChromium::setLayerTreeHost):
376         (WebCore::LayerChromium::setNeedsCommit):
377         (WebCore::LayerChromium::setParent):
378         (WebCore::LayerChromium::setMaskLayer):
379         * platform/graphics/chromium/LayerChromium.h:
380         (WebCore::LayerChromium::setReplicaLayer):
381         * platform/graphics/chromium/TiledLayerChromium.cpp:
382         (WebCore::TiledLayerChromium::setLayerTreeHost):
383         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
384         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
385         (WebCore::CCLayerTreeHost::didRecreateGraphicsContext):
386         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
387         (WebCore::CCLayerTreeHost::paintLayerContents):
388         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
389         (WebCore::CCLayerTreeHost::setRootLayer):
390
391 2011-12-16  Chris Marrin  <cmarrin@apple.com>
392
393         Hardware acceleration of W3C Filter Effects
394         https://bugs.webkit.org/show_bug.cgi?id=68479
395
396         Reviewed by Simon Fraser.
397
398         Tests: css3/filters/effect-blur-hw.html
399                css3/filters/effect-combined-hw.html
400                css3/filters/effect-drop-shadow-hw.html
401                css3/filters/effect-grayscale-hw.html
402                css3/filters/effect-hue-rotate-hw.html
403                css3/filters/effect-invert-hw.html
404                css3/filters/effect-opacity-hw.html
405                css3/filters/effect-saturate-hw.html
406                css3/filters/effect-sepia-hw.html
407
408         Implement hardware acceleration of filters. If a filter is
409         on a RenderLayer and that layer has a GraphicsLayer, a test
410         is done to see if the desired filter can be rendered in hardware.
411         If so, skip rendering it when painting, and add the filters to the
412         CALayer. Currently Mac only, using CoreImage. Animation is done in
413         software, with the filters being recreated every frame. There are
414         some fidelity issues with the software renderer, but those will
415         be dealt with as bugs to be fixed.
416
417         * platform/graphics/GraphicsLayer.h: Pass down FilterOperations
418         (WebCore::GraphicsLayer::filter):
419         (WebCore::GraphicsLayer::setFilter):
420         * platform/graphics/ca/GraphicsLayerCA.cpp: Deferred passdown of FilterOperations to PlatformCALayer
421         (WebCore::GraphicsLayerCA::setFilter):
422         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
423         (WebCore::GraphicsLayerCA::updateFilter):
424         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
425         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
426         * platform/graphics/ca/GraphicsLayerCA.h:
427         * platform/graphics/ca/PlatformCALayer.h:
428         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Mac implementation using CI
429         (PlatformCALayer::setFilter):
430         (PlatformCALayer::filterCanBeComposited): Static function to tell GraphicsLayer if this Filter object can be rendered
431         * platform/graphics/filters/FilterOperations.cpp:
432         (WebCore::FilterOperations::operator=):
433         * platform/graphics/filters/FilterOperations.h:
434         (WebCore::FilterOperations::FilterOperations):
435         * rendering/RenderLayer.cpp: Pass filter object to GraphicsLayer
436         (WebCore::RenderLayer::rendersFilter):
437         (WebCore::RenderLayer::paintLayer):
438         (WebCore::RenderLayer::updateOrRemoveFilterEffect):
439         * rendering/RenderLayer.h:
440         * rendering/RenderLayerBacking.cpp:
441         (WebCore::RenderLayerBacking::RenderLayerBacking):
442         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
443         (WebCore::RenderLayerBacking::updateLayerFilter):
444         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
445         * rendering/RenderLayerBacking.h:
446         (WebCore::RenderLayerBacking::canCompositeFilter):
447
448 2011-12-17  Philippe Normand  <pnormand@igalia.com>
449
450         Unreviewed, GTK build fix after r103131.
451
452         * GNUmakefile.list.am: Fix typo... s/.cop/.cpp
453
454 2011-12-16  Benjamin Poulain  <bpoulain@apple.com>
455
456         FEComposite does not build when you disable filters on ARMv7
457         https://bugs.webkit.org/show_bug.cgi?id=74772
458
459         Reviewed by David Kilzer.
460
461         Add the missing ENABLE(FILTERS).
462
463         * platform/graphics/filters/arm/FECompositeArithmeticNEON.cpp:
464         * platform/graphics/filters/arm/FECompositeArithmeticNEON.h:
465
466 2011-12-16  Ryosuke Niwa  <rniwa@webkit.org>
467
468         Mac build fix after r103104.
469
470         * WebCore.xcodeproj/project.pbxproj:
471
472 2011-12-16  Adam Klein  <adamk@chromium.org>
473
474         Consolidate before-advice regarding attribute modification into a single method
475         https://bugs.webkit.org/show_bug.cgi?id=74752
476
477         Reviewed by Ryosuke Niwa.
478
479         Adds a willModifyAttribute method to Element, meant to be called
480         before an attribute on that Element is added/removed/changed.
481
482         Replace most calls to Element::updateId and all calls to
483         Element::enqueueAttributesMutationRecordIfRequested with calls to
484         willModifyAttribute. Moreover, enqueueAttributesMutation... can now
485         be private since its only caller is willModifyAttribute.
486
487         The only remaining direct calls to updateId are in cases the entire
488         NamedNodeMap is being replaced. These are implementation details of
489         WebCore that shouldn't be exposed via MutationObservers.
490
491         No new tests, no expected change in behavior.
492
493         * dom/Attr.cpp:
494         (WebCore::Attr::setValue):
495         (WebCore::Attr::childrenChanged): Besides the above change, use a
496         StringBuilder to build up value, and only do String -> AtomicString
497         conversion once.
498         * dom/Element.cpp:
499         (WebCore::Element::setAttributeInternal):
500         * dom/Element.h:
501         (WebCore::Element::willModifyAttribute):
502         * dom/NamedNodeMap.cpp:
503         (WebCore::NamedNodeMap::setNamedItem):
504         (WebCore::NamedNodeMap::removeNamedItem):
505
506 2011-12-16  James Robinson  <jamesr@chromium.org>
507
508         [chromium] CCLayerDelegate and WebLayerClient do not need notifySyncRequired
509         https://bugs.webkit.org/show_bug.cgi?id=74376
510
511         Reviewed by Kenneth Russell.
512
513         CCLayerDelegate::notifySyncRequired is an odd bit of interface that we originally cargo-culted from the
514         CoreAnimation compositor implementation. It is a mechanism by which a LayerChromium instance may request a new
515         frame via its CCLayerDelegate, which in WebCore is always a GraphicsLayerClient. In practice, all
516         implementations eventually ended up routing to CCLayerTreeHost::setNeedsCommit which then made the proper
517         scheduling decision.
518
519         This patch routes all changes that would have gone through CCLayerDelegate::notifySyncRequired directly to
520         CCLayerTreeHost::setNeedsCommit, which greatly simplifies the scheduling logic.
521
522         There is a large amount of unit test coverage for this change, largely in LayerChromiumTest
523
524         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
525         * platform/graphics/chromium/GraphicsLayerChromium.h:
526         * platform/graphics/chromium/LayerChromium.cpp:
527         (WebCore::LayerChromium::setNeedsCommit):
528         (WebCore::LayerChromium::insertChild):
529         * platform/graphics/chromium/LayerChromium.h:
530         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
531         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
532         (WebCore::CCLayerTreeHost::setRootLayer):
533         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
534         * platform/graphics/chromium/cc/CCScopedThreadProxy.h:
535         (WebCore::CCScopedThreadProxy::runTaskIfNotShutdown):
536
537 2011-12-16  Adam Klein  <adamk@chromium.org>
538
539         Fix typo in MarkupTokenBase: rename takeAtributes to takeAttributes
540         https://bugs.webkit.org/show_bug.cgi?id=74766
541
542         Reviewed by Darin Adler.
543
544         * html/parser/HTMLConstructionSite.cpp:
545         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
546         (WebCore::HTMLConstructionSite::insertScriptElement):
547         (WebCore::HTMLConstructionSite::createElement):
548         (WebCore::HTMLConstructionSite::createHTMLElement):
549         * html/parser/HTMLTreeBuilder.cpp:
550         (WebCore::HTMLTreeBuilder::attributesForIsindexInput):
551         * xml/parser/MarkupTokenBase.h:
552         (WebCore::AtomicMarkupTokenBase::takeAttributes):
553
554 2011-12-16  Adam Barth  <abarth@webkit.org>
555
556         <option><span><option> doesn't parse correctly
557         https://bugs.webkit.org/show_bug.cgi?id=74760
558
559         Reviewed by Eric Seidel.
560
561         The <option> start tag shouldn't be quite as aggressive in closing open
562         <option> tags.  I'm not sure whether this was a change in the spec or a
563         mistranscription, but this patch causes us to match the spec.  I've
564         checked the other optionTag checks, and they all seem to be correct.
565
566         * html/parser/HTMLTreeBuilder.cpp:
567
568 2011-12-16  Rafael Weinstein  <rafaelw@chromium.org>
569
570         [MutationObservers] Remove platform-dependent code in Document.cpp resulting from Mutation Event histogram collection
571         https://bugs.webkit.org/show_bug.cgi?id=73026
572
573         Reviewed by Ryosuke Niwa.
574
575         This patch adds platform/HistogramSupport which has an empty implementation for all ports
576         except Chromium.
577
578         No tests need. This patch is just a refactor.
579
580         * GNUmakefile.list.am:
581         * Target.pri:
582         * WebCore.gypi:
583         * WebCore.xcodeproj/project.pbxproj:
584         * dom/Document.cpp:
585         (WebCore::histogramMutationEventUsage):
586         (WebCore::Document::~Document):
587         * platform/HistogramSupport.h: Added.
588         (WebCore::HistogramSupport::histogramEnumeration):
589         * platform/chromium/HistogramSupportChromium.cpp: Added.
590         (WebCore::HistogramSupport::histogramEnumeration):
591
592 2011-12-16  Brady Eidson  <beidson@apple.com>
593
594         <rdar://problem/10576732> and https://bugs.webkit.org/show_bug.cgi?id=74533
595         REGRESSION(r102619): Reproducible crash closing window with video + poster image inside an object element
596
597         Reviewed by Darin Adler.
598
599         Test: media/crash-closing-page-with-media-as-plugin-fallback.html
600
601         At some point documentWillBecomeInactive() was overloaded to not only notify elements they were going in to the page
602         cache but also do some other work that was necessary during Document teardown.
603
604         This crash occurs because we're notifying elements they're going in to the page cache at document teardown, so this
605         patch breaks that work back out in to a separate function.
606
607         * dom/Document.cpp:
608         (WebCore::Document::detach): Remove obsolete comment.
609         (WebCore::Document::documentWillBecomeInactive): Handle only accelerated compositing cleanup.
610         (WebCore::Document::documentWillSuspendForPageCache): Call documentWillBecomeInactive before notifying elements of suspension.
611         (WebCore::Document::documentDidResumeFromPageCache):
612         (WebCore::Document::registerForPageCacheSuspensionCallbacks):
613         (WebCore::Document::unregisterForPageCacheSuspensionCallbacks):
614         * dom/Document.h:
615
616         * history/CachedFrame.cpp:
617         (WebCore::CachedFrameBase::restore): Call the renamed documentDidResumeFromPageCache.
618         (WebCore::CachedFrame::CachedFrame): Call documentWillSuspendForPageCache instead of documentDidBecomeInactive.
619
620         * loader/FrameLoader.cpp:
621         (WebCore::FrameLoader::commitProvisionalLoad): Call the renamed documentDidResumeFromPageCache.
622
623         * dom/Element.h:
624         (WebCore::Element::documentWillSuspendForPageCache): Renamed from documentWillBecomeInactive()
625         (WebCore::Element::documentDidResumeFromPageCache): Renamed from documentDidBecomeActive()
626
627         Change to the renamed registration and callbacks functions in the handful of classes that use them:
628         * html/HTMLFormElement.cpp:
629         (WebCore::HTMLFormElement::~HTMLFormElement):
630         (WebCore::HTMLFormElement::parseMappedAttribute):
631         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
632         (WebCore::HTMLFormElement::willMoveToNewOwnerDocument):
633         (WebCore::HTMLFormElement::didMoveToNewOwnerDocument):
634         * html/HTMLFormElement.h:
635
636         * html/HTMLInputElement.cpp:
637         (WebCore::HTMLInputElement::~HTMLInputElement):
638         (WebCore::HTMLInputElement::updateType):
639         (WebCore::HTMLInputElement::parseMappedAttribute):
640         (WebCore::HTMLInputElement::needsSuspensionCallback):
641         (WebCore::HTMLInputElement::registerForSuspensionCallbackIfNeeded):
642         (WebCore::HTMLInputElement::unregisterForSuspensionCallbackIfNeeded):
643         (WebCore::HTMLInputElement::documentDidResumeFromPageCache):
644         (WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
645         (WebCore::HTMLInputElement::didMoveToNewOwnerDocument):
646         * html/HTMLInputElement.h:
647
648         * html/HTMLPlugInImageElement.cpp:
649         (WebCore::HTMLPlugInImageElement::~HTMLPlugInImageElement):
650         (WebCore::HTMLPlugInImageElement::createRenderer):
651         (WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument):
652         (WebCore::HTMLPlugInImageElement::didMoveToNewOwnerDocument):
653         (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
654         (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
655         * html/HTMLPlugInImageElement.h:
656
657         * svg/SVGSVGElement.cpp:
658         (WebCore::SVGSVGElement::SVGSVGElement):
659         (WebCore::SVGSVGElement::~SVGSVGElement):
660         (WebCore::SVGSVGElement::willMoveToNewOwnerDocument):
661         (WebCore::SVGSVGElement::didMoveToNewOwnerDocument):
662         (WebCore::SVGSVGElement::documentWillSuspendForPageCache):
663         (WebCore::SVGSVGElement::documentDidResumeFromPageCache):
664         * svg/SVGSVGElement.h:
665
666 2011-12-16  Eric Penner  <epenner@google.com>
667
668         [chromium] Need to prepaint tiles in TiledLayerChromium
669         https://bugs.webkit.org/show_bug.cgi?id=72686
670
671         Reviewed by James Robinson.
672
673         Tests: TiledLayerChromiumTest (idlePaintOutOfMemory, pushIdlePaintTiles)
674
675         * platform/graphics/chromium/ContentLayerChromium.cpp:
676         (WebCore::ContentLayerChromium::idlePaintContentsIfDirty): added idle paint function
677         * platform/graphics/chromium/ContentLayerChromium.h: ditto
678         * platform/graphics/chromium/LayerChromium.h: ditto
679         (WebCore::LayerChromium::idlePaintContentsIfDirty): ditto
680         * platform/graphics/chromium/TextureManager.cpp:
681         (WebCore::TextureManager::protectTexture): removed assert for protecting a texture twice
682         * platform/graphics/chromium/TiledLayerChromium.cpp:
683         (WebCore::TiledLayerChromium::TiledLayerChromium):
684         (WebCore::TiledLayerChromium::cleanupResources):
685         (WebCore::TiledLayerChromium::updateCompositorResources): refactoring to use tile indices
686         (WebCore::TiledLayerChromium::prepareToUpdateTiles): refactored common code and made idle/visible versions
687         (WebCore::TiledLayerChromium::prepareToUpdate): ditto
688         (WebCore::TiledLayerChromium::prepareToUpdateIdle): ditto
689         (WebCore::TiledLayerChromium::needsIdlePaint): 
690         (WebCore::TiledLayerChromium::idlePaintRect):
691         * platform/graphics/chromium/TiledLayerChromium.h:
692         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
693         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
694         (WebCore::CCLayerTreeHost::compositeAndReadback): set flag to avoid idle paint durring composite and readback
695         (WebCore::CCLayerTreeHost::updateLayers): added idle flag parameter
696         (WebCore::CCLayerTreeHost::paintContentsIfDirty): ditto
697         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface): ditto
698         (WebCore::CCLayerTreeHost::paintLayerContents): chooses idle or visible paint
699         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
700
701 2011-12-16  Dean Jackson  <dino@apple.com>
702
703         Miscellaneous Filter updates to align with spec
704         https://bugs.webkit.org/show_bug.cgi?id=74736
705
706         Reviewed by Simon Fraser.
707
708         Combine a bunch of small updates to filters where
709         we were not compliant with the specification.
710
711         - blur() only takes one value, not two
712         - blur() does not accept percentages. This allowed us
713           to stop passing the borderBoxSize around while building
714           the filter chain or calculating visual overflow.
715         - gamma() and sharpen() removed
716         - brightness() and contrast() added
717
718         Tests: css3/filters/effect-brightness.html
719                css3/filters/effect-contrast.html
720
721         * css/CSSComputedStyleDeclaration.cpp:
722         (WebCore::CSSComputedStyleDeclaration::valueForFilter): Create new
723         variations on component transfer functions for brightness() and
724         contrast() effects. Also remove sharpen() and gamma().
725         * css/CSSParser.cpp:
726         (WebCore::filterInfoForName):
727         (WebCore::CSSParser::parseBuiltinFilterArguments): Ditto, and blur
728         only takes one argument.
729         * css/CSSStyleSelector.cpp:
730         (WebCore::filterOperationForType):
731         (WebCore::CSSStyleSelector::createFilterOperations): Ditto, and
732         use ->isPercentage() to test rather than getting the type.
733         * css/WebKitCSSFilterValue.cpp:
734         (WebCore::WebKitCSSFilterValue::customCssText):
735         * css/WebKitCSSFilterValue.h:
736         * css/WebKitCSSFilterValue.idl: Remove sharpen and gamma, add
737         brightness and contrast.
738         * platform/graphics/filters/FilterOperation.cpp:
739         (WebCore::BlurFilterOperation::blend): Blurs only need to blend
740         between one standard deviation parameter.
741         * platform/graphics/filters/FilterOperation.h: Remove sharpen and
742         gamma, add brightness and contrast.
743         (WebCore::BlurFilterOperation::create):
744         (WebCore::BlurFilterOperation::stdDeviation):
745         (WebCore::BlurFilterOperation::operator==):
746         (WebCore::BlurFilterOperation::BlurFilterOperation): Blur only takes
747         one standard deviation / radius parameter.
748         * platform/graphics/filters/FilterOperations.cpp:
749         (WebCore::outsetSizeForBlur):
750         (WebCore::FilterOperations::getOutsets): No need for borderBox now.
751         * platform/graphics/filters/FilterOperations.h:
752         * rendering/FilterEffectRenderer.cpp:
753         (WebCore::FilterEffectRenderer::build): Build new effect types.
754         * rendering/FilterEffectRenderer.h:
755         * rendering/RenderBox.cpp:
756         (WebCore::RenderBox::addVisualEffectOverflow): No need to pass
757         borderBox size when calculating overflow on filter.
758         * rendering/RenderLayer.cpp:
759         (WebCore::RenderLayer::updateOrRemoveFilterEffect):
760         * rendering/style/RenderStyle.h:
761         (WebCore::InheritedFlags::getFilterOutsets): Ditto.
762
763 2011-12-16  Andreas Kling  <kling@webkit.org>
764
765         Unreviewed debug build fix after r103115.
766
767         * dom/Document.cpp:
768         (WebCore::Document::cachedCollection):
769
770 2011-12-16  Mark Hahnenberg  <mhahnenberg@apple.com>
771
772         Windows test fix
773
774         No new tests.
775
776         Unreviewed test fix. All Windows tests were crashing when objects who were pointing to 
777         static data members across DLL boundaries were getting garbage in their pointers.
778
779         * WebCore.exp.in:
780         * bindings/js/JSDOMWrapper.cpp:
781         * bindings/js/JSDOMWrapper.h:
782
783 2011-12-16  Ryosuke Niwa  <rniwa@webkit.org>
784
785         Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step
786         https://bugs.webkit.org/show_bug.cgi?id=74748
787
788         Reviewed by Eric Seidel.
789
790         Renamed registerCommandForUndo and registerCommandForRedo to
791         registerUndoStep and registerRedoStep respectively.
792
793         * editing/Editor.cpp:
794         (WebCore::Editor::appliedEditing):
795         (WebCore::Editor::unappliedEditing):
796         (WebCore::Editor::reappliedEditing):
797         * loader/EmptyClients.h:
798         (WebCore::EmptyEditorClient::registerUndoStep):
799         (WebCore::EmptyEditorClient::registerRedoStep):
800         * page/EditorClient.h:
801
802 2011-12-16  Tim Horton  <timothy_horton@apple.com>
803
804         Canvas should respect backing store scale ratio when used as drawImage() source
805         https://bugs.webkit.org/show_bug.cgi?id=74758
806         <rdar://problem/10350194>
807
808         Reviewed by Simon Fraser.
809
810         Interpret the source rectangle passed into drawImage() when using a Canvas source in the source Canvas coordinate space,
811         instead of in the backing store coordinate space, without changing the behavior of drawImage(canvas, x, y).
812
813         No new tests.
814
815         * html/HTMLCanvasElement.cpp:
816         (WebCore::HTMLCanvasElement::convertDeviceToLogical):
817         * html/HTMLCanvasElement.h:
818         * html/canvas/CanvasRenderingContext2D.cpp:
819         (WebCore::CanvasRenderingContext2D::drawImage):
820
821 2011-12-16  Anders Carlsson  <andersca@apple.com>
822
823         Subpixel antialiasing not working in tiled mode
824         https://bugs.webkit.org/show_bug.cgi?id=74759
825
826         Reviewed by Simon Fraser.
827
828         Call setContentsOpaque(true) on the main frame render view layer so subpixel aa will be used
829         when drawing text into that layer.
830
831         * rendering/RenderLayerBacking.cpp:
832         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
833
834 2011-12-16  Ryosuke Niwa  <rniwa@webkit.org>
835
836         invalidateNodeListsCacheAfterAttributeChanged has too many callers
837         https://bugs.webkit.org/show_bug.cgi?id=74692
838
839         Reviewed by Sam Weinig.
840
841         Call invalidateNodeListsCacheAfterAttributeChanged in Element::updateAfterAttributeChanged instead of
842         parsedMappedAttribute of various elements. Also make invalidateNodeListsCacheAfterAttributeChanged take
843         the qualified name of the changed attribute so that we can exit early when the changed attribute isn't
844         one of attributes we care.
845
846         In addition, added a missing call to invalidateNodeListsCacheAfterAttributeChanged in Attr::setValue.
847
848         Test: fast/dom/Attr/invalidate-nodelist-after-attr-setvalue.html
849
850         * dom/Attr.cpp:
851         (WebCore::Attr::childrenChanged):
852         * dom/Element.cpp:
853         (WebCore::Element::updateAfterAttributeChanged):
854         * dom/NamedNodeMap.cpp:
855         (WebCore::NamedNodeMap::addAttribute):
856         (WebCore::NamedNodeMap::removeAttribute):
857         * dom/Node.cpp:
858         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
859         * dom/Node.h:
860         * dom/StyledElement.cpp:
861         (WebCore::StyledElement::classAttributeChanged):
862         * html/HTMLAnchorElement.cpp:
863         (WebCore::HTMLAnchorElement::parseMappedAttribute):
864         * html/HTMLAppletElement.cpp:
865         (WebCore::HTMLAppletElement::parseMappedAttribute):
866         * html/HTMLElement.cpp:
867         (WebCore::HTMLElement::parseMappedAttribute):
868         * html/HTMLEmbedElement.cpp:
869         (WebCore::HTMLEmbedElement::parseMappedAttribute):
870         * html/HTMLFormElement.cpp:
871         (WebCore::HTMLFormElement::parseMappedAttribute):
872         * html/HTMLFrameElementBase.cpp:
873         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
874         * html/HTMLIFrameElement.cpp:
875         (WebCore::HTMLIFrameElement::parseMappedAttribute):
876         * html/HTMLImageElement.cpp:
877         (WebCore::HTMLImageElement::parseMappedAttribute):
878         * html/HTMLMapElement.cpp:
879         (WebCore::HTMLMapElement::parseMappedAttribute):
880         * html/HTMLMetaElement.cpp:
881         (WebCore::HTMLMetaElement::parseMappedAttribute):
882         * html/HTMLObjectElement.cpp:
883         (WebCore::HTMLObjectElement::parseMappedAttribute):
884         * html/HTMLParamElement.cpp:
885         (WebCore::HTMLParamElement::parseMappedAttribute):
886
887 2011-12-16  Andreas Kling  <kling@webkit.org>
888
889         Cache and reuse HTMLCollections exposed by Document.
890         <http://webkit.org/b/71956>
891
892         Reviewed by Antti Koivisto.
893
894         Let Document cache the various HTMLCollection objects it exposes.
895         This is a behavior change in two ways:
896
897         1) The lifetime of returned collections is now tied to the lifetime
898            of the Document. This matches the behavior of Firefox and Opera.
899
900         2) The cached collections returned by document are now exactly equal
901            to those returned by subsequent calls to the same getters.
902
903         This reduces memory consumption by ~800 kB (on 64-bit) when loading
904         the full HTML5 spec. document.links was called 34001 times, yielding
905         34001 separate HTMLCollections, and now we only need 1.
906
907         The document.all collection retains the old behavior, as caching it
908         will be a bit more complicated.
909
910         To avoid a reference cycle between Document and HTMLCollection,
911         collections that are cached on Document do not retained their base
912         node pointer (controlled by a m_baseIsRetained flag.)
913
914         Tests: fast/dom/document-collection-idempotence.html
915                fast/dom/gc-9.html
916
917         * dom/Document.cpp:
918         (WebCore::Document::detach):
919         (WebCore::Document::cachedCollection):
920         (WebCore::Document::images):
921         (WebCore::Document::applets):
922         (WebCore::Document::embeds):
923         (WebCore::Document::plugins):
924         (WebCore::Document::objects):
925         (WebCore::Document::scripts):
926         (WebCore::Document::links):
927         (WebCore::Document::forms):
928         (WebCore::Document::anchors):
929         * dom/Document.h:
930         * html/HTMLCollection.cpp:
931         (WebCore::HTMLCollection::HTMLCollection):
932         (WebCore::HTMLCollection::createForCachingOnDocument):
933         (WebCore::HTMLCollection::~HTMLCollection):
934         (WebCore::HTMLCollection::itemAfter):
935         * html/HTMLCollection.h:
936         (WebCore::HTMLCollection::base):
937
938 2011-12-16  Anders Carlsson  <andersca@apple.com>
939
940         Add a pretty dumb tile cache to WebTileCacheLayer
941         https://bugs.webkit.org/show_bug.cgi?id=74753
942
943         Reviewed by Simon Fraser.
944
945         * WebCore.xcodeproj/project.pbxproj:
946         * platform/graphics/ca/GraphicsLayerCA.cpp:
947         (WebCore::GraphicsLayerCA::requiresTiledLayer):
948         If a layer is a tile cache layer, we never want to swap it out for a tiled layer.
949
950         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
951         Assert that we don't have a tile cache layer.
952
953         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
954         (PlatformCALayer::PlatformCALayer):
955         If we have a tile cache layer, add its tile container to the list of custom sublayers.
956
957         * platform/graphics/ca/mac/TileCache.h: Added.
958         (WebCore::TileCache::tileContainerLayer):
959         Return the tile container layer.
960
961         * platform/graphics/ca/mac/TileCache.mm: Added.
962         (WebCore::TileCache::tileCacheLayerBoundsChanged):
963         Resize the tile grid if necessary.
964
965         (WebCore::TileCache::setNeedsDisplayInRect):
966         Invalidate the necessary tiles.
967
968         (WebCore::TileCache::drawLayer):
969         Set up the transform and draw the layer.
970
971         (WebCore::TileCache::getTileRangeForRect):
972         Given a rect, return the range of tiles that it covers.
973
974         (WebCore::TileCache::numTilesForGridSize):
975         Given a size, return how many tiles are needed to completely cover it.
976
977         (WebCore::TileCache::resizeTileGrid):
978         Create new tile layers if needed, or reuse already existing ones.
979
980         (WebCore::TileCache::tileLayerAtPosition):
981         Given a position in the grid, return the tile layer.
982
983         (WebCore::TileCache::createTileLayer):
984         Create a WebTileLayer and set it up.
985
986         * platform/graphics/ca/mac/WebTileCacheLayer.h:
987         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
988         (-[WebTileCacheLayer setBounds:]):
989         (-[WebTileCacheLayer setNeedsDisplayInRect:]):
990         (-[WebTileCacheLayer tileContainerLayer]):
991         Call down to the tile cache object.
992
993         * platform/graphics/ca/mac/WebTileLayer.h: Added.
994         * platform/graphics/ca/mac/WebTileLayer.mm: Added.
995
996         (-[WebTileLayer drawInContext:]):
997         Ask the tile cache to draw the given layer.
998
999         (-[WebTileLayer setTileCache:WebCore::]):
1000
1001 2011-12-16  Sam Weinig  <sam@webkit.org>
1002
1003         Give PlatformEvents a base class
1004         https://bugs.webkit.org/show_bug.cgi?id=74685
1005
1006         Reviewed by Anders Carlsson.
1007
1008         Add a base class for PlatformMouseEvent, PlatformKeyboardEvent, PlatformWheelEvent
1009         and PlatformGestureEvent and move Type enumeration and modifiers down to it.
1010
1011         * CMakeLists.txt:
1012         * GNUmakefile.list.am:
1013         * Target.pri:
1014         * WebCore.exp.in:
1015         * WebCore.gypi:
1016         * WebCore.vcproj/WebCore.vcproj:
1017         * WebCore.xcodeproj/project.pbxproj:
1018         Add new files.
1019
1020         * platform/PlatformEvent.cpp: Added.
1021         * platform/PlatformEvent.h: Added.
1022         (WebCore::PlatformEvent::type):
1023         (WebCore::PlatformEvent::shiftKey):
1024         (WebCore::PlatformEvent::ctrlKey):
1025         (WebCore::PlatformEvent::altKey):
1026         (WebCore::PlatformEvent::metaKey):
1027         (WebCore::PlatformEvent::modifiers):
1028         (WebCore::PlatformEvent::PlatformEvent):
1029         Add new class.
1030
1031         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
1032         (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
1033         * dom/KeyboardEvent.cpp:
1034         (WebCore::eventTypeForKeyboardEventType):
1035         * dom/MouseEvent.cpp:
1036         (WebCore::MouseEvent::create):
1037         * page/DragController.cpp:
1038         (WebCore::createMouseEvent):
1039         * page/EventHandler.cpp:
1040         (WebCore::EventHandler::handleGestureEvent):
1041         (WebCore::EventHandler::sendContextMenuEventForKey):
1042         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
1043         (WebCore::EventHandler::handleAccessKey):
1044         (WebCore::EventHandler::keyEvent):
1045         (WebCore::EventHandler::handleDrag):
1046         * page/blackberry/EventHandlerBlackBerry.cpp:
1047         (WebCore::EventHandler::accessKeyModifiers):
1048         * page/chromium/EventHandlerChromium.cpp:
1049         (WebCore::EventHandler::accessKeyModifiers):
1050         * page/efl/EventHandlerEfl.cpp:
1051         (WebCore::EventHandler::accessKeyModifiers):
1052         * page/gtk/EventHandlerGtk.cpp:
1053         (WebCore::EventHandler::accessKeyModifiers):
1054         * page/mac/EventHandlerMac.mm:
1055         (WebCore::EventHandler::accessKeyModifiers):
1056         * page/qt/EventHandlerQt.cpp:
1057         (WebCore::EventHandler::accessKeyModifiers):
1058         * page/win/EventHandlerWin.cpp:
1059         (WebCore::EventHandler::accessKeyModifiers):
1060         * page/wx/EventHandlerWx.cpp:
1061         (WebCore::EventHandler::accessKeyModifiers):
1062         * platform/PlatformGestureEvent.h:
1063         (WebCore::PlatformGestureEvent::PlatformGestureEvent):
1064         * platform/PlatformKeyboardEvent.h:
1065         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1066         (WebCore::PlatformKeyboardEvent::isKeypad):
1067         * platform/PlatformMouseEvent.h:
1068         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1069         (WebCore::PlatformMouseEvent::button):
1070         * platform/PlatformWheelEvent.h:
1071         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1072         * platform/ScrollAnimatorNone.cpp:
1073         (WebCore::ScrollAnimatorNone::zoom):
1074         (WebCore::ScrollAnimatorNone::handleGestureEvent):
1075         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
1076         (WebCore::toWebCorePlatformKeyboardEventType):
1077         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1078         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1079         * platform/chromium/GestureRecognizerChromium.cpp:
1080         (WebCore::GestureRecognizerChromium::appendTapDownGestureEvent):
1081         (WebCore::GestureRecognizerChromium::appendClickGestureEvent):
1082         (WebCore::GestureRecognizerChromium::appendDoubleClickGestureEvent):
1083         (WebCore::GestureRecognizerChromium::appendScrollGestureBegin):
1084         (WebCore::GestureRecognizerChromium::appendScrollGestureEnd):
1085         (WebCore::GestureRecognizerChromium::appendScrollGestureUpdate):
1086         * platform/chromium/PlatformKeyboardEventChromium.cpp:
1087         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1088         * platform/chromium/PopupContainer.cpp:
1089         (WebCore::PopupContainer::handleGestureEvent):
1090         * platform/chromium/PopupListBox.cpp:
1091         (WebCore::isCharacterTypeEvent):
1092         (WebCore::PopupListBox::handleKeyEvent):
1093         * platform/chromium/ScrollAnimatorChromiumMac.mm:
1094         (WebCore::ScrollAnimatorChromiumMac::handleGestureEvent):
1095         * platform/efl/PlatformKeyboardEventEfl.cpp:
1096         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1097         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1098         * platform/efl/PlatformMouseEventEfl.cpp:
1099         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1100         * platform/efl/PlatformWheelEventEfl.cpp:
1101         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1102         * platform/gtk/PlatformKeyboardEventGtk.cpp:
1103         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1104         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1105         * platform/gtk/PlatformMouseEventGtk.cpp:
1106         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1107         * platform/gtk/PlatformWheelEventGtk.cpp:
1108         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1109         * platform/ios/KeyEventIOS.mm:
1110         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1111         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1112         * platform/mac/KeyEventMac.mm:
1113         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1114         * platform/mac/PlatformMouseEventMac.mm:
1115         (WebCore::mouseEventForNSEvent):
1116         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1117         * platform/mac/ScrollAnimatorMac.mm:
1118         (WebCore::ScrollAnimatorMac::handleGestureEvent):
1119         * platform/mac/WheelEventMac.mm:
1120         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1121         * platform/qt/PlatformKeyboardEventQt.cpp:
1122         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1123         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1124         * platform/qt/PlatformMouseEventQt.cpp:
1125         (WebCore::mouseEventTypeAndMouseButtonFromQEvent):
1126         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1127         * platform/qt/WheelEventQt.cpp:
1128         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1129         * platform/win/KeyEventWin.cpp:
1130         (WebCore::isKeypadEvent):
1131         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1132         * platform/win/PlatformMouseEventWin.cpp:
1133         (WebCore::messageToEventType):
1134         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1135         * platform/win/WheelEventWin.cpp:
1136         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1137         * platform/wx/KeyboardEventWx.cpp:
1138         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1139         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
1140         * platform/wx/MouseEventWx.cpp:
1141         (WebCore::typeFromMouseEvent):
1142         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1143         * platform/wx/MouseWheelEventWx.cpp:
1144         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1145         * plugins/mac/PluginViewMac.mm:
1146         (WebCore::PluginView::handleKeyboardEvent):
1147         * testing/Internals.cpp:
1148         (WebCore::Internals::setZoomAnimatorTransform):
1149         Switch to using new names/class modifier as necessary.
1150
1151 2011-12-16  Adam Barth  <abarth@webkit.org>
1152
1153         <!doctype html><div><body><frameset> doesn't parse correctly
1154         https://bugs.webkit.org/show_bug.cgi?id=74745
1155
1156         Reviewed by Eric Seidel.
1157
1158         We were missing one place the spec tells us to set this bool.
1159
1160         Tests: html5lib/runner.html
1161
1162         * html/parser/HTMLTreeBuilder.cpp:
1163
1164 2011-12-16  Jarred Nicholls  <jarred@sencha.com>
1165
1166         Support HTML documents in XHR.responseXML
1167         https://bugs.webkit.org/show_bug.cgi?id=74626
1168
1169         Latest W3C XHR spec details for the responseXML attribute:
1170         http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-responsexml-attribute
1171         http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#document-response-entity-body
1172
1173         XHR.responseXML was not compliant per the latest editor's draft of the XHR spec.
1174         The following compliance issue have been corrected:
1175           - A responseType of "text" should disallow access to responseXML by throwing an InvalidState exception.
1176           - When the error flag is toggled, responseXML should return "null" immediately and not attempt to create a new Document.
1177           - responseXML should return a valid HTML document when the MIME type is "text/html", but only when the caller has
1178             explicitly set responseType to "document".
1179
1180         Reviewed by Alexey Proskuryakov.
1181
1182         Tests: fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-quirks.html
1183                fast/xmlhttprequest/xmlhttprequest-responseXML-html-document-responsetype-strict.html
1184                fast/xmlhttprequest/xmlhttprequest-responseXML-html-no-responsetype.html
1185                fast/xmlhttprequest/xmlhttprequest-responseXML-invalid-xml.html
1186                fast/xmlhttprequest/xmlhttprequest-responseXML-xml-document-responsetype.html
1187                fast/xmlhttprequest/xmlhttprequest-responseXML-xml-text-responsetype.html
1188
1189         * xml/XMLHttpRequest.cpp:
1190         (WebCore::XMLHttpRequest::responseXML):
1191         (WebCore::XMLHttpRequest::clearResponseBuffers):
1192         * xml/XMLHttpRequest.h: Rename m_responseXML to m_responseDocument
1193         (WebCore::XMLHttpRequest::optionalResponseXML):
1194
1195 2011-12-16  Ryosuke Niwa  <rniwa@webkit.org>
1196
1197         Only EditCommandComposition should implement unapply and reapply
1198         https://bugs.webkit.org/show_bug.cgi?id=74490
1199
1200         Reviewed by Eric Seidel.
1201
1202         Introduce new abstract class UndoStep to replace EditCommand for EditorClient, and make EditCommand
1203         private to WebCore.
1204
1205         * GNUmakefile.list.am:
1206         * Target.pri:
1207         * WebCore.exp.in:
1208         * WebCore.gypi:
1209         * WebCore.vcproj/WebCore.vcproj:
1210         * WebCore.xcodeproj/project.pbxproj:
1211         * editing/CompositeEditCommand.cpp:
1212         (WebCore::EditCommandComposition::create): Takes EditAction instead of boolean for CreateLinkCommand.
1213         (WebCore::EditCommandComposition::EditCommandComposition): Ditto.
1214         (WebCore::EditCommandComposition::unapply): Moved from EditCommand; we don't have to call isTopLevelCommand
1215         anymore because EditCommandComposition is always top-level. In fact, the only thing unapply/reapply do
1216         in addition to what doUnapply/doReapply do for sub-level commands is disabling and enabling delete button
1217         and defining an event queue scope. However, these can be done at top-level command anyway, so we now only call
1218         doApply for sub-level commands.
1219         (WebCore::EditCommandComposition::reapply): Ditto.
1220         (WebCore::EditCommandComposition::setStartingSelection): Added.
1221         (WebCore::EditCommandComposition::setEndingSelection): Added.
1222         (WebCore::applyCommand): Moved from EditCommand.
1223         (WebCore::CompositeEditCommand::apply): Moved from EditCommand; doesn't call isTopLevelCommand for the same reason.
1224         (WebCore::CompositeEditCommand::ensureComposition):
1225         (WebCore::CompositeEditCommand::applyCommandToComposite): Call doApply instead of apply for the same reason.
1226         * editing/CompositeEditCommand.h:
1227         (WebCore::EditCommandComposition::wasCreateLinkCommand):
1228         (WebCore::EditCommandComposition::startingSelection): Added.
1229         (WebCore::EditCommandComposition::endingSelection): Added.
1230         * editing/EditCommand.cpp:
1231         (WebCore::EditCommand::setStartingSelection):
1232         (WebCore::EditCommand::setEndingSelection):
1233         (WebCore::SimpleEditCommand::doReapply): Moved from EditCommand.
1234         * editing/EditCommand.h:
1235         * editing/UndoStep.h: Added.
1236         (WebCore::UndoStep::~UndoStep):
1237         * loader/EmptyClients.h:
1238         (WebCore::EmptyEditorClient::shouldInsertNode):
1239         (WebCore::EmptyEditorClient::didSetSelectionTypesForPasteboard):
1240         (WebCore::EmptyEditorClient::registerCommandForUndo): Takes UndoStep instead of EditCommand.
1241         (WebCore::EmptyEditorClient::registerCommandForRedo): Ditto.
1242         * page/EditorClient.h:
1243
1244 2011-12-16  Simon Fraser  <simon.fraser@apple.com>
1245
1246         Allow a PlatformCALayer to own its own sublayers
1247         https://bugs.webkit.org/show_bug.cgi?id=74744
1248
1249         Reviewed by Anders Carlsson.
1250
1251         GraphicsLayerCA rebuilds the sublayer list of CALayers, which would
1252         blow away any custom layers that a PlatformCALayer wants to maintain
1253         as children.
1254         
1255         Make it possible for a PlatformLayerCA to indicate that it wants
1256         a specific list of sublayers to be maintained as the first layers
1257         in the child list.
1258         
1259         * platform/graphics/ca/GraphicsLayerCA.cpp:
1260         (WebCore::GraphicsLayerCA::updateSublayerList):
1261         * platform/graphics/ca/PlatformCALayer.h:
1262         (WebCore::PlatformCALayer::customSublayers):
1263         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1264         (PlatformCALayer::PlatformCALayer):
1265
1266 2011-12-16  Adam Barth  <abarth@webkit.org>
1267
1268         <!DOCTYPE html><pre>&#x0a;&#x0a;A</pre> doesn't parse correctly
1269         https://bugs.webkit.org/show_bug.cgi?id=74658
1270
1271         Reviewed by Darin Adler.
1272
1273         Previously, we handled skipping newlines after <pre> in the tokenizer,
1274         which isn't how the spec handles them.  Instead, the spec skips them in
1275         the tree builder.  This isn't usually observable, except in the case of
1276         an HTML entity.  In that case, the tokenzier sees '&' (because the
1277         entity hasn't been decoded yet), but the tree builder sees '\n' (the
1278         decoded entity).  This patch fixes the bug by more closely aligning our
1279         implementation with the spec.
1280
1281         Test: html5lib/runner.html
1282
1283         * html/parser/HTMLTokenizer.cpp:
1284         (WebCore::HTMLTokenizer::reset):
1285         (WebCore::HTMLTokenizer::nextToken):
1286         * html/parser/HTMLTokenizer.h:
1287         * html/parser/HTMLTreeBuilder.cpp:
1288         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipAtMostOneLeadingNewline):
1289         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
1290         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1291         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
1292         * html/parser/HTMLTreeBuilder.h:
1293         * xml/parser/MarkupTokenizerBase.h:
1294
1295 2011-12-16  Joshua Bell  <jsbell@chromium.org>
1296
1297         IndexedDB: Implement IDBObjectStore.count() and IDBIndex.count()
1298         https://bugs.webkit.org/show_bug.cgi?id=73686
1299
1300         Reviewed by Tony Chang.
1301
1302         These new methods open an internal cursor and iterate through the
1303         results, returning the number of items found. Note that only
1304         passing an IDBKeyRange is supported, not an IDBKey. Supporting
1305         that will require some IDL/binding monkeying; several other
1306         methods also need the same Key-or-KeyRange behavior.
1307
1308         Tests: storage/indexeddb/index-count.html
1309                storage/indexeddb/objectstore-count.html
1310
1311         * bindings/v8/SerializedScriptValue.cpp:
1312         (WebCore::SerializedScriptValue::numberValue):
1313         * bindings/v8/SerializedScriptValue.h:
1314         * storage/IDBIndex.cpp:
1315         (WebCore::IDBIndex::openCursor):
1316         (WebCore::IDBIndex::count):
1317         * storage/IDBIndex.h:
1318         (WebCore::IDBIndex::count):
1319         * storage/IDBIndex.idl:
1320         * storage/IDBIndexBackendImpl.cpp:
1321         (WebCore::IDBIndexBackendImpl::countInternal):
1322         (WebCore::IDBIndexBackendImpl::count):
1323         * storage/IDBIndexBackendImpl.h:
1324         * storage/IDBIndexBackendInterface.h:
1325         * storage/IDBObjectStore.cpp:
1326         (WebCore::IDBObjectStore::count):
1327         * storage/IDBObjectStore.h:
1328         (WebCore::IDBObjectStore::count):
1329         * storage/IDBObjectStore.idl:
1330         * storage/IDBObjectStoreBackendImpl.cpp:
1331         (WebCore::IDBObjectStoreBackendImpl::count):
1332         (WebCore::IDBObjectStoreBackendImpl::countInternal):
1333         * storage/IDBObjectStoreBackendImpl.h:
1334         * storage/IDBObjectStoreBackendInterface.h:
1335
1336 2011-12-16  Yael Aharon  <yael.aharon@nokia.com>
1337
1338         Audio file in video element has a size of 0x0 .
1339         https://bugs.webkit.org/show_bug.cgi?id=74738
1340
1341         Reviewed by Kenneth Rohde Christiansen.
1342
1343         When the source of a video element has audio only, the intrinsic size of the video should
1344         not be 0x0. Instead, it should be the same as as no media was loaded.
1345
1346         No new tests. An existing test is covering this case and was modified to reflect this change.
1347
1348         * rendering/RenderVideo.cpp:
1349         (WebCore::RenderVideo::calculateIntrinsicSize):
1350
1351 2011-12-16  Alexis Menard  <alexis.menard@openbossa.org>
1352
1353         getComputedStyle for border-width is not implemented.
1354         https://bugs.webkit.org/show_bug.cgi?id=74635
1355
1356         Reviewed by Tony Chang.
1357
1358         Implement getComputedStyle for border-width.
1359
1360         Test: fast/css/getComputedStyle/getComputedStyle-border-width.html
1361
1362         * css/CSSComputedStyleDeclaration.cpp:
1363         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1364
1365 2011-12-16  Branimir Lambov  <blambov@google.com>
1366
1367         [chromium] svg/clip-path/clip-in-mask.svg fails on Windows and Linux
1368         https://bugs.webkit.org/show_bug.cgi?id=53378
1369
1370         Reviewed by Tony Chang.
1371
1372         Fixes a problem in Skia's clipping layer code's handling of coordinate
1373         transformations that was causing all complex clipping (including text
1374         and/or masks) to fail.
1375
1376         The method beginLayerClippedToImage was taking rectangle coordinates
1377         in one local coordinate space, but it was applying them in a different  
1378         one because of the delay between the time it is called and the actual 
1379         application occurs in applyClipFromImage. The fix translates the 
1380         coordinates passed to beginLayerClippedToImage to absolute ones, so 
1381         that they are not affected by any change in the transform matrix, and 
1382         makes sure that applyClipFromImage clears the matrix before drawing
1383         the clip layer to correctly apply the absolute coordinates.
1384
1385         * platform/graphics/skia/PlatformContextSkia.cpp:
1386         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
1387         (WebCore::PlatformContextSkia::applyClipFromImage):
1388         * platform/graphics/skia/PlatformContextSkia.h:
1389
1390 2011-12-16  Mark Hahnenberg  <mhahnenberg@apple.com>
1391
1392         De-virtualize destructors
1393         https://bugs.webkit.org/show_bug.cgi?id=74331
1394
1395         Reviewed by Geoffrey Garen.
1396
1397         No new tests.
1398
1399         Doing everything here that was done to the JSCell hierarchy in JavaScriptCore. 
1400         See the ChangeLog for this commit for a more in-depth description.
1401
1402         * WebCore.exp.in: Add/remove symbols.
1403         * bindings/js/JSCanvasRenderingContext2DCustom.cpp: Remove first arg from isJSArray call.
1404         (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
1405         * bindings/js/JSDOMBinding.cpp: Add trival destructor assert for DOMConstructorObject 
1406         and DOMConstructorWithDocument.
1407         * bindings/js/JSDOMGlobalObject.cpp: Add static destroy.  Add implementation for 
1408         scriptExecutionContext that dispatches to different functions in subclasses 
1409         depending on our current ClassInfo.  We do this so that we can get rid of the 
1410         virtual-ness of scriptExecutionContext, because any virtual functions will throw 
1411         off the layout of the object and we'll crash at runtime.
1412         (WebCore::JSDOMGlobalObject::destroy):
1413         (WebCore::JSDOMGlobalObject::scriptExecutionContext):
1414         * bindings/js/JSDOMGlobalObject.h:
1415         * bindings/js/JSDOMWindowBase.cpp: Add static destroy.
1416         (WebCore::JSDOMWindowBase::destroy):
1417         * bindings/js/JSDOMWindowBase.h: De-virtualize scriptExecutionContext.
1418         * bindings/js/JSDOMWindowShell.cpp: Add static destroy.
1419         (WebCore::JSDOMWindowShell::destroy):
1420         * bindings/js/JSDOMWindowShell.h:
1421         * bindings/js/JSDOMWrapper.cpp: Add trivial destructor assert.
1422         * bindings/js/JSDOMWrapper.h: Add a ClassInfo to JSDOMWrapper since it now overrides 
1423         a MethodTable function. Remove vtableAnchor virtual function.
1424         * bindings/js/JSImageConstructor.cpp: Add trivial destructor assert.
1425         * bindings/js/JSNodeCustom.cpp: Change implementation of pushEventHandlerScope so that 
1426         it dispatches to the correct function depending on the 
1427         identity of the class as specified by the ClassInfo.  
1428         See JSDOMGlobalObject::scriptExecutionContext for explanation.
1429         (WebCore::JSNode::pushEventHandlerScope):
1430         * bindings/js/JSWebSocketCustom.cpp: Remove first arg to isJSArray call.
1431         (WebCore::JSWebSocketConstructor::constructJSWebSocket):
1432         * bindings/js/JSWorkerContextBase.cpp: Add static destroy.
1433         (WebCore::JSWorkerContextBase::destroy):
1434         * bindings/js/JSWorkerContextBase.h: 
1435         * bindings/js/ScriptValue.cpp: Remove first arg to isJSArray call.
1436         (WebCore::jsToInspectorValue): 
1437         * bindings/js/SerializedScriptValue.cpp: Ditto.
1438         (WebCore::CloneSerializer::isArray):
1439         (WebCore::CloneSerializer::getSparseIndex):
1440         * bindings/scripts/CodeGeneratorJS.pm:
1441         (GenerateHeader): Remove virtual-ness of any custom pushEventHandlerScope (see 
1442         JSNodeCustom::pushEventHandlerScope for explanation).  Remove virtual toBoolean 
1443         for anybody who masquerades as undefined, since our JSObject implementation handles 
1444         this based on the TypeInfo in the Structure. Add trivial destructor assert for any 
1445         class other than DOMWindow or WorkerContexts.
1446         (GenerateImplementation): Change ClassInfo definitions to use Base::s_info, since 
1447         typing the parent class more than once is duplication of information and increases 
1448         the likelihood of mistakes.  Pass ClassInfo to TypeArrayDescriptors instead of vptr. 
1449         (GenerateConstructorDefinition): Add trivial destructor assert for all generated constructors.
1450         * bridge/c/CRuntimeObject.cpp: Remove empty virtual destructor.
1451         * bridge/c/CRuntimeObject.h: 
1452         * bridge/jni/jsc/JavaRuntimeObject.cpp: Ditto.
1453         * bridge/jni/jsc/JavaRuntimeObject.h: 
1454         * bridge/objc/ObjCRuntimeObject.h: Ditto.
1455         * bridge/objc/ObjCRuntimeObject.mm:
1456         * bridge/objc/objc_runtime.h: Add static destroy for ObjcFallbackObjectImp. De-virtualize 
1457         toBoolean in the short term.  Need longer term fix.
1458         * bridge/objc/objc_runtime.mm:
1459         (JSC::Bindings::ObjcFallbackObjectImp::destroy):
1460         * bridge/qt/qt_runtime.cpp: Add static destroy to QtRuntimeMethod.
1461         (JSC::Bindings::QtRuntimeMethod::destroy):
1462         * bridge/qt/qt_runtime.h: De-virtualize ~QtRuntimeMethod.
1463         * bridge/runtime_array.cpp: De-virtualize destructor. Add static destroy.
1464         (JSC::RuntimeArray::destroy):
1465         * bridge/runtime_array.h:
1466         * bridge/runtime_method.cpp: Remove vtableAnchor. Add static destroy.
1467         (JSC::RuntimeMethod::destroy):
1468         * bridge/runtime_method.h:
1469         * bridge/runtime_object.cpp: Add static destroy.
1470         (JSC::Bindings::RuntimeObject::destroy):
1471         * bridge/runtime_object.h:
1472
1473 2011-12-15  Alexey Proskuryakov  <ap@apple.com>
1474
1475         Poor XPath performance when evaluating an expression that returns a lot of nodes
1476         https://bugs.webkit.org/show_bug.cgi?id=74665
1477         <rdar://problem/10517146>
1478
1479         Reviewed by Darin Adler.
1480
1481         No change in funcitonality. Well covered by existing tests (ran them with zero cutoff to
1482         execute the new code path).
1483
1484         Our sorting function is optimized for small node sets in large documents, and this is the
1485         opposite of it. Added another one that traverses the whole document, adding nodes from the
1486         node set to sorted list. That doesn't grow with the number of nodes nearly as fast.
1487
1488         Cutoff amount chosen for the document referenced in bug - this is roughly where the algorithms
1489         have the same performance on it.
1490
1491         * xml/XPathNodeSet.cpp:
1492         (WebCore::XPath::NodeSet::sort):
1493         (WebCore::XPath::findRootNode):
1494         (WebCore::XPath::NodeSet::traversalSort):
1495         * xml/XPathNodeSet.h:
1496
1497 2011-12-15  Antti Koivisto  <antti@apple.com>
1498
1499         https://bugs.webkit.org/show_bug.cgi?id=74677
1500         Count ResourceLoadScheduler suspends/resumes
1501
1502         Reviewed by Andreas Kling.
1503
1504         Using boolean is not robust when there are multiple clients calling suspendPendingRequests/resumePendingRequests.
1505         
1506         Increment and decrement suspend count instead of just setting/unsetting a boolean.
1507
1508         * loader/ResourceLoadScheduler.cpp:
1509         (WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
1510         (WebCore::ResourceLoadScheduler::servePendingRequests):
1511         (WebCore::ResourceLoadScheduler::suspendPendingRequests):
1512         (WebCore::ResourceLoadScheduler::resumePendingRequests):
1513         * loader/ResourceLoadScheduler.h:
1514         (WebCore::ResourceLoadScheduler::isSuspendingPendingRequests):
1515
1516 2011-12-16  Adam Klein  <adamk@chromium.org>
1517
1518         Improve performance of ChildListMutationScope when no MutationObservers are present
1519         https://bugs.webkit.org/show_bug.cgi?id=74671
1520
1521         Reviewed by Ojan Vafai.
1522
1523         Inline ChildListMutationScope's methods (including constructor and
1524         destructor), and provide a fast-fail case when no mutation observers
1525         are present.
1526
1527         The code reorganization necessary for the above also removed the
1528         anonymous namespace in ChildListMutationScope.cpp, making both helper
1529         classes private inner classes of ChildListMutationScope.
1530
1531         No new tests, refactoring only.
1532
1533         * dom/ChildListMutationScope.cpp:
1534         (WebCore::ChildListMutationScope::MutationAccumulator::MutationAccumulator):
1535         (WebCore::ChildListMutationScope::MutationAccumulator::~MutationAccumulator):
1536         (WebCore::ChildListMutationScope::MutationAccumulator::isAddedNodeInOrder):
1537         (WebCore::ChildListMutationScope::MutationAccumulator::childAdded):
1538         (WebCore::ChildListMutationScope::MutationAccumulator::isRemovedNodeInOrder):
1539         (WebCore::ChildListMutationScope::MutationAccumulator::willRemoveChild):
1540         (WebCore::ChildListMutationScope::MutationAccumulator::enqueueMutationRecord):
1541         (WebCore::ChildListMutationScope::MutationAccumulator::clear):
1542         (WebCore::ChildListMutationScope::MutationAccumulator::isEmpty):
1543         (WebCore::ChildListMutationScope::MutationAccumulationRouter::MutationAccumulationRouter):
1544         (WebCore::ChildListMutationScope::MutationAccumulationRouter::~MutationAccumulationRouter):
1545         (WebCore::ChildListMutationScope::MutationAccumulationRouter::initialize):
1546         (WebCore::ChildListMutationScope::MutationAccumulationRouter::instance):
1547         (WebCore::ChildListMutationScope::MutationAccumulationRouter::childAdded):
1548         (WebCore::ChildListMutationScope::MutationAccumulationRouter::willRemoveChild):
1549         (WebCore::ChildListMutationScope::MutationAccumulationRouter::incrementScopingLevel):
1550         (WebCore::ChildListMutationScope::MutationAccumulationRouter::decrementScopingLevel):
1551         * dom/ChildListMutationScope.h:
1552         (WebCore::ChildListMutationScope::ChildListMutationScope):
1553         (WebCore::ChildListMutationScope::~ChildListMutationScope):
1554         (WebCore::ChildListMutationScope::childAdded):
1555         (WebCore::ChildListMutationScope::willRemoveChild):
1556
1557 2011-12-16  Dean Jackson  <dino@apple.com>
1558
1559         Filters need to affect visual overflow
1560         https://bugs.webkit.org/show_bug.cgi?id=71930
1561
1562         Reviewed by Simon Fraser.
1563
1564         Make sure filters are included in visual overflow.
1565         Add a new method to calculate the expansion of overflow
1566         region given a list of FilterOperations. This is a slight
1567         duplication of code from the rendering path, but is needed
1568         because overflow is calculated before the FilterEffect
1569         chain is built.
1570
1571         Also, filters were always rendered into their
1572         input rectangle which was wrong for any effect
1573         that produced a different sized result - drop-shadow
1574         and blur. This required two changes. First, FilterEffect
1575         needed a flag to decide whether or not to clip
1576         output to primitive regions (as required by SVG but not
1577         what we want here). Second, the rendering operation
1578         draws into the rectangle the filter claims is its painting
1579         rectangle.
1580
1581         Test: css3/filters/regions-expanding.html
1582
1583         * platform/graphics/filters/FEDropShadow.cpp:
1584         (WebCore::FEDropShadow::determineAbsolutePaintRect): Only
1585         clipToBounds if necessary.
1586         * platform/graphics/filters/FEGaussianBlur.cpp:
1587         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize): CSS filters
1588         ask for the kernel size before the Filter object is created, so
1589         add a new method to return an unscaled kernel.
1590         (WebCore::FEGaussianBlur::calculateKernelSize):
1591         (WebCore::FEGaussianBlur::determineAbsolutePaintRect): Only
1592         clipToBounds if necessary.
1593         * platform/graphics/filters/FEGaussianBlur.h:
1594         * platform/graphics/filters/FEMorphology.cpp:
1595         (WebCore::FEMorphology::determineAbsolutePaintRect): Only
1596         clipToBounds if necessary.
1597         * platform/graphics/filters/FEOffset.cpp:
1598         (WebCore::FEOffset::determineAbsolutePaintRect): Only
1599         clipToBounds if necessary.
1600         * platform/graphics/filters/FilterEffect.cpp:
1601         (WebCore::FilterEffect::FilterEffect): Initialize clipToBounds
1602         as false so SVG remains unchanged.
1603         (WebCore::FilterEffect::determineAbsolutePaintRect): Only
1604         clipToBounds if necessary.
1605         * platform/graphics/filters/FilterEffect.h:
1606         (WebCore::FilterEffect::clipsToBounds):
1607         (WebCore::FilterEffect::setClipsToBounds):
1608         * rendering/FilterEffectRenderer.cpp:
1609         (WebCore::FilterEffectRenderer::build): Make sure we set our
1610         filters here to NOT clip to bounds.
1611         * rendering/FilterEffectRenderer.h:
1612         (WebCore::FilterEffectRenderer::outputRect): Asks the filter
1613         operation for the size of the result image.
1614         * rendering/RenderBlock.cpp:
1615         (WebCore::RenderBlock::computeOverflow):
1616         * rendering/RenderBox.cpp:
1617         (WebCore::RenderBox::addVisualEffectOverflow): Change the name
1618         from addBoxShadowAndBorderOverflow().
1619         * rendering/RenderBox.h:
1620         * rendering/RenderEmbeddedObject.cpp:
1621         (WebCore::RenderEmbeddedObject::layout):
1622         * rendering/RenderIFrame.cpp:
1623         (WebCore::RenderIFrame::layout):
1624         * rendering/RenderLayer.cpp:
1625         (WebCore::RenderLayer::paintLayer):
1626         * rendering/RenderLayerBacking.cpp:
1627         (WebCore::hasBoxDecorations): Change name from
1628         hasBorderOutlineOrShadow().
1629         (WebCore::hasBoxDecorationsOrBackground):
1630         (WebCore::hasBoxDecorationsOrBackgroundImage):
1631         * rendering/RenderReplaced.cpp:
1632         (WebCore::RenderReplaced::layout):
1633         * rendering/style/FilterOperations.cpp:
1634         (WebCore::outsetSizeForBlur): Return an IntSize that is the amount
1635         of offset.
1636         (WebCore::FilterOperations::hasOutsets):
1637         (WebCore::FilterOperations::getOutsets):
1638         * rendering/style/FilterOperations.h:
1639         * rendering/style/RenderStyle.h:
1640         (WebCore::InheritedFlags::getFilterOutsets):
1641         (WebCore::InheritedFlags::hasFilterOutsets):
1642         * svg/graphics/filters/SVGFEImage.cpp:
1643         (WebCore::FEImage::determineAbsolutePaintRect): Only
1644         clipToBounds if necessary.
1645
1646 2011-12-16  Alexis Menard  <alexis.menard@openbossa.org>, Jakub Wieczorek  <jwieczorek@webkit.org>
1647
1648         Add support for <ol reversed>.
1649         https://bugs.webkit.org/show_bug.cgi?id=36724
1650
1651         The reversed attribute makes an ordered list appear with marker values
1652         decreasing from n, where n is the number of items.
1653         See: http://www.whatwg.org/specs/web-apps/current-work/#attr-ol-reversed
1654
1655         Reviewed by Darin Adler.
1656
1657         Tests: fast/lists/ol-reversed-dynamic-simple.html
1658                fast/lists/ol-reversed-dynamic.html
1659                fast/lists/ol-reversed-nested-items.html
1660                fast/lists/ol-reversed-nested-list.html
1661                fast/lists/ol-reversed-simple.html
1662
1663         * html/HTMLAttributeNames.in:
1664         * html/HTMLOListElement.cpp:
1665         (WebCore::HTMLOListElement::HTMLOListElement):
1666         (WebCore::HTMLOListElement::parseMappedAttribute):
1667         (WebCore::HTMLOListElement::updateItemValues):
1668         (WebCore::HTMLOListElement::recalculateItemCount):
1669         * html/HTMLOListElement.h:
1670         (WebCore::HTMLOListElement::start):
1671         (WebCore::HTMLOListElement::isReversed):
1672         (WebCore::HTMLOListElement::itemCountChanged):
1673         (WebCore::HTMLOListElement::itemCount):
1674         * html/HTMLOListElement.idl:
1675         * rendering/RenderListItem.cpp:
1676         (WebCore::RenderListItem::nextListItem):
1677         (WebCore::previousListItem):
1678         (WebCore::RenderListItem::calcValue):
1679         (WebCore::RenderListItem::explicitValueChanged):
1680         (WebCore::previousOrNextItem):
1681         (WebCore::RenderListItem::updateListMarkerNumbers):
1682         * rendering/RenderListItem.h:
1683
1684 2011-12-16  Mikhail Naganov  <mnaganov@chromium.org>
1685
1686         Scroll non-visible edit controls and caret into the center of the view when starting typing.
1687         https://bugs.webkit.org/show_bug.cgi?id=65027
1688
1689         Reviewed by Ryosuke Niwa.
1690
1691         Tests: editing/input/caret-at-the-edge-of-contenteditable.html
1692                editing/input/caret-at-the-edge-of-input.html
1693                editing/input/reveal-caret-of-multiline-contenteditable.html
1694                editing/input/reveal-caret-of-multiline-input.html
1695                editing/input/reveal-contenteditable-on-input-vertically.html
1696                editing/input/reveal-contenteditable-on-paste-vertically.html
1697                editing/input/reveal-edit-on-input-vertically.html
1698                editing/input/reveal-edit-on-paste-vertically.html
1699
1700         * editing/Editor.cpp:
1701         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1702         (WebCore::Editor::revealSelectionAfterEditingOperation):
1703
1704 2011-12-16  Ryosuke Niwa  <rniwa@webkit.org>
1705
1706         Touch RenderStyle in an attempt to fix linking errors on Chromium Windows bots.
1707
1708         * rendering/style/RenderStyle.h:
1709
1710 2011-12-14  Nat Duca  <nduca@chromium.org>
1711
1712         [chromium] DelayBasedTimeSource should not change its timebase on late ticks
1713         https://bugs.webkit.org/show_bug.cgi?id=74573
1714
1715         The original DelayBasedTimeSource was designed to shift its timebase
1716         to the tick time when a tick came back "late." The rationale was that it is
1717         better to just "start fresh" after a stutter. After profiling this,
1718         this time-rebasing just destabilizes frame rate anytime the thread gets
1719         loaded.  This patch keeps the timebase stationary, leading to vastly
1720         smoother framerates when the message loop is under load.
1721
1722         Reviewed by James Robinson.
1723
1724         * platform/graphics/chromium/cc/CCDelayBasedTimeSource.cpp:
1725         (WebCore::CCDelayBasedTimeSource::updateState):
1726
1727 2011-12-16  Sheriff Bot  <webkit.review.bot@gmail.com>
1728
1729         Unreviewed, rolling out r103062.
1730         http://trac.webkit.org/changeset/103062
1731         https://bugs.webkit.org/show_bug.cgi?id=74715
1732
1733         It broke many tests (Requested by Ossy on #webkit).
1734
1735         * html/HTMLAttributeNames.in:
1736         * html/HTMLOListElement.cpp:
1737         (WebCore::HTMLOListElement::HTMLOListElement):
1738         (WebCore::HTMLOListElement::parseMappedAttribute):
1739         * html/HTMLOListElement.h:
1740         (WebCore::HTMLOListElement::start):
1741         * html/HTMLOListElement.idl:
1742         * rendering/RenderListItem.cpp:
1743         (WebCore::previousListItem):
1744         (WebCore::RenderListItem::calcValue):
1745         (WebCore::RenderListItem::explicitValueChanged):
1746         (WebCore::RenderListItem::updateListMarkerNumbers):
1747         * rendering/RenderListItem.h:
1748
1749 2011-12-16  Alexis Menard  <alexis.menard@openbossa.org>, Jakub Wieczorek  <jwieczorek@webkit.org>
1750
1751         Add support for <ol reversed>.
1752         https://bugs.webkit.org/show_bug.cgi?id=36724
1753
1754         The reversed attribute makes an ordered list appear with marker values
1755         decreasing from n, where n is the number of items.
1756         See: http://www.whatwg.org/specs/web-apps/current-work/#attr-ol-reversed
1757
1758         Reviewed by Darin Adler.
1759
1760         Tests: fast/lists/ol-reversed-dynamic-simple.html
1761                fast/lists/ol-reversed-dynamic.html
1762                fast/lists/ol-reversed-nested-items.html
1763                fast/lists/ol-reversed-nested-list.html
1764                fast/lists/ol-reversed-simple.html
1765
1766         * html/HTMLAttributeNames.in:
1767         * html/HTMLOListElement.cpp:
1768         (WebCore::HTMLOListElement::HTMLOListElement):
1769         (WebCore::HTMLOListElement::parseMappedAttribute):
1770         (WebCore::HTMLOListElement::updateItemValues):
1771         (WebCore::HTMLOListElement::recalculateItemCount):
1772         * html/HTMLOListElement.h:
1773         (WebCore::HTMLOListElement::start):
1774         (WebCore::HTMLOListElement::isReversed):
1775         (WebCore::HTMLOListElement::itemCountChanged):
1776         (WebCore::HTMLOListElement::itemCount):
1777         * html/HTMLOListElement.idl:
1778         * rendering/RenderListItem.cpp:
1779         (WebCore::RenderListItem::nextListItem):
1780         (WebCore::previousListItem):
1781         (WebCore::RenderListItem::calcValue):
1782         (WebCore::RenderListItem::explicitValueChanged):
1783         (WebCore::previousOrNextItem):
1784         (WebCore::RenderListItem::updateListMarkerNumbers):
1785         * rendering/RenderListItem.h:
1786
1787 2011-12-15  Stephen White  <senorblanco@chromium.org>
1788
1789         Enable CSS_FILTERS in Chromium.
1790         https://bugs.webkit.org/show_bug.cgi?id=74334
1791
1792         Reviewed by Chris Marrin.
1793
1794         Covered by css3/filters (when enabled).
1795
1796         * platform/graphics/filters/FilterOperation.h:
1797         (WebCore::PassthroughFilterOperation::PassthroughFilterOperation):
1798         Since wingdi.h #define's PASSTHROUGH, #undef it after the includes.
1799
1800 2011-12-16  Patrick Gansterer  <paroga@webkit.org>
1801
1802         Unreviewed WinCE build fix after r102979.
1803
1804         Make everHadLayout() public accessible as it was before the change.
1805
1806         * rendering/RenderObject.h:
1807         (WebCore::RenderObject::everHadLayout):
1808
1809 2011-12-15  Hans Wennborg  <hans@chromium.org>
1810
1811         IndexedDB: Don't prefetch values from key cursors
1812         https://bugs.webkit.org/show_bug.cgi?id=74604
1813
1814         Reviewed by Tony Chang.
1815
1816         Since index key cursors don't have values, prefetching should not try
1817         to retrieve them. Doing so trips an ASSERT in debug builds.
1818
1819         This will be tested Chromium-side.
1820
1821         * storage/IDBCursorBackendImpl.cpp:
1822         (WebCore::IDBCursorBackendImpl::prefetchContinueInternal):
1823
1824 2011-12-16  Yosifumi Inoue  <yosin@chromium.org>
1825
1826         [Forms] The "maxlength" attribute on "textarea" tag miscounts hard newlines
1827         https://bugs.webkit.org/show_bug.cgi?id=74686
1828
1829         Reviewed by Kent Tamura.
1830
1831         This patch counts LF in textarea value as two for LF to CRLF conversion on submission.
1832
1833         No new tests. Existing tests cover all changes.
1834
1835         * html/HTMLTextAreaElement.cpp:
1836         (WebCore::computeLengthForSubmission): Count LF as 2 for CR LF conversion on submission.
1837         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent): Use computeLengthForSubmission instead of numGraphemeClusters.
1838         (WebCore::HTMLTextAreaElement::tooLong): Use computeLengthForSubmission instead of numGraphemeClusters.
1839
1840 2011-12-16  Hajime Morrita  <morrita@chromium.org>
1841
1842         Unreviewed, rolling out r103045.
1843         http://trac.webkit.org/changeset/103045
1844         https://bugs.webkit.org/show_bug.cgi?id=74590
1845
1846         Breaks select-script-onchange.html on Chromium Windows
1847
1848         * html/HTMLSelectElement.cpp:
1849         (WebCore::HTMLSelectElement::typeAheadFind):
1850
1851 2011-12-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1852
1853         Unreviewed. Fix make distcheck.
1854
1855         * GNUmakefile.list.am: Add missing header file.
1856
1857 2011-12-16  Yosifumi Inoue  <yosin@chromium.org>
1858
1859         [Forms] Selection change by type-ahead doesn't fire 'change' event
1860         https://bugs.webkit.org/show_bug.cgi?id=74590
1861
1862         Reviewed by Kent Tamura.
1863
1864         Fire onchange even for type ahead selection.
1865
1866         Test: fast/forms/select/menulist-type-ahead-find.html
1867
1868         * html/HTMLSelectElement.cpp:
1869         (WebCore::HTMLSelectElement::typeAheadFind): Add DispatchChangeEvent when
1870         calling selectOption method.
1871
1872 2011-12-16  Andreas Kling  <kling@webkit.org>
1873
1874         Don't call Document::body() twice in the same function.
1875         <http://webkit.org/b/74683>
1876
1877         Reviewed by Dan Bernstein.
1878
1879         Document::body() is O(n), so we should avoid calling it multiple
1880         times unnecessarily.
1881
1882         * dom/Document.cpp:
1883         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
1884
1885 2011-12-16  Daniel Sievers  <sievers@chromium.org>
1886
1887         [Chromium] Add trace events for decoding and drawing images.
1888         https://bugs.webkit.org/show_bug.cgi?id=74547
1889
1890         Reviewed by James Robinson.
1891
1892         * platform/graphics/skia/ImageSkia.cpp:
1893         (WebCore::drawResampledBitmap):
1894         (WebCore::paintSkBitmap):
1895         (WebCore::Image::drawPattern):
1896         * platform/graphics/skia/NativeImageSkia.cpp:
1897         (WebCore::NativeImageSkia::resizedBitmap):
1898         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
1899         (WebCore::BMPImageDecoder::decode):
1900         * platform/image-decoders/gif/GIFImageDecoder.cpp:
1901         (WebCore::GIFImageDecoder::decode):
1902         * platform/image-decoders/ico/ICOImageDecoder.cpp:
1903         (WebCore::ICOImageDecoder::decode):
1904         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1905         (WebCore::JPEGImageDecoder::decode):
1906         * platform/image-decoders/png/PNGImageDecoder.cpp:
1907         (WebCore::PNGImageDecoder::decode):
1908         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
1909         (WebCore::WEBPImageDecoder::decode):
1910
1911 2011-12-15  Martin Robinson  <mrobinson@igalia.com>
1912
1913         Fix 'make dist' in preparation for the GTK+ release.
1914
1915         * GNUmakefile.list.am: Add missing header.
1916
1917 2011-12-15  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1918
1919         Don't create empty files on error.
1920         https://bugs.webkit.org/show_bug.cgi?id=74373
1921
1922         Reviewed by Ryosuke Niwa.
1923
1924         * css/makeprop.pl:
1925         * css/makevalues.pl:
1926         * make-hash-tools.pl:
1927
1928 2011-12-15  Yongjun Zhang  <yongjun_zhang@apple.com>
1929
1930         PODIntervalTree takes 1.7MB memory on www.nytimes.com.
1931         https://bugs.webkit.org/show_bug.cgi?id=73712
1932
1933         Reviewed by Kenneth Russell.
1934
1935         For a RenderBlock which has floating objects inside, we will create a PODIntervalTree and a PODArena with
1936         at least one 16KB chunk.  A page could have a large number of such RenderBlocks and they could take huge
1937         amount of memory.  To fix that, we can create a shared PODArena in the root RenderView.  Instead of having
1938         their own PODArena, each RenderBlock with floating objects could share this PODArena to reduce memory consumption.
1939
1940         The shared PODArena could grow unboundedly if we keep removing and adding floating objects.  We can fix that
1941         by reusing the freed memory in each chunk.  However, a PODArena could allocate objects of different sizes and
1942         it would be complex to keep track of the size for each allocation in PODArena.  To address that, this patch
1943         added class PODFreeListArena<T> which only allocates objects of type T (hence the same size).  We can then use a
1944         free list to track freed nodes inside the chunk and reuse the free nodes in future allocations.
1945
1946         Manually tested on nytimes.com and the heap consumption of PODIntervalTree reduced from 1.7MB to 16KB. Performance
1947         doesn't regress on test PerformanceTests/Layout/floats.html.
1948
1949         * WebCore.xcodeproj/project.pbxproj: add new header file PODFreeListArena.h.
1950         * platform/PODArena.h:
1951         (WebCore::PODArena::~PODArena): change dtor to virtual.
1952         (WebCore::PODArena::Chunk::~Chunk): ditto.
1953         * platform/PODFreeListArena.h: Added.
1954         (WebCore::PODFreeListArena::create): 
1955         (WebCore::PODFreeListArena::allocateObject): allocate an object.
1956         (WebCore::PODFreeListArena::freeObject): free an object, find the right chunk and update its free list.
1957         (WebCore::PODFreeListArena::allocate): allocate memory from the free list or current chunk.
1958         (WebCore::PODFreeListArena::FreeListChunk::FreeListChunk): add m_freeList to track freed cells.
1959         (WebCore::PODFreeListArena::FreeListChunk::allocate): reuse a free cell if there is one.
1960         (WebCore::PODFreeListArena::FreeListChunk::free): make the memory taken by this object is free, and link it to m_freeList.
1961         (WebCore::PODFreeListArena::FreeListChunk::contains): check if a pointer is inside this chunk.
1962         (WebCore::PODFreeListArena::FreeListChunk::hasFreeList): check if this chunk has free cells.
1963         * platform/PODRedBlackTree.h:
1964         (WebCore::PODRedBlackTree::PODRedBlackTree): take PODFreeListArena instead of PODArena, since nodes of a particular PODRedBlackTree
1965             is always of the same size.
1966         (WebCore::PODRedBlackTree::clear): mark all nodes before clearing the tree.
1967         (WebCore::PODRedBlackTree::initIfNeeded): add initIfNeeded to take an external PODFreeListArena.
1968         (WebCore::PODRedBlackTree::add):
1969         (WebCore::PODRedBlackTree::deleteNode): mark the node free in arena after it is removed from the tree.
1970         (WebCore::PODRedBlackTree::markFree): mark all node free in the tree.
1971         * rendering/RenderBlock.cpp:
1972         (WebCore::RenderBlock::insertFloatingObject):
1973         (WebCore::RenderBlock::addOverhangingFloats):
1974         (WebCore::RenderBlock::addIntrudingFloats):
1975         (WebCore::RenderBlock::FloatingObjects::computePlacedFloatsTree):  passing the shared PODFreeListArena to m_placedFloatsTree.
1976         * rendering/RenderBlock.h:
1977         (WebCore::RenderBlock::FloatingObjects::FloatingObjects):
1978         * rendering/RenderView.cpp:
1979         (WebCore::RenderView::intervalArena): create the shared PODFreeListArena lazily.
1980         * rendering/RenderView.h:
1981
1982 2011-12-15  Tony Chang  <tony@chromium.org>
1983
1984         Unreviewed, rollout r102825 because it didn't improve performance.
1985         https://bugs.webkit.org/show_bug.cgi?id=74622
1986
1987         * css/CSSStyleSelector.cpp:
1988         (WebCore::CSSStyleSelector::styleForElement):
1989         (WebCore::CSSStyleSelector::pseudoStyleForElement):
1990
1991 2011-12-15  Ryosuke Niwa  <rniwa@webkit.org>
1992
1993         sizeof(RenderObject) is 32 instead of 24 on Windows
1994         https://bugs.webkit.org/show_bug.cgi?id=74646
1995
1996         Reviewed by Darin Adler.
1997
1998         Make all bitfields in RenderObject to unsigned and wrap them around by RenderObjectBitfields.
1999         Also add a compilation time assertion to make sure we won't grow RenderObject's size unintentionally.
2000
2001         * rendering/RenderBlock.cpp:
2002         (WebCore::RenderBlock::layoutBlock):
2003         (WebCore::RenderBlock::layoutBlockChild):
2004         (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
2005         (WebCore::RenderBlock::layoutColumns):
2006         * rendering/RenderBlock.h:
2007         (WebCore::RenderBlock::FloatWithRect::FloatWithRect):
2008         * rendering/RenderObject.cpp:
2009         (WebCore::SameSizeAsRenderObject::~SameSizeAsRenderObject):
2010         (WebCore::RenderObject::RenderObject):
2011         (WebCore::RenderObject::markContainingBlocksForLayout):
2012         (WebCore::RenderObject::setPreferredLogicalWidthsDirty):
2013         (WebCore::RenderObject::invalidateContainerPreferredLogicalWidths):
2014         (WebCore::RenderObject::styleWillChange):
2015         (WebCore::RenderObject::styleDidChange):
2016         (WebCore::RenderObject::willBeDestroyed):
2017         (WebCore::RenderObject::updateDragState):
2018         * rendering/RenderObject.h:
2019         (WebCore::RenderObject::hasCounterNodeMap):
2020         (WebCore::RenderObject::setHasCounterNodeMap):
2021         (WebCore::RenderObject::childrenInline):
2022         (WebCore::RenderObject::setChildrenInline):
2023         (WebCore::RenderObject::hasColumns):
2024         (WebCore::RenderObject::setHasColumns):
2025         (WebCore::RenderObject::inRenderFlowThread):
2026         (WebCore::RenderObject::setInRenderFlowThread):
2027         (WebCore::RenderObject::isAnonymous):
2028         (WebCore::RenderObject::setIsAnonymous):
2029         (WebCore::RenderObject::isAnonymousBlock):
2030         (WebCore::RenderObject::isFloating):
2031         (WebCore::RenderObject::isPositioned):
2032         (WebCore::RenderObject::isRelPositioned):
2033         (WebCore::RenderObject::isText):
2034         (WebCore::RenderObject::isBox):
2035         (WebCore::RenderObject::isInline):
2036         (WebCore::RenderObject::isDragging):
2037         (WebCore::RenderObject::isReplaced):
2038         (WebCore::RenderObject::isHorizontalWritingMode):
2039         (WebCore::RenderObject::hasLayer):
2040         (WebCore::RenderObject::hasBoxDecorations):
2041         (WebCore::RenderObject::needsLayout):
2042         (WebCore::RenderObject::selfNeedsLayout):
2043         (WebCore::RenderObject::needsPositionedMovementLayout):
2044         (WebCore::RenderObject::needsPositionedMovementLayoutOnly):
2045         (WebCore::RenderObject::posChildNeedsLayout):
2046         (WebCore::RenderObject::needsSimplifiedNormalFlowLayout):
2047         (WebCore::RenderObject::normalChildNeedsLayout):
2048         (WebCore::RenderObject::preferredLogicalWidthsDirty):
2049         (WebCore::RenderObject::hasOverflowClip):
2050         (WebCore::RenderObject::hasTransform):
2051         (WebCore::RenderObject::node):
2052         (WebCore::RenderObject::setPositioned):
2053         (WebCore::RenderObject::setRelPositioned):
2054         (WebCore::RenderObject::setFloating):
2055         (WebCore::RenderObject::setInline):
2056         (WebCore::RenderObject::setHasBoxDecorations):
2057         (WebCore::RenderObject::setIsText):
2058         (WebCore::RenderObject::setIsBox):
2059         (WebCore::RenderObject::setReplaced):
2060         (WebCore::RenderObject::setHorizontalWritingMode):
2061         (WebCore::RenderObject::setHasOverflowClip):
2062         (WebCore::RenderObject::setHasLayer):
2063         (WebCore::RenderObject::setHasTransform):
2064         (WebCore::RenderObject::setHasReflection):
2065         (WebCore::RenderObject::hasReflection):
2066         (WebCore::RenderObject::setHasMarkupTruncation):
2067         (WebCore::RenderObject::hasMarkupTruncation):
2068         (WebCore::RenderObject::selectionState):
2069         (WebCore::RenderObject::setSelectionState):
2070         (WebCore::RenderObject::hasSelectedChildren):
2071         (WebCore::RenderObject::isMarginBeforeQuirk):
2072         (WebCore::RenderObject::isMarginAfterQuirk):
2073         (WebCore::RenderObject::setMarginBeforeQuirk):
2074         (WebCore::RenderObject::setMarginAfterQuirk):
2075         (WebCore::RenderObject::everHadLayout):
2076         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
2077         (WebCore::RenderObject::RenderObjectBitfields::selectionState):
2078         (WebCore::RenderObject::RenderObjectBitfields::setSelectionState):
2079         (WebCore::RenderObject::setNeedsPositionedMovementLayout):
2080         (WebCore::RenderObject::setNormalChildNeedsLayout):
2081         (WebCore::RenderObject::setPosChildNeedsLayout):
2082         (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
2083         (WebCore::RenderObject::setPaintBackground):
2084         (WebCore::RenderObject::setIsDragging):
2085         (WebCore::RenderObject::setEverHadLayout):
2086         (WebCore::RenderObject::setNeedsLayout):
2087         (WebCore::RenderObject::setChildNeedsLayout):
2088         * rendering/RenderObjectChildList.cpp:
2089         (WebCore::RenderObjectChildList::removeChildNode):
2090         * rendering/svg/RenderSVGContainer.cpp:
2091         (WebCore::RenderSVGContainer::layout):
2092
2093 2011-12-15  Wei Charles  <charles.wei@torchmobile.com.cn>
2094
2095         [BlackBerry] Upstream BlackBerry porting of pluginView
2096         https://bugs.webkit.org/show_bug.cgi?id=73397
2097
2098         Reviewed by Daniel Bates.
2099
2100         No new tests for now.
2101
2102         * plugins/blackberry/PluginViewBlackBerry.cpp: Added.
2103
2104 2011-12-15  Joshua Bell  <jsbell@chromium.org>
2105
2106         IndexedDB: Can't pass DOMStringList to IDBDatabase.transaction()
2107         https://bugs.webkit.org/show_bug.cgi?id=74452
2108
2109         Reviewed by Adam Barth.
2110
2111         V8 code generator generated checks for DOMStringList arguments, then
2112         deferred to a function that only handled array inputs. This previously
2113         worked for IndexedDB because it would fall into a now-removed default
2114         handler.
2115
2116         Modified storage/indexeddb/transaction-basics.html to test this.
2117
2118         * bindings/v8/V8Binding.cpp:
2119         (WebCore::v8ValueToWebCoreDOMStringList):
2120
2121 2011-12-15  Adam Klein  <adamk@chromium.org>
2122
2123         Make Element::setAttributeInternal inline in an attempt to avoid function call overhead
2124         https://bugs.webkit.org/show_bug.cgi?id=74638
2125
2126         Reviewed by Andreas Kling.
2127
2128         In r102695, I factored common code in setAttribute into
2129         Element::setAttributeInternal. This may have caused a perf regression
2130         due to the extra function call, which inlining should eliminate.
2131
2132         Running Dromaeo locally suggests that this will improve performance
2133         by ~9% on the "dom-attr element.property = value" test (which assigns
2134         a value to an element's id).
2135
2136         * dom/Element.cpp:
2137         (WebCore::Element::setAttributeInternal):
2138
2139 2011-12-15  Mary Wu  <mary.wu@torchmobile.com.cn>
2140
2141         Upstream FileSystemBlackBerry.cpp into WebCore/platform/blackberry
2142         https://bugs.webkit.org/show_bug.cgi?id=74491
2143
2144         Reviewed by Rob Buis.
2145
2146         We are using POSIX porting of FileSystem, so here only implement other 
2147         necessary functions.
2148
2149         Initial upstream, no new tests.
2150
2151         * platform/blackberry/FileSystemBlackBerry.cpp: Added.
2152         (WebCore::homeDirectoryPath):
2153         (WebCore::fileSystemRepresentation):
2154         (WebCore::unloadModule):
2155         (WebCore::openTemporaryFile):
2156
2157 2011-12-15  Adrienne Walker  <enne@google.com>
2158
2159         [chromium] Clean up unnecessary leaf functions in GraphicsLayerChromium
2160         https://bugs.webkit.org/show_bug.cgi?id=74140
2161
2162         Reviewed by James Robinson.
2163
2164         Tested by existing compositor layout tests.
2165
2166         This is a follow-on cleanup to r102196, which made some of these
2167         functions less useful than they had been in the past.
2168
2169         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2170         (WebCore::GraphicsLayerChromium::setContentsOpaque):
2171         (WebCore::GraphicsLayerChromium::setBackfaceVisibility):
2172         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
2173         * platform/graphics/chromium/GraphicsLayerChromium.h:
2174
2175 2011-12-15  Kenneth Russell  <kbr@google.com>
2176
2177         Unreviewed, rolling out r103000.
2178         http://trac.webkit.org/changeset/103000
2179         https://bugs.webkit.org/show_bug.cgi?id=74658
2180
2181         Does not handle text/plain documents correctly.
2182
2183         * html/parser/HTMLTokenizer.cpp:
2184         * html/parser/HTMLTokenizer.h:
2185         * html/parser/HTMLTreeBuilder.cpp:
2186         * html/parser/HTMLTreeBuilder.h:
2187         * xml/parser/MarkupTokenizerBase.h:
2188
2189 2011-12-15  James Robinson  <jamesr@chromium.org>
2190
2191         [chromium] Set the CCLayerTreeHost pointer on LayerChromium instances eagerly
2192         https://bugs.webkit.org/show_bug.cgi?id=74477
2193
2194         Reviewed by Kenneth Russell.
2195
2196         This enforces that the m_layerTreeHost pointer on LayerChromium instances is always up to date, instead of
2197         lazily setting it in the paintContents loop. There are two invariants:
2198         1.) If a LayerChromium is the root layer of a CCLayerTreeHost, or is reachable via the children, mask, or
2199         replica pointers from the root layer of a CCLayerTreeHost, then that LayerChromium's m_layerTreeHost pointer
2200         refers to that CCLayerTreeHost
2201         2.) If a LayerChromium is not a root layer or reachable from a root layer of any CCLayerTreeHost, its
2202         CCLayerTreeHost pointer is nil.
2203
2204         Covered by several new layout tests in LayerChromiumTest
2205
2206         * platform/graphics/chromium/LayerChromium.cpp:
2207         (WebCore::LayerChromium::setLayerTreeHost):
2208         (WebCore::LayerChromium::setParent):
2209         (WebCore::LayerChromium::setMaskLayer):
2210         (WebCore::LayerChromium::setReplicaLayer):
2211         * platform/graphics/chromium/LayerChromium.h:
2212         * platform/graphics/chromium/TiledLayerChromium.cpp:
2213         (WebCore::TiledLayerChromium::createTile):
2214         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2215         (WebCore::CCLayerTreeHost::setRootLayer):
2216         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
2217         (WebCore::CCLayerTreeHost::paintLayerContents):
2218         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2219
2220 2011-12-15  Sheriff Bot  <webkit.review.bot@gmail.com>
2221
2222         Unreviewed, rolling out r102652 and r102717.
2223         http://trac.webkit.org/changeset/102652
2224         http://trac.webkit.org/changeset/102717
2225         https://bugs.webkit.org/show_bug.cgi?id=74674
2226
2227         Broke too many webs. (Requested by kling on #webkit).
2228
2229         * WebCore.exp.in:
2230
2231 2011-12-15  Anders Carlsson  <andersca@apple.com>
2232
2233         Lazily create the scrolling coordinator and add a setting for enabling it
2234         https://bugs.webkit.org/show_bug.cgi?id=74667
2235
2236         Reviewed by Darin Adler.
2237
2238         * WebCore.xcodeproj/project.pbxproj:
2239         Make ScrollingCoordinator.h a private header so it can be used in WebKit.
2240         * page/Page.cpp:
2241         (WebCore::Page::Page):
2242         Don't create the scrolling coordinator.
2243
2244         (WebCore::Page::~Page):
2245         Check for a null scrolling coordinator.
2246
2247         (WebCore::Page::scrollingCoordinator):
2248         Create the scrolling coordinator lazily.
2249
2250         * page/Settings.cpp:
2251         (WebCore::Settings::Settings):
2252         * page/Settings.h:
2253         (WebCore::Settings::setScrollingCoordinatorEnabled):
2254         (WebCore::Settings::scrollingCoordinatorEnabled):
2255         Add a setting for enabling the scrolling coordinator.
2256
2257         * rendering/RenderLayerBacking.cpp:
2258         (WebCore::RenderLayerBacking::RenderLayerBacking):
2259         Use a tile cache layer for the main frame when the scrolling coordinator is neabled.
2260
2261 2011-12-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2262
2263         Unreviewed. Fix build break when data-transfer-items is enabled.
2264
2265         * platform/efl/ClipboardEfl.cpp:
2266         (WebCore::ClipboardEfl::items):
2267         * platform/efl/ClipboardEfl.h:
2268
2269 2011-12-15  Adam Barth  <abarth@webkit.org>
2270
2271         <ruby><div><p><rp> parses incorrectly
2272         https://bugs.webkit.org/show_bug.cgi?id=74668
2273
2274         Reviewed by Darin Adler.
2275
2276         This patch updates our implementation to match a change to the HTML5
2277         specification regarding how <ruby> elements parse.  Previously, <rp>
2278         and similar tags used to pop the stack up to the <ruby> element.  Now
2279         the popping does not occur.
2280
2281         Tests: html5lib/runner.html
2282
2283         * html/parser/HTMLTreeBuilder.cpp:
2284
2285 2011-12-15  Daniel Sievers  <sievers@chromium.org>
2286
2287         [Chromium] Avoid strdup() for extra argument when tracing is disabled.
2288         https://bugs.webkit.org/show_bug.cgi?id=74637
2289
2290         Reviewed by James Robinson.
2291
2292         * platform/chromium/TraceEvent.h:
2293         (WebCore::internal::ScopeTracer::ScopeTracer):
2294
2295 2011-12-15  Rafael Weinstein  <rafaelw@chromium.org>
2296
2297         [MutationObservers] Add a document-level flag that can trivially be checked to avoid doing unnessary work if mutation observers absent
2298         https://bugs.webkit.org/show_bug.cgi?id=74641
2299
2300         Reviewed by Ojan Vafai.
2301
2302         This patch adds a byte of flags to Document, of which three bits are used to signal if any
2303         node owned by the document has a Mutation Observer of the given type. This is used to
2304         reduce the cost of discovering there are none to a single (inlined) method call and bit-check.
2305         Also, a similar byte of flags which was used to optimize a particular case when mutation observers
2306         are present has been removed, with the reasoning that we should first focus on minimizing impact on
2307         the null-case before optimizing particular in-use cases.
2308
2309         Also, MutationObserverInterestGroup is broken out into its own file (which probably should have happened
2310         earlier, but now avoids a circular header dependency).
2311
2312         No tests needed. This patch is just a refactor.
2313
2314         * CMakeLists.txt:
2315         * GNUmakefile.list.am:
2316         * Target.pri:
2317         * WebCore.gypi:
2318         * WebCore.vcproj/WebCore.vcproj:
2319         * WebCore.xcodeproj/project.pbxproj:
2320         * css/CSSMutableStyleDeclaration.cpp:
2321         * dom/CharacterData.cpp:
2322         * dom/ChildListMutationScope.cpp:
2323         * dom/Document.cpp:
2324         (WebCore::Document::Document):
2325         * dom/Document.h:
2326         (WebCore::Document::hasMutationObserversOfType):
2327         (WebCore::Document::hasMutationObservers):
2328         (WebCore::Document::addMutationObserverTypes):
2329         * dom/Element.cpp:
2330         * dom/MutationObserverInterestGroup.cpp: Added.
2331         (WebCore::MutationObserverInterestGroup::createIfNeeded):
2332         (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup):
2333         (WebCore::MutationObserverInterestGroup::isOldValueRequested):
2334         (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
2335         * dom/MutationObserverInterestGroup.h: Copied from Source/WebCore/dom/WebKitMutationObserver.h.
2336         (WebCore::MutationObserverInterestGroup::createForChildListMutation):
2337         (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation):
2338         (WebCore::MutationObserverInterestGroup::createForAttributesMutation):
2339         (WebCore::MutationObserverInterestGroup::hasOldValue):
2340         * dom/Node.cpp:
2341         (WebCore::Node::didMoveToNewOwnerDocument):
2342         (WebCore::Node::getRegisteredMutationObserversOfType):
2343         (WebCore::Node::notifyMutationObserversNodeWillDetach):
2344         * dom/Node.h:
2345         * dom/WebKitMutationObserver.cpp:
2346         (WebCore::WebKitMutationObserver::observe):
2347         * dom/WebKitMutationObserver.h:
2348
2349 2011-12-15  Adam Barth  <abarth@webkit.org>
2350
2351         <!DOCTYPE html><pre>&#x0a;&#x0a;A</pre> doesn't parse correctly
2352         https://bugs.webkit.org/show_bug.cgi?id=74658
2353
2354         Reviewed by Darin Adler.
2355
2356         Previously, we handled skipping newlines after <pre> in the tokenizer,
2357         which isn't how the spec handles them.  Instead, the spec skips them in
2358         the tree builder.  This isn't usually observable, except in the case of
2359         an HTML entity.  In that case, the tokenzier sees '&' (because the
2360         entity hasn't been decoded yet), but the tree builder sees '\n' (the
2361         decoded entity).  This patch fixes the bug by more closely aligning our
2362         implementation with the spec.
2363
2364         Test: html5lib/runner.html
2365
2366         * html/parser/HTMLTokenizer.cpp:
2367         (WebCore::HTMLTokenizer::reset):
2368         (WebCore::HTMLTokenizer::nextToken):
2369         * html/parser/HTMLTokenizer.h:
2370         * html/parser/HTMLTreeBuilder.cpp:
2371         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipAtMostOneLeadingNewline):
2372         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2373         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
2374         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
2375         * html/parser/HTMLTreeBuilder.h:
2376         * xml/parser/MarkupTokenizerBase.h:
2377
2378 2011-12-15  Kenneth Russell  <kbr@google.com>
2379
2380         Unreviewed, rolling out r102989.
2381         http://trac.webkit.org/changeset/102989
2382         https://bugs.webkit.org/show_bug.cgi?id=74580
2383
2384         Caused SHOULD NOT BE REACHED assertions in debug builds.
2385
2386         * css/CSSComputedStyleDeclaration.cpp:
2387         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2388         * css/CSSPrimitiveValueMappings.h:
2389         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2390         (WebCore::CSSPrimitiveValue::operator EBoxAlignment):
2391         * css/CSSStyleSelector.cpp:
2392         (WebCore::CSSStyleSelector::applyProperty):
2393         * rendering/RenderDeprecatedFlexibleBox.cpp:
2394         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2395         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2396         * rendering/RenderFullScreen.cpp:
2397         (createFullScreenStyle):
2398         * rendering/style/RenderStyle.h:
2399         (WebCore::InheritedFlags::boxPack):
2400         (WebCore::InheritedFlags::setBoxAlign):
2401         (WebCore::InheritedFlags::setBoxPack):
2402         (WebCore::InheritedFlags::initialBoxPack):
2403         * rendering/style/RenderStyleConstants.h:
2404         * rendering/style/StyleDeprecatedFlexibleBoxData.h:
2405
2406 2011-12-15  Ryosuke Niwa  <rniwa@webkit.org>
2407
2408         Touch make_name.pl in an attempt to make Qt bots happy.
2409
2410         * dom/make_names.pl:
2411         (printNamesHeaderFile):
2412
2413 2011-12-15  Kentaro Hara  <haraken@chromium.org>
2414
2415         Unreviewed. Rebaselined run-bindings-tests results.
2416
2417         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2418         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2419         * bindings/scripts/test/JS/JSTestObj.cpp:
2420
2421 2011-12-15  Luke Macpherson   <macpherson@chromium.org>
2422
2423         Separate box alignment and box pack values into separate enums.
2424         https://bugs.webkit.org/show_bug.cgi?id=74580
2425
2426         Reviewed by Darin Adler.
2427
2428         No new tests / refactoring only.
2429
2430         Separating these types cleans up the code by removing several assertions that
2431         values are in the correct ranges, as this is ensured by the type system.
2432
2433         * css/CSSComputedStyleDeclaration.cpp:
2434         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2435         * css/CSSPrimitiveValueMappings.h:
2436         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2437         (WebCore::CSSPrimitiveValue::operator EBoxPack):
2438         (WebCore::CSSPrimitiveValue::operator EBoxAlignment):
2439         * css/CSSStyleSelector.cpp:
2440         (WebCore::CSSStyleSelector::applyProperty):
2441         * rendering/RenderDeprecatedFlexibleBox.cpp:
2442         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2443         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2444         * rendering/RenderFullScreen.cpp:
2445         (createFullScreenStyle):
2446         * rendering/style/RenderStyle.h:
2447         (WebCore::InheritedFlags::boxPack):
2448         (WebCore::InheritedFlags::setBoxAlign):
2449         (WebCore::InheritedFlags::setBoxPack):
2450         (WebCore::InheritedFlags::initialBoxPack):
2451         * rendering/style/RenderStyleConstants.h:
2452         * rendering/style/StyleDeprecatedFlexibleBoxData.h:
2453
2454 2011-12-15  Kentaro Hara  <haraken@chromium.org>
2455
2456         REGRESSION(r102663): generate-bindings.pl runs every time
2457         https://bugs.webkit.org/show_bug.cgi?id=74481
2458
2459         Reviewed by Adam Barth.
2460
2461         See the comment #1 of bug 74481 for the cause of this bug.
2462
2463         This patch fixes generate-bindings.pl so that it generates .h and .cpp files
2464         even for IDL files that do not need .h and .cpp files. This is just to prevent
2465         build scripts from trying to generate .h and .cpp files at every build.
2466
2467         No new tests. No change in behavior.
2468
2469         * bindings/scripts/generate-bindings.pl:
2470         (generateEmptyHeaderAndCpp): Generates .h and .cpp files for IDL files
2471         that do not need .h and .cpp files.
2472         * bindings/scripts/test/CPP/CPPTestSupplemental.cpp: Added.
2473         * bindings/scripts/test/CPP/CPPTestSupplemental.h: Added.
2474         * bindings/scripts/test/GObject/GObjectTestSupplemental.cpp: Added.
2475         * bindings/scripts/test/GObject/GObjectTestSupplemental.h: Added.
2476         * bindings/scripts/test/JS/JSTestSupplemental.cpp: Added.
2477         * bindings/scripts/test/JS/JSTestSupplemental.h: Added.
2478         * bindings/scripts/test/ObjC/ObjCTestSupplemental.cpp: Added.
2479         * bindings/scripts/test/ObjC/ObjCTestSupplemental.h: Added.
2480         * bindings/scripts/test/V8/V8TestSupplemental.cpp: Added.
2481         * bindings/scripts/test/V8/V8TestSupplemental.h: Added.
2482
2483 2011-12-15  Jarred Nicholls  <jarred@sencha.com>
2484
2485         Unreviewed build fix. Mac build broken when CSS Filters enabled.
2486         Needed to move Filter headers out as private headers in WebCore.framework.
2487
2488         * WebCore.xcodeproj/project.pbxproj:
2489
2490 2011-12-15  Eric Seidel  <eric@webkit.org>
2491
2492         WebCore has two (disconnected) ways to keep track of updated widgets, should be unified
2493         https://bugs.webkit.org/show_bug.cgi?id=74367
2494
2495         Reviewed by Adam Barth.
2496
2497         It seems the FrameView updateWidgets set is needed for now,
2498         so just making FrameView::addWidgetToUpdate mark the DOM node
2499         as needing a widget update and later when it goes to call
2500         updateWidget() checking first if it needs an update.
2501
2502         No new tests, just adding an assert.
2503
2504         * html/HTMLEmbedElement.cpp:
2505         (WebCore::HTMLEmbedElement::updateWidget):
2506         * html/HTMLObjectElement.cpp:
2507         (WebCore::HTMLObjectElement::updateWidget):
2508         * html/HTMLPlugInImageElement.h:
2509         (WebCore::HTMLPlugInImageElement::needsWidgetUpdate):
2510         (WebCore::HTMLPlugInImageElement::setNeedsWidgetUpdate):
2511         * page/FrameView.cpp:
2512         (WebCore::FrameView::addWidgetToUpdate):
2513         (WebCore::FrameView::updateWidget):
2514
2515 2011-12-15  Alexandru Chiculita  <achicu@adobe.com>
2516
2517         Windows project file is broken. It has a missing </File> enclosing tag
2518         https://bugs.webkit.org/show_bug.cgi?id=74632
2519
2520         Reviewed by Anders Carlsson.
2521
2522         No new tests, just fixing the project file.
2523
2524         * WebCore.vcproj/WebCore.vcproj:
2525
2526 2011-12-15  Adam Barth  <abarth@webkit.org>
2527
2528         <table><tr><td><svg><desc><td> parses incorrectly
2529         https://bugs.webkit.org/show_bug.cgi?id=68106
2530
2531         Reviewed by Eric Seidel.
2532
2533         This patch updates our implementation of the HTML5 parser to account
2534         for recent changes in the spec.  The main change in this patch is to
2535         remove the "in foreign content" state from the tree builder.  Rather
2536         than maintaining this as a separate state, the parser now introspects
2537         on the stack of open elements to determine whether the parser is in
2538         foriegn content.  In the process, I've deleted some now-unused
2539         machinery in the tree builder.
2540
2541         Tested by the html5lib LayoutTests.  These tests show the progression
2542         in our spec compliance.
2543
2544         * html/parser/HTMLElementStack.cpp:
2545         * html/parser/HTMLElementStack.h:
2546         * html/parser/HTMLTreeBuilder.cpp:
2547         * html/parser/HTMLTreeBuilder.h:
2548         * mathml/mathattrs.in:
2549
2550 2011-12-15  Ryosuke Niwa  <rniwa@webkit.org>
2551
2552         m_hasCounterNodeMap and m_everHadLayout should be private to RenderObject
2553         https://bugs.webkit.org/show_bug.cgi?id=74645
2554
2555         Reviewed by Eric Seidel.
2556
2557         Made them private and added getters and setters as needed.
2558
2559         * rendering/RenderCounter.cpp:
2560         (WebCore::makeCounterNode):
2561         (WebCore::RenderCounter::destroyCounterNodes):
2562         (WebCore::updateCounters):
2563         (WebCore::RenderCounter::rendererStyleChanged):
2564         (showCounterRendererTree):
2565         * rendering/RenderFlowThread.cpp:
2566         (WebCore::RenderFlowThread::layout):
2567         * rendering/RenderObject.h:
2568         (WebCore::RenderObject::hasCounterNodeMap):
2569         (WebCore::RenderObject::setHasCounterNodeMap):
2570         (WebCore::RenderObject::everHadLayout):
2571         * rendering/svg/RenderSVGForeignObject.cpp:
2572         (WebCore::RenderSVGForeignObject::layout):
2573         * rendering/svg/RenderSVGImage.cpp:
2574         (WebCore::RenderSVGImage::layout):
2575         * rendering/svg/RenderSVGResourceContainer.cpp:
2576         (WebCore::RenderSVGResourceContainer::layout):
2577         * rendering/svg/RenderSVGResourceMarker.cpp:
2578         (WebCore::RenderSVGResourceMarker::layout):
2579         * rendering/svg/RenderSVGRoot.cpp:
2580         (WebCore::RenderSVGRoot::layout):
2581         * rendering/svg/RenderSVGShape.cpp:
2582         (WebCore::RenderSVGShape::layout):
2583         * rendering/svg/RenderSVGText.cpp:
2584         (WebCore::RenderSVGText::layout):
2585
2586 2011-12-15  Vsevolod Vlasov  <vsevik@chromium.org>
2587
2588         Not able to navigate the Resource tab options properly with arrow keys after adding the sticky-notes.
2589         https://bugs.webkit.org/show_bug.cgi?id=72013
2590
2591         Reviewed by Pavel Feldman.
2592
2593         * inspector/front-end/DatabaseQueryView.js:
2594         (WebInspector.DatabaseQueryView):
2595         (WebInspector.DatabaseQueryView.prototype._messagesClicked):
2596         * inspector/front-end/ResourcesPanel.js:
2597         (WebInspector.DatabaseTreeElement.prototype.onexpand):
2598
2599 2011-12-15  Anders Carlsson  <andersca@apple.com>
2600
2601         Add ScrollingCoordinator class and ENABLE_THREADED_SCROLLING define
2602         https://bugs.webkit.org/show_bug.cgi?id=74639
2603
2604         Reviewed by Andreas Kling.
2605
2606         Add a ScrollingCoordinator class and make it a member of Page. Tear it down
2607         when the page goes away.
2608
2609         * WebCore.xcodeproj/project.pbxproj:
2610         * page/Page.cpp:
2611         (WebCore::Page::Page):
2612         (WebCore::Page::~Page):
2613         * page/Page.h:
2614         (WebCore::Page::scrollingCoordinator):
2615         * page/ScrollingCoordinator.cpp: Added.
2616         (WebCore::ScrollingCoordinator::create):
2617         (WebCore::ScrollingCoordinator::ScrollingCoordinator):
2618         (WebCore::ScrollingCoordinator::~ScrollingCoordinator):
2619         (WebCore::ScrollingCoordinator::pageDestroyed):
2620         * page/ScrollingCoordinator.h: Added.
2621
2622 2011-12-15  Kenneth Russell  <kbr@google.com>
2623
2624         Rename WEBKIT_lose_context to WEBKIT_WEBGL_lose_context
2625         https://bugs.webkit.org/show_bug.cgi?id=71870
2626
2627         Reviewed by James Robinson.
2628
2629         Re-landing after original commit was rolled out.
2630
2631         Rename largely done with do-webcore-rename with a couple of
2632         necessary manual fixups. Ran WebGL layout tests.
2633
2634         * CMakeLists.txt:
2635         * DerivedSources.make:
2636         * DerivedSources.pri:
2637         * GNUmakefile.list.am:
2638         * Target.pri:
2639         * WebCore.gypi:
2640         * WebCore.xcodeproj/project.pbxproj:
2641         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2642         (WebCore::toJS):
2643         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2644         (WebCore::toV8Object):
2645         * html/canvas/WebGLExtension.h:
2646         * html/canvas/WebGLLoseContext.cpp: Copied from Source/WebCore/html/canvas/WebKitLoseContext.cpp.
2647         (WebCore::WebGLLoseContext::WebGLLoseContext):
2648         (WebCore::WebGLLoseContext::~WebGLLoseContext):
2649         (WebCore::WebGLLoseContext::getName):
2650         (WebCore::WebGLLoseContext::create):
2651         (WebCore::WebGLLoseContext::loseContext):
2652         (WebCore::WebGLLoseContext::restoreContext):
2653         * html/canvas/WebGLLoseContext.h: Copied from Source/WebCore/html/canvas/WebKitLoseContext.h.
2654         * html/canvas/WebGLLoseContext.idl: Copied from Source/WebCore/html/canvas/WebKitLoseContext.idl.
2655         * html/canvas/WebGLRenderingContext.cpp:
2656         (WebCore::WebGLRenderingContext::getExtension):
2657         (WebCore::WebGLRenderingContext::getSupportedExtensions):
2658         (WebCore::WebGLRenderingContext::maybeRestoreContext):
2659         * html/canvas/WebGLRenderingContext.h:
2660         * html/canvas/WebKitLoseContext.cpp: Removed.
2661         * html/canvas/WebKitLoseContext.h: Removed.
2662         * html/canvas/WebKitLoseContext.idl: Removed.
2663
2664 2011-12-15  Brady Eidson  <beidson@apple.com>
2665
2666         https://bugs.webkit.org/show_bug.cgi?id=74631
2667         HTMLMediaElement should not register for document activation callbacks as it doesn't use them
2668
2669         Reviewed by Eric Carlson.
2670
2671         No new tests. (No behavior change, pruning useless code)
2672
2673         * html/HTMLMediaElement.cpp:
2674         (WebCore::HTMLMediaElement::HTMLMediaElement):
2675         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2676         (WebCore::HTMLMediaElement::willMoveToNewOwnerDocument):
2677         (WebCore::HTMLMediaElement::didMoveToNewOwnerDocument):
2678
2679 2011-12-15  Eric Carlson  <eric.carlson@apple.com>
2680
2681         Text tracks should be treated differently according to their kind
2682         https://bugs.webkit.org/show_bug.cgi?id=72547
2683
2684         Reviewed by Sam Weinig.
2685
2686         Tests: media/track/track-default-attribute.html
2687                media/track/track-mode-not-changed-by-new-track.html
2688                media/track/track-mode-triggers-loading.html
2689
2690         * html/HTMLAudioElement.cpp:
2691         (WebCore::HTMLAudioElement::HTMLAudioElement): Add "createdByParser" parameter.
2692         (WebCore::HTMLAudioElement::create): Ditto.
2693         (WebCore::HTMLAudioElement::createForJSConstructor): Deal with constructor change.
2694         * html/HTMLAudioElement.h:
2695
2696         * html/HTMLMediaElement.cpp:
2697         (WebCore::HTMLMediaElement::HTMLMediaElement): Add "createdByParser" parameter. Initialize m_parsingInProgress.
2698         (WebCore::HTMLMediaElement::finishParsingChildren): Clear m_parsingInProgress. Schedule track
2699             loading if necessary.
2700         (WebCore::HTMLMediaElement::loadTimerFired): Call configureTextTracks not call scheduleLoad, 
2701             it just schedules the load timer again.
2702         (WebCore::HTMLMediaElement::prepareForLoad): Add all non-disabled track elements to a vector
2703             so we can prevent the media element's readyState from reaching HAVE_METADATA until the
2704             tracks are ready.
2705         (WebCore::HTMLMediaElement::textTracksAreReady): New. Return false unless all tracks that were
2706             not disabled when loading started have loaded or failed.
2707         (WebCore::HTMLMediaElement::textTrackReadyStateChanged): Call setReadyState when a track is
2708             stops loading.
2709         (WebCore::HTMLMediaElement::textTrackModeChanged): Trigger <track> loading when the mode
2710             changes to hidden or showing for the first time.
2711         (WebCore::HTMLMediaElement::setReadyState): Do not advance to HAVE_METADATA or higher while
2712             track elements are loading.
2713         (WebCore::HTMLMediaElement::addTrack): Removed.
2714         (WebCore::HTMLMediaElement::showingTrackWithSameKind): New.
2715         (WebCore::HTMLMediaElement::trackWasAdded):
2716         (WebCore::HTMLMediaElement::trackWillBeRemoved): Flag a track as unconfigured so it will be
2717             reconfigured if it is added to another element.
2718         (WebCore::HTMLMediaElement::userIsInterestedInThisLanguage): New.
2719         (WebCore::HTMLMediaElement::userIsInterestedInThisTrack): New. Consider user preferences.
2720         (WebCore::HTMLMediaElement::configureTextTrack): New. Configure a track as per the user's preferences.
2721         (WebCore::HTMLMediaElement::configureTextTracks): New. Configure all track elements.
2722         * html/HTMLMediaElement.h:
2723         * html/HTMLMediaElement.h:
2724
2725         * html/HTMLTagNames.in: Add constructorNeedsCreatedByParser to audio and video.
2726
2727         * html/HTMLTrackElement.cpp:
2728         (WebCore::HTMLTrackElement::HTMLTrackElement): Initialize m_hasBeenConfigured.
2729         * html/HTMLTrackElement.h:
2730         (WebCore::HTMLTrackElement::hasBeenConfigured):
2731         (WebCore::HTMLTrackElement::setHasBeenConfigured):
2732
2733         * html/HTMLVideoElement.cpp:
2734         (WebCore::HTMLVideoElement::HTMLVideoElement): Add "createdByParser" parameter.
2735         (WebCore::HTMLVideoElement::create): Ditto.
2736         * html/HTMLVideoElement.h:
2737
2738         * html/TextTrack.cpp:
2739         (WebCore::TextTrack::TextTrack): Initialize m_mode to DISABLED, not HIDDEN. Initialize m_showingByDefault.
2740         (WebCore::TextTrack::setMode): Clear the "showing by default" flag when a track's mode is
2741             explicitly set to SHOWING.
2742         (WebCore::TextTrack::mode): Return SHOWING whenever the "showing by default" flag is set.
2743         * html/TextTrack.h:
2744         (WebCore::TextTrack::showingByDefault):
2745         (WebCore::TextTrack::setShowingByDefault):
2746
2747         * html/TextTrackCue.cpp:
2748         (WebCore::TextTrackCue::isActive): Return false if a cue has no track, or if its track is disabled.
2749         (WebCore::TextTrackCue::setIsActive): Don't enable a cue if it has no track, or if its track
2750             is disabled.
2751
2752 2011-12-15  Brady Eidson  <beidson@apple.com>
2753
2754         Unreviewed, rolling out r102829.
2755         http://trac.webkit.org/changeset/102829
2756         https://bugs.webkit.org/show_bug.cgi?id=74533
2757
2758         Caused https://bugs.webkit.org/show_bug.cgi?id=74555
2759
2760         * html/HTMLPlugInImageElement.cpp:
2761         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2762         (WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument):
2763         (WebCore::HTMLPlugInImageElement::didMoveToNewOwnerDocument):
2764         (WebCore::HTMLPlugInImageElement::documentWillBecomeInactive):
2765         (WebCore::HTMLPlugInImageElement::documentDidBecomeActive):
2766         * html/HTMLPlugInImageElement.h:
2767
2768 2011-12-15  James Simonsen  <simonjam@chromium.org>
2769
2770         [Navigation Timing] Use monotonicallyIncreasingTime() instead of currentTime()
2771         https://bugs.webkit.org/show_bug.cgi?id=58354
2772
2773         Reviewed by Pavel Feldman.
2774
2775         No new tests. Relies on existing webtiming-* tests.
2776
2777         * CMakeLists.txt:
2778         * GNUmakefile.list.am:
2779         * WebCore.gypi:
2780         * WebCore.pro:
2781         * WebCore.vcproj/WebCore.vcproj:
2782         * WebCore.xcodeproj/project.pbxproj:
2783         * dom/Document.cpp: Use monotonic times.
2784         (WebCore::Document::setReadyState):
2785         (WebCore::Document::finishedParsing):
2786         * inspector/InspectorInstrumentation.cpp:
2787         (WebCore::InspectorInstrumentation::didFinishLoadingImpl): Convert monotonicFinishTime to wall time if needed.
2788         * inspector/InspectorResourceAgent.cpp:
2789         (WebCore::buildObjectForTiming): Convert monotonic requestTime to wall time.
2790         (WebCore::buildObjectForResourceResponse): Plumbing for above.
2791         (WebCore::buildObjectForCachedResource): Ditto.
2792         (WebCore::InspectorResourceAgent::willSendRequest): Ditto.
2793         (WebCore::InspectorResourceAgent::didReceiveResponse): Ditto.
2794         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): Ditto.
2795         * loader/DocumentLoadTiming.cpp: Added.
2796         (WebCore::DocumentLoadTiming::DocumentLoadTiming):
2797         (WebCore::DocumentLoadTiming::setNavigationStart): Determine reference time and root reference time.
2798         (WebCore::DocumentLoadTiming::addRedirect): Moved logic from MainResourceLoader.
2799         (WebCore::DocumentLoadTiming::convertMonotonicTimeToDocumentTime): Helper to compute wall time from monotonic time.
2800         * loader/DocumentLoadTiming.h: Turned into class. Made times monotonic.
2801         (WebCore::DocumentLoadTiming::setUnloadEventStart):
2802         (WebCore::DocumentLoadTiming::setUnloadEventEnd):
2803         (WebCore::DocumentLoadTiming::setRedirectStart):
2804         (WebCore::DocumentLoadTiming::setRedirectEnd):
2805         (WebCore::DocumentLoadTiming::setFetchStart):
2806         (WebCore::DocumentLoadTiming::setResponseEnd):
2807         (WebCore::DocumentLoadTiming::setLoadEventStart):
2808         (WebCore::DocumentLoadTiming::setLoadEventEnd):
2809         (WebCore::DocumentLoadTiming::setHasSameOriginAsPreviousDocument):
2810         (WebCore::DocumentLoadTiming::navigationStart):
2811         (WebCore::DocumentLoadTiming::unloadEventStart):
2812         (WebCore::DocumentLoadTiming::unloadEventEnd):
2813         (WebCore::DocumentLoadTiming::redirectStart):
2814         (WebCore::DocumentLoadTiming::redirectEnd):
2815         (WebCore::DocumentLoadTiming::redirectCount):
2816         (WebCore::DocumentLoadTiming::fetchStart):
2817         (WebCore::DocumentLoadTiming::responseEnd):
2818         (WebCore::DocumentLoadTiming::loadEventStart):
2819         (WebCore::DocumentLoadTiming::loadEventEnd):
2820         (WebCore::DocumentLoadTiming::hasCrossOriginRedirect):
2821         (WebCore::DocumentLoadTiming::hasSameOriginAsPreviousDocument):
2822         * loader/FrameLoader.cpp:
2823         (WebCore::FrameLoader::stopLoading):
2824         (WebCore::FrameLoader::commitProvisionalLoad):
2825         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
2826         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
2827         * loader/MainResourceLoader.cpp:
2828         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
2829         (WebCore::MainResourceLoader::willSendRequest): Moved logic to DocumentLoadTiming.
2830         (WebCore::MainResourceLoader::didReceiveData): Use monotonic time.
2831         (WebCore::MainResourceLoader::didFinishLoading): Ditto.
2832         (WebCore::MainResourceLoader::load):
2833         * page/DOMWindow.cpp:
2834         (WebCore::DOMWindow::dispatchLoadEvent):
2835         * page/DOMWindow.h: Removed dispatchTimedEvent. It doesn't really help in the new model.
2836         * page/PerformanceNavigation.cpp:
2837         (WebCore::PerformanceNavigation::redirectCount):
2838         * page/PerformanceTiming.cpp: Removed skew correction code. This should never happen now.
2839         (WebCore::PerformanceTiming::navigationStart):
2840         (WebCore::PerformanceTiming::unloadEventStart):
2841         (WebCore::PerformanceTiming::unloadEventEnd):
2842         (WebCore::PerformanceTiming::redirectStart):
2843         (WebCore::PerformanceTiming::redirectEnd):
2844         (WebCore::PerformanceTiming::fetchStart):
2845         (WebCore::PerformanceTiming::responseEnd):
2846         (WebCore::PerformanceTiming::domLoading):
2847         (WebCore::PerformanceTiming::domInteractive):
2848         (WebCore::PerformanceTiming::domContentLoadedEventStart):
2849         (WebCore::PerformanceTiming::domContentLoadedEventEnd):
2850         (WebCore::PerformanceTiming::domComplete):
2851         (WebCore::PerformanceTiming::loadEventStart):
2852         (WebCore::PerformanceTiming::loadEventEnd):
2853         (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): Used for ResourceLoadTiming.
2854         (WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds): Used for DocumentTiming and DocumentLoadTiming.
2855         * page/PerformanceTiming.h:
2856         * platform/network/ResourceLoadTiming.cpp:
2857         (WebCore::ResourceLoadTiming::convertResourceLoadTimeToDocumentTime):
2858         * platform/network/ResourceLoadTiming.h: Added helper function to convert to wall times. Added instructions for use.
2859
2860 2011-12-15  Martin Robinson  <mrobinson@igalia.com>
2861
2862         plugin crash
2863
2864         [GTK] Plugins sometimes crash WebKitGTK+ with Gdk-CRITICAL **: gdk_window_get_toplevel: assertion `GDK_IS_WINDOW (window)' failed
2865         https://bugs.webkit.org/show_bug.cgi?id=73719
2866
2867         Reviewed by Philippe Normand.
2868
2869         No new tests. It's difficult to test or reproduce this exact situation
2870         as it only occurs when running plugins under nspluginwrapper.
2871
2872         * plugins/gtk/PluginViewGtk.cpp:
2873         (WebCore::PluginView::platformGetValue): Properly handle when the plugin tries to
2874         get the window value when the GtkSocket is no longer realized.
2875
2876 2011-12-15  Martin Kosiba  <mkosiba@google.com>
2877
2878         Fix find on web pages with -webkit-user-select: none for Chromium
2879         https://bugs.webkit.org/show_bug.cgi?id=72281
2880
2881         Reviewed by Ryosuke Niwa.
2882
2883         Adding findStringAndScrollToVisible to Editor. This new method returns
2884         the new match as a range rather than modify the active selection.
2885
2886         Test: editing/text-iterator/findString-selection-disabled.html
2887
2888         * editing/Editor.cpp:
2889         (WebCore::Editor::findStringAndScrollToVisible):
2890         * editing/Editor.h:
2891
2892 2011-12-14  Anders Carlsson  <andersca@apple.com>
2893
2894         Add WTF::Function to wtf/Forward.h
2895         https://bugs.webkit.org/show_bug.cgi?id=74576
2896
2897         Reviewed by Adam Roben.
2898
2899         * bindings/scripts/CodeGeneratorJS.pm:
2900         (GenerateImplementation):
2901         Add a JSC:: qualifier to the Function flags to avoid ambiguities.
2902
2903 2011-12-15  Julien Chaffraix  <jchaffraix@webkit.org>
2904
2905         Hardware-backed renderLayer could avoid repainting during a positioned movement layout
2906         https://bugs.webkit.org/show_bug.cgi?id=74370
2907
2908         Reviewed by Simon Fraser.
2909
2910         Tests: compositing/absolute-position-changed-in-composited-layer.html
2911                compositing/absolute-position-changed-with-composited-parent-layer.html
2912                compositing/fixed-position-changed-in-composited-layer.html
2913                compositing/fixed-position-changed-within-composited-parent-layer.html
2914
2915         To be able to properly skip repainting after a positioned movement layout only, we
2916         needed to add more state to the current |setNeedsFullRepaint| method. As part of that
2917         we refactored the callers and internal fields to better match the new meaning.
2918
2919         * rendering/RenderBoxModelObject.cpp:
2920         (WebCore::RenderBoxModelObject::styleDidChange):
2921         Explicitely gave the RepaintStatus to setRepaintStatus.
2922
2923         * rendering/RenderLayer.cpp:
2924         (WebCore::RenderLayer::RenderLayer):
2925         (WebCore::RenderLayer::removeOnlyThisLayer):
2926         Updated those function after the renamings.
2927
2928         (WebCore::RenderLayer::updateLayerPositions):
2929         Ditto. Also added a sholdRepaintAfterLayout check.
2930
2931         (WebCore::RenderLayer::shouldRepaintAfterLayout):
2932         Heart of the optimization, if we just did a positioned movement layout of composited RenderLayer,
2933         then don't repaint. All the other cases should still trigger a repaint.
2934
2935         * rendering/RenderLayer.h:
2936         (WebCore::RenderLayer::setRepaintStatus):
2937         Renamed setNeedsFullRepaint to setRepaintStatus. Also added a new enum RepaintStatus.
2938
2939         * rendering/RenderObject.cpp:
2940         (WebCore::RenderObject::setLayerNeedsFullRepaint):
2941         Updated after the renamings.
2942
2943         (WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
2944         New method that pass a new value to the RenderLayer.
2945
2946         * rendering/RenderObject.h:
2947         (WebCore::RenderObject::setNeedsPositionedMovementLayout):
2948         Switched the call to the dedicated method.
2949
2950 2011-12-15  Antti Koivisto  <antti@apple.com>
2951
2952         Don't invoke CSSStyleSelector::pushParent before Text::recalcTextStyle
2953         https://bugs.webkit.org/show_bug.cgi?id=74575
2954
2955         Reviewed by Darin Adler.
2956         
2957         Text::recalcTextStyle never enters the style selector so pushing the state is not necessary
2958
2959         * dom/Element.cpp:
2960         (WebCore::Element::recalcStyle):
2961
2962 2011-12-15  Chris Marrin  <cmarrin@apple.com>
2963
2964         Fixed error in Target.pri.
2965
2966         Unreviewed.
2967
2968         * Target.pri:
2969
2970 2011-12-15  Alexander Pavlov  <apavlov@chromium.org>
2971
2972         Web Inspector: #hex colors are not highlighted in CSS files
2973         https://bugs.webkit.org/show_bug.cgi?id=74570
2974
2975         Reviewed by Pavel Feldman.
2976
2977         Drive by: highlight color keywords as colors, not as keywords.
2978
2979         * inspector/front-end/CSSKeywordCompletions.js:
2980         (WebInspector.CSSKeywordCompletions.colors):
2981         * inspector/front-end/SourceCSSTokenizer.js:
2982         (WebInspector.SourceCSSTokenizer):
2983         (WebInspector.SourceCSSTokenizer.prototype.nextToken):
2984         * inspector/front-end/SourceCSSTokenizer.re2js:
2985
2986 2011-12-14  Chris Marrin  <cmarrin@apple.com>
2987
2988         Hardware acceleration of W3C Filter Effects
2989         https://bugs.webkit.org/show_bug.cgi?id=68479
2990
2991         Reviewed by Simon Fraser.
2992
2993         Move FilterOperation(s) to platform/graphics/filters so it can be used to pass filter information 
2994         down to GraphicsLayer for hardware acceleration. This leaves the CustomFilterOperation subclass in
2995         rendering/style since it has dependencies outside platform. Some part of that class will
2996         eventually need to be down in platform.
2997
2998         * CMakeLists.txt:
2999         * GNUmakefile.list.am:
3000         * Target.pri:
3001         * WebCore.gypi:
3002         * WebCore.vcproj/WebCore.vcproj:
3003         * WebCore.xcodeproj/project.pbxproj:
3004         * platform/graphics/filters/FilterOperation.cpp: Renamed from Source/WebCore/rendering/style/FilterOperation.cpp.
3005         (WebCore::BasicColorMatrixFilterOperation::blend):
3006         (WebCore::BasicColorMatrixFilterOperation::passthroughAmount):
3007         (WebCore::BasicComponentTransferFilterOperation::blend):
3008         (WebCore::BasicComponentTransferFilterOperation::passthroughAmount):
3009         (WebCore::GammaFilterOperation::blend):
3010         (WebCore::BlurFilterOperation::blend):
3011         (WebCore::DropShadowFilterOperation::blend):
3012         * platform/graphics/filters/FilterOperation.h: Renamed from Source/WebCore/rendering/style/FilterOperation.h.
3013         (WebCore::FilterOperation::~FilterOperation):
3014         (WebCore::FilterOperation::operator!=):
3015         (WebCore::FilterOperation::blend):
3016         (WebCore::FilterOperation::getOperationType):
3017         (WebCore::FilterOperation::isSameType):
3018         (WebCore::FilterOperation::FilterOperation):
3019         (WebCore::PassthroughFilterOperation::create):
3020         (WebCore::PassthroughFilterOperation::operator==):
3021         (WebCore::PassthroughFilterOperation::PassthroughFilterOperation):
3022         (WebCore::ReferenceFilterOperation::create):
3023         (WebCore::ReferenceFilterOperation::reference):
3024         (WebCore::ReferenceFilterOperation::operator==):
3025         (WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
3026         (WebCore::BasicColorMatrixFilterOperation::create):
3027         (WebCore::BasicColorMatrixFilterOperation::amount):
3028         (WebCore::BasicColorMatrixFilterOperation::operator==):
3029         (WebCore::BasicColorMatrixFilterOperation::BasicColorMatrixFilterOperation):
3030         (WebCore::BasicComponentTransferFilterOperation::create):
3031         (WebCore::BasicComponentTransferFilterOperation::amount):
3032         (WebCore::BasicComponentTransferFilterOperation::operator==):
3033         (WebCore::BasicComponentTransferFilterOperation::BasicComponentTransferFilterOperation):
3034         (WebCore::GammaFilterOperation::create):
3035         (WebCore::GammaFilterOperation::amplitude):
3036         (WebCore::GammaFilterOperation::exponent):
3037         (WebCore::GammaFilterOperation::offset):
3038         (WebCore::GammaFilterOperation::operator==):
3039         (WebCore::GammaFilterOperation::GammaFilterOperation):
3040         (WebCore::BlurFilterOperation::create):
3041         (WebCore::BlurFilterOperation::stdDeviationX):
3042         (WebCore::BlurFilterOperation::stdDeviationY):
3043         (WebCore::BlurFilterOperation::operator==):
3044         (WebCore::BlurFilterOperation::BlurFilterOperation):
3045         (WebCore::SharpenFilterOperation::create):
3046         (WebCore::SharpenFilterOperation::amount):
3047         (WebCore::SharpenFilterOperation::radius):
3048         (WebCore::SharpenFilterOperation::threshold):
3049         (WebCore::SharpenFilterOperation::operator==):
3050         (WebCore::SharpenFilterOperation::SharpenFilterOperation):
3051         (WebCore::DropShadowFilterOperation::create):
3052         (WebCore::DropShadowFilterOperation::x):
3053         (WebCore::DropShadowFilterOperation::y):
3054         (WebCore::DropShadowFilterOperation::stdDeviation):
3055         (WebCore::DropShadowFilterOperation::color):
3056         (WebCore::DropShadowFilterOperation::operator==):
3057         (WebCore::DropShadowFilterOperation::DropShadowFilterOperation):
3058         * platform/graphics/filters/FilterOperations.cpp: Renamed from Source/WebCore/rendering/style/FilterOperations.cpp.
3059         (WebCore::FilterOperations::FilterOperations):
3060         (WebCore::FilterOperations::operator==):
3061         (WebCore::FilterOperations::operationsMatch):
3062         * platform/graphics/filters/FilterOperations.h: Renamed from Source/WebCore/rendering/style/FilterOperations.h.
3063         (WebCore::FilterOperations::operator!=):
3064         (WebCore::FilterOperations::clear):
3065         (WebCore::FilterOperations::operations):
3066         (WebCore::FilterOperations::size):
3067         (WebCore::FilterOperations::at):
3068
3069 2011-12-15  Igor Oliveira  <igor.oliveira@openbossa.org>
3070
3071         [Qt] Support requestAnimationFrame API
3072         https://bugs.webkit.org/show_bug.cgi?id=74528
3073
3074         Add necessary files to Target.pri when enabling requestAnimationFrame option.
3075
3076         Reviewed by Kenneth Rohde Christiansen.
3077
3078         * Target.pri:
3079
3080 2011-12-15  Otto Cheung  <ocheung@rim.com>
3081
3082         Removing BlackBerryCookieCache from the build system
3083         https://bugs.webkit.org/show_bug.cgi?id=74318
3084
3085         Reviewed by Rob Buis.
3086
3087         Removing any references to BlackBerryCookieCache in files that are upstreamed.
3088
3089         We are removing the BlackBerryCookieCache because the CookieManager cookie structure has been
3090         refactored to have a similar structure to the cache. Since the read speeds in both structures
3091         are similar, we no longer need the cache to speed up read performance.
3092
3093         No new tests, this patch by itself will not work. This patch is only removing
3094         the references to BlackBerryCookieCache in files that are upstreamed.
3095
3096         * PlatformBlackBerry.cmake:
3097         * platform/network/blackberry/NetworkJob.cpp:
3098         (WebCore::NetworkJob::handleNotifyHeaderReceived):
3099
3100 2011-12-15  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3101
3102         [Qt] Mobile theme improvements
3103
3104         Rubberstamped by Simon Hausmann.
3105
3106         - Invert the gradient on the checkboxes
3107         - Make the buttons on the multi select combobox work on floats
3108         - Mini cleanups
3109
3110         * platform/qt/RenderThemeQtMobile.cpp:
3111         (WebCore::StylePainterMobile::drawCheckableBackground):
3112         (WebCore::StylePainterMobile::drawMultipleComboButton):
3113         (WebCore::StylePainterMobile::getButtonImageSize):
3114         (WebCore::StylePainterMobile::drawComboBox):
3115
3116 2011-12-15  Peter Rybin  <peter.rybin@gmail.com>
3117
3118         Web Inspector: CodeGeneratorInspector.py convert script conditions to precompiler #ifs
3119         https://bugs.webkit.org/show_bug.cgi?id=74534
3120
3121         Reviewed by Pavel Feldman.
3122
3123         Generator is rewritten to add #if's to output.
3124
3125         * inspector/CodeGeneratorInspector.py:
3126         (DomainNameFixes.get_fixed_data.Res.get_guard.Guard.generate_open):
3127         (DomainNameFixes.get_fixed_data.Res.get_guard.Guard):
3128         (DomainNameFixes.get_fixed_data.Res.get_guard.Guard.generate_close):
3129         (DomainNameFixes.get_fixed_data.Res):
3130         (DomainNameFixes.get_fixed_data.Res.get_guard):
3131         (Generator.go):
3132         (Generator.process_event):
3133         (Generator.process_command):
3134         (Generator.process_types):
3135
3136 2011-12-15  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3137
3138         [Qt][WK2] Setting Download as action for navigation request crashes WebProcess
3139         https://bugs.webkit.org/show_bug.cgi?id=74526
3140
3141         Reviewed by Simon Hausmann.
3142
3143         Adding checks for networkcontext and networkAccessManager
3144         and return true in case they don't exist, following the same
3145         logic as if the CookieJar doesn't exist.
3146
3147         * platform/qt/ThirdPartyCookiesQt.cpp:
3148         (WebCore::thirdPartyCookiePolicyPermits):
3149
3150 2011-12-14  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3151
3152         [Qt] Get rid of layering violation in PluginViewQt
3153
3154         PluginViewQt has a layering violation in relying on QWebPagePrivate for
3155         the check if running under DRT. We remove this and add a specific flag
3156         in the PluginView for this check, enabled from DRTSupport. This isn't
3157         pretty, but an improvement over what's currently there.
3158
3159         Reviewed by Simon Hausmann.
3160
3161         * plugins/PluginView.h:
3162         * plugins/qt/PluginViewQt.cpp:
3163         (WebCore::PluginView::updatePluginWidget):
3164         (WebCore::setXKeyEventSpecificFields):
3165
3166 2011-12-14  Vsevolod Vlasov  <vsevik@chromium.org>
3167
3168         Web Inspector: Console should show network messages origins.
3169         https://bugs.webkit.org/show_bug.cgi?id=74521
3170
3171         Reviewed by Pavel Feldman.
3172
3173         * inspector/front-end/ConsoleMessage.js:
3174         (WebInspector.ConsoleMessageImpl.prototype._formatMessage):
3175
3176 2011-12-15  Rakesh KN  <rakesh.kn@motorola.com>
3177
3178         "user-select none" causes selection to incorrectly escape from clicked container
3179         https://bugs.webkit.org/show_bug.cgi?id=57289
3180
3181         Reviewed by Ryosuke Niwa.
3182
3183         Not selecting the nearest word from the target node if target node has -webkit-user-select:none
3184
3185         Test: fast/events/mouse-double-triple-click-should-not-select-next-node-for-user-select-none.html
3186
3187         * page/EventHandler.cpp:
3188         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
3189         If target node has webkit-user-select:none style then do not update the selection.
3190
3191 2011-12-13  Andrey Kosyakov  <caseq@chromium.org>
3192
3193         Web Inspector: Generated HAR is missing pages.startedDateTime
3194         https://bugs.webkit.org/show_bug.cgi?id=74188
3195
3196         Reviewed by Pavel Feldman.
3197
3198         * inspector/front-end/HAREntry.js:
3199         (WebInspector.HARLog.prototype._buildPages):
3200         * inspector/front-end/NetworkLog.js:
3201         (WebInspector.NetworkLog):
3202         (WebInspector.NetworkLog.prototype.get mainResourceStartTime):
3203         (WebInspector.NetworkLog.prototype._mainFrameNavigated):
3204         * inspector/front-end/NetworkPanel.js:
3205         (WebInspector.NetworkLogView.prototype._updateSummaryBar):
3206
3207 2011-12-15  Kenichi Ishibashi  <bashi@chromium.org>
3208
3209         Supports Unicode variation selector
3210         https://bugs.webkit.org/show_bug.cgi?id=50999
3211
3212         Reviewed by Nikolas Zimmermann.
3213
3214         Adds SimpleFontData::updateGlyphWithVariationSelector() which substitutes the
3215         glyph in question based on the selector. WidthIterator::advance() calls it
3216         when an unicode variation selector follows the character.
3217
3218         Test: fast/text/unicode-variation-selector.html
3219
3220         * platform/graphics/SimpleFontData.h: Added updateGlyphWithVariationSelector().
3221         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
3222         (WebCore::isUnicodeBMPVariationSelector): Added.
3223         (WebCore::isUnicodeSupplementaryVariationSelector): Added.
3224         (WebCore::SurrogatePairAwareTextIterator::hasTrailingVariationSelector): Added.
3225         * platform/graphics/SurrogatePairAwareTextIterator.h:
3226         * platform/graphics/WidthIterator.cpp:
3227         (WebCore::WidthIterator::advance): Changed to detect variation selectors.
3228         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
3229         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Added.
3230         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
3231         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
3232         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
3233         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
3234         * platform/graphics/mac/SimpleFontDataMac.mm:
3235         (WebCore::decomposeToUTF16): Ditto.
3236         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
3237         * platform/graphics/pango/SimpleFontDataPango.cpp:
3238         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
3239         * platform/graphics/qt/SimpleFontDataQt.cpp:
3240         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
3241         * platform/graphics/win/SimpleFontDataWin.cpp:
3242         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
3243         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
3244         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
3245         * platform/graphics/wx/SimpleFontDataWx.cpp:
3246         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
3247
3248 2011-12-15  Alexander Pavlov  <apavlov@chromium.org>
3249
3250         [v8] Expose the "filter" property in V8CSSStyleDeclaration
3251         https://bugs.webkit.org/show_bug.cgi?id=73426
3252
3253         Reviewed by Adam Barth.
3254
3255         Test: fast/css/style-enumerate-properties.html
3256
3257         The "filter" CSS property used to be masked to be compliant with JSC, but JSC has supported
3258         this property for quite a while.
3259
3260         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
3261         (WebCore::hasCSSPropertyNamePrefix): clean up WTF prefixes
3262         (WebCore::cssPropertyInfo): remove the "wasFilter" flag
3263         (WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): remove the "filter" check
3264         (WebCore::V8CSSStyleDeclaration::namedPropertyGetter): return the "filter" value as v8String
3265
3266 2011-12-15  Hajime Morrita  <morrita@chromium.org>
3267
3268         Unreviewed build fix attempt for Chromium Mac.
3269
3270         * page/PerformanceTiming.h:
3271
3272 2011-12-15  Alexander Pavlov  <apavlov@chromium.org>
3273
3274         Unreviewed, build fix after r102906 (poor merge).
3275
3276         * inspector/front-end/ProfileView.js:
3277         (WebInspector.CPUProfileType.prototype.buttonClicked):
3278
3279 2011-12-15  Vsevolod Vlasov  <vsevik@chromium.org>
3280
3281         Unreviewed revert of r102696 ([Navigation Timing] Use monotonicallyIncreasingTime() instead of currentTime()).
3282         Breaks inspector's network panel timeline on chromium.
3283
3284         * CMakeLists.txt:
3285         * GNUmakefile.list.am:
3286         * Target.pri:
3287         * WebCore.gypi:
3288         * WebCore.vcproj/WebCore.vcproj:
3289         * WebCore.xcodeproj/project.pbxproj:
3290         * dom/Document.cpp:
3291         (WebCore::Document::setReadyState):
3292         (WebCore::Document::finishedParsing):
3293         * inspector/InspectorInstrumentation.cpp:
3294         (WebCore::InspectorInstrumentation::didFinishLoadingImpl):
3295         * inspector/InspectorResourceAgent.cpp:
3296         (WebCore::buildObjectForTiming):
3297         (WebCore::buildObjectForResourceResponse):
3298         (WebCore::buildObjectForCachedResource):
3299         (WebCore::InspectorResourceAgent::willSendRequest):
3300         (WebCore::InspectorResourceAgent::didReceiveResponse):
3301         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
3302         * loader/DocumentLoadTiming.cpp: Removed.
3303         * loader/DocumentLoadTiming.h:
3304         (WebCore::DocumentLoadTiming::DocumentLoadTiming):
3305         * loader/FrameLoader.cpp:
3306         (WebCore::FrameLoader::stopLoading):
3307         (WebCore::FrameLoader::commitProvisionalLoad):
3308         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
3309         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
3310         * loader/MainResourceLoader.cpp:
3311         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
3312         (WebCore::MainResourceLoader::willSendRequest):
3313         (WebCore::MainResourceLoader::didReceiveData):
3314         (WebCore::MainResourceLoader::didFinishLoading):
3315         (WebCore::MainResourceLoader::load):
3316         * page/DOMWindow.cpp:
3317         (WebCore::DOMWindow::dispatchLoadEvent):
3318         (WebCore::DOMWindow::dispatchTimedEvent):
3319         * page/DOMWindow.h:
3320         * page/PerformanceNavigation.cpp:
3321         (WebCore::PerformanceNavigation::redirectCount):
3322         * page/PerformanceTiming.cpp:
3323         (WebCore::getPossiblySkewedTimeInKnownRange):
3324         (WebCore::PerformanceTiming::navigationStart):
3325         (WebCore::PerformanceTiming::unloadEventStart):
3326         (WebCore::PerformanceTiming::unloadEventEnd):
3327         (WebCore::PerformanceTiming::redirectStart):
3328         (WebCore::PerformanceTiming::redirectEnd):
3329         (WebCore::PerformanceTiming::fetchStart):
3330         (WebCore::PerformanceTiming::responseEnd):
3331         (WebCore::PerformanceTiming::domLoading):
3332         (WebCore::PerformanceTiming::domInteractive):
3333         (WebCore::PerformanceTiming::domContentLoadedEventStart):
3334         (WebCore::PerformanceTiming::domContentLoadedEventEnd):
3335         (WebCore::PerformanceTiming::domComplete):
3336         (WebCore::PerformanceTiming::loadEventStart):
3337         (WebCore::PerformanceTiming::loadEventEnd):
3338         (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute):
3339         * page/PerformanceTiming.h:
3340         * platform/network/ResourceLoadTiming.cpp: Removed.
3341         * platform/network/ResourceLoadTiming.h:
3342
3343 2011-12-15  Alexander Pavlov  <apavlov@chromium.org>
3344
3345         Unreviewed, fix Closure compiler warnings after r102905.
3346
3347         * inspector/front-end/CSSStyleModel.js: Add JSDoc annotations
3348
3349 2011-12-14  Alexander Pavlov  <apavlov@chromium.org>
3350
3351         Web Inspector: make ProfilesPanel scale as the number of ProfileTypes grows
3352         https://bugs.webkit.org/show_bug.cgi?id=74391
3353
3354         Reviewed by Pavel Feldman.
3355
3356         Whenever a profile is started, this change disables all profile recording buttons, except the one
3357         that correponds to the running profile. Once the profiling is finished, all buttons get enabled back again.
3358
3359         * English.lproj/localizedStrings.js:
3360         * inspector/front-end/ProfileView.js:
3361         (WebInspector.CPUProfileView.profileCallback):
3362         (WebInspector.CPUProfileType.prototype.get buttonTooltip):
3363         (WebInspector.CPUProfileType.prototype.get buttonStyle):
3364         (WebInspector.CPUProfileType.prototype.buttonClicked):
3365         * inspector/front-end/ProfilesPanel.js:
3366         (WebInspector.ProfilesPanel.prototype.get statusBarItems.clickHandler):
3367         (WebInspector.ProfilesPanel.prototype.get statusBarItems):
3368         (WebInspector.ProfilesPanel.prototype._addProfileHeader):
3369         (WebInspector.ProfilesPanel.prototype.updateProfileTypeButtons):
3370         (WebInspector.ProfilesPanel.prototype._updateInterface):
3371         (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
3372         (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
3373         (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
3374         (WebInspector.ProfilerDispatcher.prototype.setRecordingProfile):
3375         * inspector/front-end/inspector.css:
3376         (.record-cpu-profile-status-bar-item .glyph):
3377         (.record-cpu-profile-status-bar-item.toggled-on .glyph):
3378
3379 2011-12-15  Alexander Pavlov  <apavlov@chromium.org>
3380
3381         Web Inspector: [Styles] Update selected DOM element styles whenever applicable media queries change
3382         https://bugs.webkit.org/show_bug.cgi?id=74292
3383
3384         The change introduces and handles in the frontend a new event type for the CSS domain,
3385         "mediaQueryResultChanged", which gets fired every time a viewport-dependent media feature
3386         changes its value. This allows users to see live changes of the (media-dependent) matched
3387         rules for inspected elements.
3388
3389         Reviewed by Pavel Feldman.
3390
3391         * inspector/CodeGeneratorInspector.py:
3392         (DomainNameFixes):
3393         * inspector/Inspector.json:
3394         * inspector/InspectorCSSAgent.cpp:
3395         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
3396         (WebCore::InspectorCSSAgent::setFrontend):
3397         (WebCore::InspectorCSSAgent::clearFrontend):
3398         (WebCore::InspectorCSSAgent::restore):
3399         (WebCore::InspectorCSSAgent::enable):
3400         (WebCore::InspectorCSSAgent::disable):
3401         (WebCore::InspectorCSSAgent::mediaQueryResultChanged):
3402         * inspector/InspectorCSSAgent.h:
3403         * inspector/InspectorInstrumentation.cpp:
3404         (WebCore::InspectorInstrumentation::mediaQueryResultChangedImpl):
3405         * inspector/InspectorInstrumentation.h:
3406         (WebCore::InspectorInstrumentation::mediaQueryResultChanged):
3407         * inspector/front-end/CSSStyleModel.js:
3408         (WebInspector.CSSStyleModel):
3409         (WebInspector.CSSStyleModel.prototype.mediaQueryResultChanged):
3410         (WebInspector.CSSDispatcher):
3411         (WebInspector.CSSDispatcher.prototype.mediaQueryResultChanged):
3412         * inspector/front-end/MetricsSidebarPane.js:
3413         (WebInspector.MetricsSidebarPane):
3414         (WebInspector.MetricsSidebarPane.prototype._styleSheetOrMediaQueryResultChanged):
3415         * inspector/front-end/StylesSidebarPane.js:
3416         (WebInspector.StylesSidebarPane):
3417         (WebInspector.StylesSidebarPane.prototype._styleSheetOrMediaQueryResultChanged):
3418         * page/FrameView.cpp:
3419         (WebCore::FrameView::layout):
3420
3421 2011-12-14  Vsevolod Vlasov  <vsevik@chromium.org>
3422
3423         Web Inspector: [Regression] Network manager fails to show resource type and MIME type in incorrect MIME type console message.
3424         https://bugs.webkit.org/show_bug.cgi?id=74516
3425
3426         Reviewed by Pavel Feldman.
3427
3428         Test: http/tests/inspector/network/script-as-text-loading.html
3429
3430         * inspector/front-end/ConsoleMessage.js:
3431         (WebInspector.ConsoleMessageImpl.prototype._formatMessage):
3432         * inspector/front-end/NetworkManager.js:
3433         (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
3434
3435 2011-11-03  Kent Tamura  <tkent@chromium.org>
3436
3437         A spin button changes the value incorrectly if it is clicked after touch events.
3438         https://bugs.webkit.org/show_bug.cgi?id=71181
3439
3440         Reviewed by Ryosuke Niwa.
3441
3442         SpinButtonElement assumed setHovered(true) was always called before a
3443         mousemove event in the element. It is not true for touch events.
3444
3445         We should not reset m_upDownState to Indetermiante in setHovered(true),
3446         and should reset it when the mouse pointer moves out.
3447
3448         This change fixes the flakiness of fast/forms/input-step-as-double.html.
3449
3450         Test: fast/events/touch/touch-before-pressing-spin-button.html
3451
3452         * html/shadow/TextControlInnerElements.cpp:
3453         (WebCore::SpinButtonElement::defaultEventHandler):
3454         Add an assertion that m_upDownState should not be Indetermiante.
3455         Reset m_upDownState to Indeterminate when the mouse pointer moves out
3456         from the element.
3457         (WebCore::SpinButtonElement::setHovered):
3458         Reset m_upDownState to Indeterminate when the element becomes unhovered.
3459
3460 2011-12-14  Lucas Forschler  <lforschler@apple.com>
3461     
3462         https://bugs.webkit.org/show_bug.cgi?id=74543
3463         Add CSS*.cpp to a new CSSAllInOne.cpp file with two exceptions:
3464             CSSProperty.cpp
3465             CSSPrimitiveValue.cpp
3466         Adding these two broke things with a templates problem that was not easily fixable.
3467
3468         Reviewed by Steve Falkenburg.
3469
3470         * WebCore.vcproj/WebCore.vcproj:
3471         * css/CSSAllInOne.cpp: Added.
3472
3473 2011-12-14  Tim Horton  <timothy_horton@apple.com>
3474
3475         Generated images should respect the accelerated state of the context they're going to be drawn into
3476         https://bugs.webkit.org/show_bug.cgi?id=74577
3477         <rdar://problem/10584392>
3478
3479         Reviewed by Simon Fraser.
3480
3481         The tiled code path for GeneratorGeneratedImage and CrossfadeGeneratedImage blindly creates
3482         an unaccelerated ImageBuffer. Instead, take into account the accelerated state of the destination context.
3483
3484         No new tests, as this is a simple performance improvement.
3485
3486         * platform/graphics/CrossfadeGeneratedImage.cpp:
3487         (WebCore::CrossfadeGeneratedImage::drawPattern):
3488         * platform/graphics/GeneratorGeneratedImage.cpp:
3489         (WebCore::GeneratorGeneratedImage::drawPattern):
3490
3491 2011-12-14  Ilya Tikhonovsky  <loislo@chromium.org>
3492
3493         Web Inspector: cleanup unused variable introduced at r102803
3494
3495         * inspector/front-end/NetworkManager.js:
3496         (WebInspector.NetworkManager.prototype.enableResourceTracking):
3497         (WebInspector.NetworkManager.prototype.disableResourceTracking):
3498
3499 2011-12-14  Wei James  <james.wei@intel.com>
3500
3501         fast path to accelerate processing in AudioBus::processWithGainFromMonoStereo
3502         https://bugs.webkit.org/show_bug.cgi?id=74054
3503
3504         Reviewed by Kenneth Russell.
3505
3506         Avoid de-zippering when the gain has converged on the targetGain. 
3507         It can get about 75% performance gain at most when all frames don't need
3508         de-zippering.
3509
3510         * platform/audio/AudioBus.cpp:
3511         (WebCore::AudioBus::processWithGainFromMonoStereo):
3512
3513 2011-12-14  Adam Klein  <adamk@chromium.org>
3514
3515         Optimize MutationObserverInterestGroup construction
3516         https://bugs.webkit.org/show_bug.cgi?id=74563
3517
3518         Reviewed by Ojan Vafai.
3519
3520         Inline MutationObserverInterestGroup's creation methods and fix an
3521         accidental pass-by-value in an attempt to further reduce the CPU
3522         footprint of MutationObservers.
3523
3524         No new tests, refactor only.
3525
3526         * dom/WebKitMutationObserver.cpp:
3527         (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup): Pass observers HashMap by reference.
3528         * dom/WebKitMutationObserver.h:
3529         (WebCore::MutationObserverInterestGroup::createForChildListMutation): Inline.
3530         (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation): Inline.
3531         (WebCore::MutationObserverInterestGroup::createForAttributesMutation): Inline.
3532         (WebCore::MutationObserverInterestGroup::hasOldValue): Remove spurious inline keyword.
3533
3534 2011-12-14  Dominic Mazzoni  <dmazzoni@google.com>
3535
3536         Seeing crash in DRT after loading-iframe-sends-notification.html land
3537         https://bugs.webkit.org/show_bug.cgi?id=72624
3538
3539         When an iframe finishes loading, send an accessibility notification
3540         on the renderer, rather than on a parent node. The only reason it was
3541         being posted on a parent before was because there was no way to detect
3542         that in a test. This is simpler and now covered by the test.
3543
3544         Reviewed by Chris Fleizach.
3545
3546         Updates existing test:
3547         accessibility/loading-iframe-sends-notification.html
3548
3549         * dom/Document.cpp:
3550         (WebCore::Document::implicitClose):
3551
3552 2011-12-14  Nat Duca  <nduca@chromium.org>
3553
3554         [chromium] Add inhibitDraw to CCScheduler and drop root impl to prevent background flash on tab restore
3555         https://bugs.webkit.org/show_bug.cgi?id=74351
3556
3557         Reviewed by James Robinson.
3558
3559         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3560         (WebCore::CCLayerTreeHost::setNeedsCommit):
3561         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
3562         * platform/graphics/chromium/cc/CCScheduler.cpp:
3563         (WebCore::CCScheduler::getNextAction):
3564         (WebCore::CCScheduler::processScheduledActions):
3565         * platform/graphics/chromium/cc/CCScheduler.h:
3566         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
3567         (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine):
3568         (WebCore::CCSchedulerStateMachine::nextAction):
3569         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
3570         (WebCore::CCSchedulerStateMachine::setInhibitDraw):
3571         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3572         (WebCore::CCThreadProxy::setVisibleOnImplThread):
3573         (WebCore::CCThreadProxy::inhibitDraw):
3574         * platform/graphics/chromium/cc/CCThreadProxy.h:
3575
3576 2011-12-14  Ken Buchanan  <kenrb@chromium.org>
3577
3578         Crash due to incorrect parsing of isolates
3579         https://bugs.webkit.org/show_bug.cgi?id=74311
3580         When <bdi> content is wrapped, all hell breaks loose
3581         https://bugs.webkit.org/show_bug.cgi?id=74396
3582
3583         Reviewed by Eric Seidel.
3584
3585         When an isolate was encountered during run layout, the entire isolate
3586         would be parsed, even if the run started in the middle of the isolate.
3587         This would sometimes cause parts of the isolate to be added multiple
3588         times as runs. This patch marks the starting position within the
3589         isolate so nothing is parsed twice.
3590
3591         This patch changes appendRun() so that when a run is added that is
3592         inside an isolate, it saves the start position of the run rather than
3593         the root. This allows constructBidiRuns() to resume parsing the
3594         isolate from the correct position.
3595
3596         The change to RenderBox partially reverts a previous change I had
3597         done. It makes sense to screen for the condition, as was previously
3598         the case.
3599
3600         This patch does not add the test case from 74396 because a separate
3601         bug is preventing it from rendering correctly.
3602
3603         * rendering/InlineIterator.h:
3604         (WebCore::addPlaceholderRunForIsolatedInline)
3605         (WebCore::IsolateTracker::addFakeRunIfNecessary)
3606         (WebCore::InlineBidiResolver::appendRun)
3607         * rendering/RenderBlockLineLayout.cpp:
3608         (WebCore::RenderBlockLineLayout::constructBidiRuns)
3609         * rendering/RenderBox.cpp:
3610         (WebCore::RenderBox::positionLineBox)
3611
3612 2011-12-14  Jing Zhao  <jingzhao@chromium.org>
3613
3614         Opening two popup menus by dispatchEvent() makes problems.
3615         https://bugs.webkit.org/show_bug.cgi?id=73304
3616
3617         Reviewed by Kent Tamura.
3618
3619         By using element.dispatchEvent(), a user written script can open two
3620         popup menus, which causes various problems in different platforms.
3621
3622         Add a hasOpenedPopup() method in ChromeClient and a wrapper in Chrome.
3623         In RenderMenuList::showPopup(), check if there is an opened popup menu
3624         before opening a new popup menu.
3625
3626         Test: fast/forms/select-popup-crash.html
3627
3628         * loader/EmptyClients.h: Overrides hasOpenedPopup().
3629         (WebCore::EmptyChromeClient::hasOpenedPopup): Returns false as a default case.
3630         * page/Chrome.cpp:
3631         (WebCore::Chrome::hasOpenedPopup): Calls ChromeClient::hasOpenedPopup().
3632         * page/Chrome.h: Declares hasOpenedPopup().
3633         * page/ChromeClient.h: Declares hasOpenedPopup() as a pure virtual function.
3634         * rendering/RenderMenuList.cpp:
3635         (WebCore::RenderMenuList::showPopup): Calls Chrome::hasOpenedPopup() before opening a new popup menu.
3636
3637 2011-12-14  Tony Chang  <tony@chromium.org>
3638
3639         Clean up style in CSSStyleSelector.cpp
3640         https://bugs.webkit.org/show_bug.cgi?id=74548
3641
3642         Reviewed by Ojan Vafai.
3643
3644         * css/CSSStyleSelector.cpp:
3645         (WebCore::CSSStyleSelector::styleForElement):
3646         (WebCore::CSSStyleSelector::pseudoStyleForElement):
3647
3648 2011-12-14  Kenneth Russell  <kbr@google.com>
3649
3650         Unreviewed, rolling out r102794.
3651         http://trac.webkit.org/changeset/102794
3652         https://bugs.webkit.org/show_bug.cgi?id=74220
3653
3654         Reapplying patch since it is not the cause of the problems
3655         described in bug 74220.
3656
3657         * bindings/v8/V8Proxy.cpp:
3658         (WebCore::V8Proxy::reportUnsafeAccessTo):
3659         * bindings/v8/V8Proxy.h:
3660         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
3661         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
3662
3663 2011-12-14  Sam Weinig  <weinig@apple.com>
3664
3665         Remove whitespace from InheritedPropertySheets attributes in
3666         vsprops files to appease the Visual Studio project migrator.
3667
3668         Reviewed by Adam Roben.
3669
3670         * WebCore.vcproj/QTMovieWinDebug.vsprops:
3671         * WebCore.vcproj/QTMovieWinDebugAll.vsprops:
3672         * WebCore.vcproj/QTMovieWinDebugCairoCFLite.vsprops:
3673         * WebCore.vcproj/QTMovieWinProduction.vsprops:
3674         * WebCore.vcproj/QTMovieWinRelease.vsprops:
3675         * WebCore.vcproj/QTMovieWinReleaseCairoCFLite.vsprops:
3676         * WebCore.vcproj/WebCoreDebug.vsprops:
3677         * WebCore.vcproj/WebCoreDebugAll.vsprops:
3678         * WebCore.vcproj/WebCoreDebugCairoCFLite.vsprops:
3679         * WebCore.vcproj/WebCoreProduction.vsprops:
3680         * WebCore.vcproj/WebCoreRelease.vsprops:
3681         * WebCore.vcproj/WebCoreReleaseCairoCFLite.vsprops:
3682
3683 2011-12-14  Enrica Casucci  <enrica@apple.com>
3684
3685         One more attempt to fix the release build (hopefully the last)
3686
3687         Unreviewed.
3688
3689         * editing/ReplaceSelectionCommand.cpp: Added NodeRenderStyle.h
3690
3691 2011-12-14  Kenneth Russell  <kbr@google.com>
3692
3693         Unreviewed, rolling out r102816.
3694         http://trac.webkit.org/changeset/102816
3695         https://bugs.webkit.org/show_bug.cgi?id=74415
3696
3697         Implicated in font-related crashes on Chromium canaries.
3698
3699         * platform/graphics/chromium/FontChromiumWin.cpp:
3700         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
3701         (WebCore::Font::drawGlyphs):
3702         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
3703         (WebCore::FontPlatformData::FontPlatformData):
3704         (WebCore::FontPlatformData::operator=):
3705         (WebCore::FontPlatformData::~FontPlatformData):
3706         * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
3707         (WebCore::FontPlatformData::size):
3708         (WebCore::FontPlatformData::hash):
3709         * platform/graphics/skia/SkiaFontWin.cpp:
3710         (WebCore::setupPaintForFont):
3711         (WebCore::paintSkiaText):
3712         * platform/graphics/skia/SkiaFontWin.h:
3713
3714 2011-12-14  Simon Fraser  <simon.fraser@apple.com>
3715
3716         Filter amounts should accept percentages
3717         https://bugs.webkit.org/show_bug.cgi?id=74531
3718
3719         Reviewed by Chris Marrin.
3720         
3721         Support percentage arguments for some filter functions, using the FPercent flag
3722         to validUnit(). Fix CSSStyleSelector::createFilterOperations() to do the divide by 100
3723         for percentages.
3724         
3725         Replaced isValidFilterArgument(), which just tested arguments one by one for validity, with
3726         parseBuiltinFilterArguments() which tests and creates the CSSValues at the same time, which
3727         is a little more efficient. It also allows filter-specific behavior to be more localized in this
3728         method.
3729
3730         Covered by existing tests.
3731
3732         * css/CSSParser.cpp:
3733         (WebCore::CSSParser::parseBuiltinFilterArguments):
3734         (WebCore::CSSParser::parseFilter):
3735         * css/CSSParser.h:
3736         * css/CSSStyleSelector.cpp:
3737         (WebCore::CSSStyleSelector::createFilterOperations):
3738
3739 2011-12-14  Enrica Casucci  <enrica@apple.com>
3740
3741         Build fix.
3742
3743         Unreviewed.
3744
3745         * editing/ReplaceSelectionCommand.cpp: Added include RenderStyle.h
3746
3747 2011-12-14  Hajime Morrita  <morrita@chromium.org>
3748
3749         JS_INLINE and WTF_INLINE should be visible from WebCore
3750         https://bugs.webkit.org/show_bug.cgi?id=73191
3751
3752         Reviewed by Kevin Ollivier.
3753
3754         - Moved export related definitions from config.h
3755           to ExportMacros.h, JSExportMacros.h and PlatformExportMacros.h
3756         - Added forwarding headers which are referred from config.h
3757
3758         No new tests. Only build related changes.
3759
3760         * ForwardingHeaders/runtime/JSExportMacros.h: Added.
3761         * ForwardingHeaders/wtf/ExportMacros.h: Added.
3762         * WebCore.xcodeproj/project.pbxproj:
3763         * config.h:
3764         * platform/PlatformExportMacros.h: Copied from Source/JavaScriptCore/wtf/ExportMacros.h.
3765
3766 2011-12-14  Enrica Casucci  <enrica@apple.com>
3767
3768         Need a way to produce leaner markup when pasting a fragment containing verbose markup
3769         https://bugs.webkit.org/show_bug.cgi?id=74514
3770         <rdar://problem/10208653>
3771
3772         Reviewed by Ryosuke Niwa.
3773
3774         This patch is another step in the direction of reducing the verbosity of the markup
3775         produced with editing operations.
3776         After the copied fragment is inserted in the document, it is analyzed to remove all
3777         the elements that don't contribute to the style. The decision is made comparing the
3778         render styles. As part of the cleanup, unstyled divs with single child element are
3779         removed. The logic to determine the blocks that can be removed is the same used in
3780         DeleteSelectionCommand and has been moved in CompositeEditCommand.
3781         
3782         Test: editing/pasteboard/paste-and-sanitize.html
3783
3784         * editing/CompositeEditCommand.cpp:
3785         (WebCore::CompositeEditCommand::isRemovableBlock): Implements logic to determine
3786         if a block can be removed.
3787         * editing/CompositeEditCommand.h: Added isRemovableBlock declaration.
3788         * editing/DeleteSelectionCommand.cpp:
3789         (WebCore::DeleteSelectionCommand::removeRedundantBlocks): Implemented using
3790         isRemovableBlock from CompositeEditCommand.
3791         * editing/Editor.cpp:
3792         (WebCore::Editor::replaceSelectionWithFragment): Added SanitizeFragment option.
3793         * editing/ReplaceSelectionCommand.cpp:
3794         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand): Added initialization
3795         of m_sanitizeFragment member.
3796         (WebCore::ReplaceSelectionCommand::removeRedundantMarkup): New method implementing
3797         the cleanup logic.
3798         (WebCore::ReplaceSelectionCommand::doApply): Added call to removeRedundantMarkup
3799         after the fragment is inserted in the document.
3800         * editing/ReplaceSelectionCommand.h: Added new value to the enum CommandOption,
3801         a new member variable and the new method declaration.
3802
3803 2011-12-14  Adrienne Walker  <enne@google.com>
3804
3805         [chromium] Refactor tile drawing to be more data-driven
3806         https://bugs.webkit.org/show_bug.cgi?id=73059
3807
3808         Reviewed by James Robinson.
3809
3810         Partially tested by compositor layout tests. Debug borders and
3811         checkerboarding tested manually.
3812
3813         This is the first part of a move towards rendering quads on screen
3814         from a bag of data rather than in virtual CCLayerImpl::draw functions.
3815
3816         CCDrawQuad-derived classes store material-specific pieces of data to
3817         use when rendering. CCLayerImpl classes now create these CCDrawQuad
3818         objects rather than issuing direct GL commands. Where this data is
3819         shared between quads that come from the same layer, that data is
3820         stored in a CCSharedQuadState object rather than duplicated.
3821
3822         CCRenderPass is the class that holds the list of quads and the target
3823         surface that they draw into. Drawing a frame consists of drawing a
3824         series of render passes onto their respective surfaces.
3825
3826         CCLayerTreeHostImpl constructs these render passes from the output of
3827         calculateDrawTransformsAndVisibility by asking each layer to insert
3828         quads into a list and hands them off to LayerRendererChromium for
3829         rendering.
3830
3831         * WebCore.gypi:
3832         * platform/graphics/chromium/LayerRendererChromium.cpp:
3833         (WebCore::LayerRendererChromium::clearSurfaceForDebug):
3834         (WebCore::LayerRendererChromium::beginDrawingFrame):
3835         (WebCore::LayerRendererChromium::drawRenderPass):
3836         (WebCore::LayerRendererChromium::drawQuad):
3837         (WebCore::LayerRendererChromium::drawDebugBorderQuad):
3838         (WebCore::LayerRendererChromium::drawRenderSurfaceQuad):
3839         (WebCore::LayerRendererChromium::drawSolidColorQuad):
3840         (WebCore::tileUniformLocation):
3841         (WebCore::findTileProgramUniforms):
3842         (WebCore::LayerRendererChromium::drawTileQuad):
3843         (WebCore::LayerRendererChromium::drawCustomLayerQuad):
3844         (WebCore::LayerRendererChromium::finishDrawingFrame):
3845         (WebCore::LayerRendererChromium::useRenderSurface):
3846         * platform/graphics/chromium/LayerRendererChromium.h:
3847         * platform/graphics/chromium/ShaderChromium.h:
3848         (WebCore::FragmentTexAlphaBinding::edgeLocation):
3849         (WebCore::FragmentTexAlphaBinding::fragmentTexTransformLocation):
3850         (WebCore::FragmentTexOpaqueBinding::edgeLocation):
3851         (WebCore::FragmentTexOpaqueBinding::fragmentTexTransformLocation):
3852         * platform/graphics/chromium/TiledLayerChromium.cpp:
3853         (WebCore::TiledLayerChromium::pushPropertiesTo):
3854         * platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp: Added.
3855         (WebCore::CCCustomLayerDrawQuad::create):
3856         (WebCore::CCCustomLayerDrawQuad::CCCustomLayerDrawQuad):
3857         * platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h: Added.
3858         (WebCore::CCCustomLayerDrawQuad::layer):
3859         * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp: Added.
3860         (WebCore::CCDebugBorderDrawQuad::create):
3861         (WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad):
3862         * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h: Added.
3863         (WebCore::CCDebugBorderDrawQuad::color):
3864         (WebCore::CCDebugBorderDrawQuad::width):
3865         * platform/graphics/chromium/cc/CCDrawQuad.cpp: Added.
3866         (WebCore::CCDrawQuad::CCDrawQuad):
3867         (WebCore::CCDrawQuad::toDebugBorderDrawQuad):
3868         (WebCore::CCDrawQuad::toRenderSurfaceDrawQuad):
3869         (WebCore::CCDrawQuad::toSolidColorDrawQuad):
3870         (WebCore::CCDrawQuad::toTileDrawQuad):
3871         (WebCore::CCDrawQuad::toCustomLayerDrawQuad):
3872         * platform/graphics/chromium/cc/CCDrawQuad.h: Added.
3873         (WebCore::CCDrawQuad::quadRect):
3874         (WebCore::CCDrawQuad::quadTransform):
3875         (WebCore::CCDrawQuad::layerTransform):
3876         (WebCore::CCDrawQuad::layerRect):
3877         (WebCore::CCDrawQuad::clipRect):
3878         (WebCore::CCDrawQuad::opacity):
3879         (WebCore::CCDrawQuad::drawsOpaque):
3880         (WebCore::CCDrawQuad::needsBlending):
3881         (WebCore::CCDrawQuad::isLayerAxisAlignedIntRect):
3882         (WebCore::CCDrawQuad::material):
3883         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3884         (WebCore::CCLayerImpl::createSharedQuadState):
3885         (WebCore::CCLayerImpl::appendQuads):
3886         (WebCore::CCLayerImpl::appendDebugBorderQuad):
3887         (WebCore::CCLayerImpl::quadTransform):
3888         * platform/graphics/chromium/cc/CCLayerImpl.h:
3889         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3890         (WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces):
3891         (WebCore::computeScreenSpaceTransformForSurface):
3892         (WebCore::damageInSurfaceSpace):
3893         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3894         (WebCore::CCLayerTreeHostImpl::drawLayers):
3895         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3896         * platform/graphics/chromium/cc/CCRenderPass.cpp: Added.
3897         (WebCore::CCRenderPass::create):
3898         (WebCore::CCRenderPass::CCRenderPass):
3899         (WebCore::CCRenderPass::appendQuadsForLayer):
3900         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
3901         * platform/graphics/chromium/cc/CCRenderPass.h: Added.
3902         (WebCore::CCRenderPass::quadList):
3903         (WebCore::CCRenderPass::targetSurface):
3904         (WebCore::CCRenderPass::setSurfaceDamageRect):
3905         (WebCore::CCRenderPass::surfaceDamageRect):
3906         * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp: Added.
3907         (WebCore::CCRenderSurfaceDrawQuad::create):
3908         (WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad):
3909         * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h: Added.
3910         (WebCore::CCRenderSurfaceDrawQuad::layer):
3911         (WebCore::CCRenderSurfaceDrawQuad::surfaceDamageRect):
3912         * platform/graphics/chromium/cc/CCSharedQuadState.cpp: Added.
3913         (WebCore::CCSharedQuadState::create):
3914         (WebCore::CCSharedQuadState::CCSharedQuadState):
3915         (WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect):
3916         * platform/graphics/chromium/cc/CCSharedQuadState.h: Added.
3917         (WebCore::CCSharedQuadState::quadTransform):
3918         (WebCore::CCSharedQuadState::layerTransform):
3919         (WebCore::CCSharedQuadState::layerRect):
3920         (WebCore::CCSharedQuadState::clipRect):
3921         (WebCore::CCSharedQuadState::opacity):
3922         (WebCore::CCSharedQuadState::isOpaque):
3923         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp: Added.
3924         (WebCore::CCSolidColorDrawQuad::create):
3925         (WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
3926         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.h: Added.
3927         (WebCore::CCSolidColorDrawQuad::color):
3928         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp: Added.
3929         (WebCore::CCTileDrawQuad::create):
3930         (WebCore::CCTileDrawQuad::CCTileDrawQuad):
3931         * platform/graphics/chromium/cc/CCTileDrawQuad.h: Added.
3932         (WebCore::CCTileDrawQuad::textureId):
3933         (WebCore::CCTileDrawQuad::textureOffset):
3934         (WebCore::CCTileDrawQuad::textureSize):
3935         (WebCore::CCTileDrawQuad::textureFilter):
3936         (WebCore::CCTileDrawQuad::swizzleContents):
3937         (WebCore::CCTileDrawQuad::leftEdgeAA):
3938         (WebCore::CCTileDrawQuad::topEdgeAA):
3939         (WebCore::CCTileDrawQuad::rightEdgeAA):
3940         (WebCore::CCTileDrawQuad::bottomEdgeAA):
3941         (WebCore::CCTileDrawQuad::isAntialiased):
3942         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3943         (WebCore::CCTiledLayerImpl::CCTiledLayerImpl):
3944         (WebCore::CCTiledLayerImpl::quadTransform):
3945         (WebCore::CCTiledLayerImpl::appendQuads):
3946         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3947         (WebCore::CCTiledLayerImpl::setContentsSwizzled):
3948         (WebCore::CCTiledLayerImpl::contentsSwizzled):
3949
3950 2011-12-14  Ojan Vafai  <ojan@chromium.org>
3951
3952         Implement flexDirection and flexWrap and make flexFlow a proper shorthand.
3953         https://bugs.webkit.org/show_bug.cgi?id=74542
3954
3955         Reviewed by Tony Chang.
3956
3957         In a followup patch, I'll cleanup all the *Flow methods in RenderFlexibleBox.
3958
3959         Existing tests cover all the rendering behaviors, so only need to test
3960         the css property parsing.
3961
3962         * css/CSSComputedStyleDeclaration.cpp:
3963         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3964         * css/CSSMutableStyleDeclaration.cpp:
3965         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
3966         * css/CSSParser.cpp:
3967         (WebCore::CSSParser::parseValue):
3968         * css/CSSPrimitiveValueMappings.h:
3969         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3970         (WebCore::CSSPrimitiveValue::operator EFlexDirection):
3971         * css/CSSProperty.cpp:
3972         (WebCore::CSSProperty::isInheritedProperty):
3973         * css/CSSPropertyLonghand.cpp:
3974         (WebCore::initShorthandMap):
3975         * css/CSSPropertyNames.in:
3976         * css/CSSStyleApplyProperty.cpp:
3977         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
3978         * css/CSSStyleSelector.cpp:
3979         (WebCore::CSSStyleSelector::applyProperty):
3980         * rendering/RenderBox.cpp:
3981         (WebCore::RenderBox::sizesToIntrinsicLogicalWidth):
3982         * rendering/RenderFlexibleBox.cpp:
3983         (WebCore::RenderFlexibleBox::isColumnFlow):
3984         (WebCore::RenderFlexibleBox::isLeftToRightFlow):
3985         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
3986         (WebCore::RenderFlexibleBox::alignChildren):
3987         * rendering/style/RenderStyle.h:
3988         (WebCore::InheritedFlags::flexDirection):
3989         (WebCore::InheritedFlags::isColumnFlexDirection):
3990         (WebCore::InheritedFlags::setFlexDirection):
3991         (WebCore::InheritedFlags::initialFlexDirection):
3992         * rendering/style/RenderStyleConstants.h:
3993         * rendering/style/StyleFlexibleBoxData.cpp:
3994         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
3995         (WebCore::StyleFlexibleBoxData::operator==):
3996         * rendering/style/StyleFlexibleBoxData.h:
3997
3998 2011-12-13  Jon Lee  <jonlee@apple.com>
3999
4000         Enable notifications on Mac.
4001
4002         Reviewed by Sam Weinig.
4003
4004         * Configurations/FeatureDefines.xcconfig:
4005
4006 2011-12-14  Ryosuke Niwa  <rniwa@webkit.org>
4007
4008         COMPILE_ASSERT in CSSStyleSelector.cpp doesn't compile on Windows
4009         https://bugs.webkit.org/show_bug.cgi?id=74327
4010
4011         Reviewed by Darin Adler.
4012
4013         Always use unsigned instead of bool and unsigned in the bitfields of RuleData to shrink
4014         its size under MSVC.
4015
4016         Unlike gcc and clang, MSVC pads each consecutive member variables of the same type
4017         in bitfields. e.g. if you have:
4018         sturct AB {
4019             unsigned m_1 : 31;
4020             bool m_2 : 1;
4021         }
4022         then MSVC pads m_1 and allocates sizeof(unsigned) * 2 for AB whereas gcc and clang
4023         only allocate sizeof(unsigned) * 1 for AB.
4024
4025         * css/CSSStyleSelector.cpp:
4026         (WebCore::RuleData::RuleData):
4027
4028 2011-12-14  Ryosuke Niwa  <rniwa@webkit.org>
4029
4030         NodeChildList shouldn't be in NodeListNodeData
4031         https://bugs.webkit.org/show_bug.cgi?id=73969
4032
4033         Reviewed by Sam Weinig.
4034
4035         Move NodeChildList out of NodeListNodeData to separate it from the other node lists in order to
4036         resolve the bug 73853. Unlike other DynamicNodeList, we don't need to invalidate NodeChildList
4037         on ancestors when children change. Moving ChildNodeList out of NodeListNodeData makes this difference
4038         apparent and makes DynamicNodeList::Caches in NodeListNodeData always held by a DynamicSubtreeNodeList,
4039         eliminating the need for hasOwnCaches() checks in various places.
4040