Rename flex-align to flex-item-align.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-01-10  Ojan Vafai  <ojan@chromium.org>
2
3         Rename flex-align to flex-item-align.
4         https://bugs.webkit.org/show_bug.cgi?id=75929
5
6         Reviewed by Darin Adler.
7
8         The spec has changed and now flex-align will be set on
9         the flexbox itself.
10
11         * css/CSSComputedStyleDeclaration.cpp:
12         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
13         * css/CSSParser.cpp:
14         (WebCore::CSSParser::parseValue):
15         * css/CSSPrimitiveValueMappings.h:
16         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
17         (WebCore::CSSPrimitiveValue::operator EFlexAlign):
18         * css/CSSProperty.cpp:
19         (WebCore::CSSProperty::isInheritedProperty):
20         * css/CSSPropertyNames.in:
21         * css/CSSStyleApplyProperty.cpp:
22         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
23         * css/CSSStyleSelector.cpp:
24         (WebCore::CSSStyleSelector::applyProperty):
25         * rendering/RenderBox.cpp:
26         (WebCore::RenderBox::sizesToIntrinsicLogicalWidth):
27         * rendering/RenderFlexibleBox.cpp:
28         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
29         (WebCore::RenderFlexibleBox::alignChildren):
30         * rendering/style/RenderStyle.h:
31         (WebCore::RenderStyleBitfields::flexItemAlign):
32         (WebCore::RenderStyleBitfields::setFlexItemAlign):
33         (WebCore::RenderStyleBitfields::initialFlexItemAlign):
34         * rendering/style/RenderStyleConstants.h:
35         * rendering/style/StyleFlexibleBoxData.cpp:
36         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
37         (WebCore::StyleFlexibleBoxData::operator==):
38         * rendering/style/StyleFlexibleBoxData.h:
39
40 2012-01-10  Eric Carlson  <eric.carlson@apple.com>
41
42         Replace TextTrackCue "getCueAsSource" method with "text" attribute
43         https://bugs.webkit.org/show_bug.cgi?id=75646
44
45         Reviewed by Darin Adler.
46
47         Test: media/track/track-cue-mutable-text.html
48
49         * html/HTMLMediaElement.h: getCueAsSource() -> text().
50
51         * html/TextTrackCue.cpp:
52         (WebCore::TextTrackCue::setText): New. Set cue text and clear the document fragment.
53         (WebCore::TextTrackCue::getCueAsHTML): Allocate the document fragment if it doesn't exist.
54         * html/TextTrackCue.h:
55         (WebCore::TextTrackCue::text):
56         * html/TextTrackCue.idl: getCueAsSource() -> text().
57
58         * html/shadow/MediaControlRootElement.cpp:
59         (WebCore::MediaControlRootElement::updateTextTrackDisplay): getCueAsSource() -> text().
60         * html/shadow/MediaControlRootElementChromium.cpp:
61         (WebCore::MediaControlRootElementChromium::updateTextTrackDisplay): getCueAsSource() -> text().
62
63         * html/track/WebVTTParser.cpp:
64         (WebCore::WebVTTParser::collectCueText): processCueText is dead, long live createNewCue.
65         (WebCore::WebVTTParser::createDocumentFragmentFromCueText): New, split out of processCueText.
66             Create a document fragment from the String argument.
67         (WebCore::WebVTTParser::createNewCue): Split out of processCueText.
68         (WebCore::WebVTTParser::constructTreeFromToken): Add a comment pointing to the spec section
69             with the rules for DOM construction.
70         * html/track/WebVTTParser.h:
71
72 2012-01-10  Jer Noble  <jer.noble@apple.com>
73
74         REGRESSION (r102024): Having the Bing homepage open prevents idle sleep
75         https://bugs.webkit.org/show_bug.cgi?id=75972
76
77         Reviewed by Oliver Hunt.
78
79         No new tests; no testing infrastructure exists to test display sleep assertions.
80
81         Only disable idle and display sleep when a video element is not paused, not looping, and
82         has both a video and audio track.
83
84         * html/HTMLMediaElement.cpp:
85         (WebCore::HTMLMediaElement::mediaPlayerRateChanged): Factor into updateDisableSleep() and
86             shouldDisplaySleep().
87         (WebCore::HTMLMediaElement::setLoop): Ditto.
88         (WebCore::HTMLMediaElement::attributeChanged): Ditto.
89         (WebCore::HTMLMediaElement::updateDisableSleep):
90         (WebCore::HTMLMediaElement::shouldDisableSleep):
91         * html/HTMLMediaElement.h:
92
93 2012-01-09  Matthew Delaney  <mdelaney@apple.com>
94
95         [Mac] Accelerate canvas layers with the same logic as accelerating the canvas itself
96         https://bugs.webkit.org/show_bug.cgi?id=75921
97
98         Reviewed by Simon Fraser.
99
100         No new tests. Does not affect detectable behavior.
101
102         * rendering/RenderLayerCompositor.cpp: Use canvas's shouldAccelerate to avoid asking
103         uninitialized canvas's if they're accelerated or not.
104         (WebCore::RenderLayerCompositor::updateBacking):
105
106 2012-01-10  Daniel Sievers  <sievers@chromium.org>
107
108         [Chromium] Do not recreate texture updater for image layer if one exists.
109         https://bugs.webkit.org/show_bug.cgi?id=75589
110
111         Reviewed by James Robinson.
112
113         Test: platform/chromium/compositing/img-layer-grow.html
114
115         * platform/graphics/chromium/ImageLayerChromium.cpp:
116         (WebCore::ImageLayerChromium::createTextureUpdater):
117
118 2012-01-10  Mike Reed  <reed@google.com>
119
120         [skia] not all convex paths are convex, so recompute convexity for the problematic ones
121         https://bugs.webkit.org/show_bug.cgi?id=75960
122
123         Reviewed by Stephen White.
124
125         No new tests.
126         See related chrome issue
127         http://code.google.com/p/chromium/issues/detail?id=108605
128
129         * platform/graphics/skia/GraphicsContextSkia.cpp:
130         (WebCore::setPathFromConvexPoints):
131
132 2012-01-10  Gavin Barraclough  <barraclough@apple.com>
133
134         Do not allow Array length to be set if it is non-configurable
135         https://bugs.webkit.org/show_bug.cgi?id=75935
136
137         Reviewed by Sam Weinig.
138
139         * bindings/js/SerializedScriptValue.cpp:
140         (WebCore::CloneDeserializer::deserialize):
141             - remove unnecessary call to JSArray::setLength.
142
143 2012-01-10  Adrienne Walker  <enne@google.com>
144
145         [chromium] Draw debug tile borders on composited layers
146         https://bugs.webkit.org/show_bug.cgi?id=75680
147
148         Reviewed by James Robinson.
149
150         On tiled layers, draw debug borders on the tiles themselves. By
151         default, these are one pixel wide and transparent, so should be
152         unobtrusive but informative. They are triggered when the layer itself
153         would have a debug border via the existing flags.
154
155         Also, fix the drawDebugBorderQuad function to handle arbitrarily
156         positioned quads, not just full layer quads. Also, fix alpha issue
157         with debug borders.
158
159         * platform/graphics/chromium/LayerRendererChromium.cpp:
160         (WebCore::LayerRendererChromium::drawDebugBorderQuad):
161         * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp:
162         (WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad):
163         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
164         (WebCore::CCLayerImpl::appendDebugBorderQuad):
165         (WebCore::CCLayerImpl::quadTransform):
166         (WebCore::CCLayerImpl::hasDebugBorders):
167         * platform/graphics/chromium/cc/CCLayerImpl.h:
168         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
169         (WebCore::CCTiledLayerImpl::appendQuads):
170
171 2012-01-10  Joseph Pecoraro  <pecoraro@apple.com>
172
173         Web Inspector: Missing Implementation of Public InspectorDOMAgent Function
174         https://bugs.webkit.org/show_bug.cgi?id=75759
175
176         Follow-up: Remove the unused method. Keep the setter private.
177
178         Reviewed by Pavel Feldman.
179
180         * inspector/InspectorDOMAgent.cpp:
181         * inspector/InspectorDOMAgent.h:
182
183 2012-01-10  Pavel Feldman  <pfeldman@google.com>
184
185         Not reviewed, follow up to r104586: fix assertion within the loop.
186
187         * inspector/DOMEditor.cpp:
188         (WebCore::DOMEditor::patchChildren):
189
190 2012-01-10  Brady Eidson  <beidson@apple.com>
191
192         <rdar://problem/9328684> and https://bugs.webkit.org/show_bug.cgi?id=62764
193         Frequent crashes due to null frame below ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
194  
195         Reviewed by Maciej Stachowiak.
196
197         This is a non-reproducible high volume crash, so no test :(. 
198
199         * loader/DocumentLoader.cpp:
200         (WebCore::DocumentLoader::stopLoading): Don't re-run actual "stop loading" logic if the document loader is already
201           stopping loading. Also add an ASSERT that might catch cases where new loads may have been started while old loads
202           were being stopped.
203         (WebCore::DocumentLoader::detachFromFrame): Be conservative and stop loading when we detach a document loader from a frame. 
204
205 2012-01-10  Pavel Feldman  <pfeldman@google.com>
206
207         Not reviewed: fixing the Mac build.
208
209         * inspector/DOMEditor.cpp:
210         (WebCore::DOMEditor::patchChildren):
211
212 2012-01-09  Jer Noble  <jer.noble@apple.com>
213
214         Elements can appear over fullscreen video
215         https://bugs.webkit.org/show_bug.cgi?id=75913
216
217         Reviewed by Simon Fraser.
218
219         No new tests; updated fullscreen/full-screen-zIndex.html to trigger error condition.
220
221         RenderFullScreenPlaceholder inherits the pre-fullscreen element's style, causing a stacking
222         context to be created.  Instead of making the placeholder the parent of the RenderFullScreen
223         object, make the two renderers siblings.  Then the stacking context created by the placeholder
224         will not affect the z-ordering of the RenderFullScreen.
225
226         * rendering/RenderFullScreen.cpp:
227         (RenderFullScreen::wrapRenderer):
228         (RenderFullScreen::unwrapRenderer):
229         (RenderFullScreen::createPlaceholder):
230
231 2012-01-10  Pavel Feldman  <pfeldman@google.com>
232
233         Web Inspector: add "free flow DOM editing" experiment.
234         https://bugs.webkit.org/show_bug.cgi?id=75955
235
236         This change enables HTML editing from Resources panel experiment.
237
238         Reviewed by Yury Semikhatsky.
239
240         * CMakeLists.txt:
241         * English.lproj/localizedStrings.js:
242         * GNUmakefile.list.am:
243         * Target.pri:
244         * WebCore.gypi:
245         * WebCore.vcproj/WebCore.vcproj:
246         * WebCore.xcodeproj/project.pbxproj:
247         * inspector/DOMEditor.cpp: Added.
248         (WebCore::DOMEditor::DOMEditor):
249         (WebCore::DOMEditor::~DOMEditor):
250         (WebCore::DOMEditor::patch):
251         (WebCore::DOMEditor::NodeDigest::NodeDigest):
252         (WebCore::DOMEditor::patchElement):
253         (WebCore::DOMEditor::patchNode):
254         (WebCore::DOMEditor::patchChildren):
255         (WebCore::addStringToSHA1):
256         (WebCore::DOMEditor::createNodeDigest):
257         * inspector/DOMEditor.h: Added.
258         * inspector/InspectorDOMAgent.cpp:
259         (WebCore::InspectorDOMAgent::setOuterHTML):
260         * inspector/front-end/DOMAgent.js:
261         (WebInspector.DOMAgent):
262         (WebInspector.DOMModelResourceBinding):
263         (WebInspector.DOMModelResourceBinding.prototype.setContent):
264         (WebInspector.DOMModelResourceBinding.prototype.canSetContent):
265         * inspector/front-end/Settings.js:
266         (WebInspector.ExperimentsSettings):
267
268 2012-01-10  Stephen Chenney  <schenney@chromium.org>
269
270         [Chromium] Shift PathSkia to use Skia's new RawIter
271         https://bugs.webkit.org/show_bug.cgi?id=75703
272
273         Reviewed by Nikolas Zimmermann.
274
275         No new tests required - covered by existing tests.
276
277         * platform/graphics/Path.h: Added comments ont he return values from iteration.
278         * platform/graphics/skia/PathSkia.cpp:
279         (WebCore::Path::apply): Switched to SkPath::RawIter
280
281 2012-01-10  Peter Beverloo  <peter@chromium.org>
282
283         [Chromium] Use SkFontHost::GetUnitsPerEm instead of advanced type
284         metrics for Android in FontPlatformData
285         https://bugs.webkit.org/show_bug.cgi?id=75702
286
287         Reviewed by Stephen White.
288
289         Since Skia for Android doesn't implement advanced type metric routines,
290         use an alternative method to calculate the number of font units for an
291         em size. This will be exercized by existing layout tests, as it's being
292         used by the ComplexTextController.
293
294         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
295         (WebCore::FontPlatformData::emSizeInFontUnits):
296
297 2012-01-10  Vsevolod Vlasov  <vsevik@chromium.org>
298
299         Unreviewed, inspector style fix.
300
301         Web Inspector: elements tree is shifted 12px to the right.
302         https://bugs.webkit.org/show_bug.cgi?id=75609
303
304         * inspector/front-end/elementsPanel.css:
305         (#elements-content):
306
307 2012-01-10  Zoltan Herczeg  <zherczeg@webkit.org>
308
309         Fix style errors in CSSParser.cpp
310         https://bugs.webkit.org/show_bug.cgi?id=75854
311
312         Reviewed by Nikolas Zimmermann.
313
314         Minor style fixes.
315
316         * css/CSSParser.cpp:
317         (WebCore::CSSParser::parseValue):
318         (WebCore::CSSParser::parseShadow):
319         (WebCore::isBorderImageRepeatKeyword):
320         (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
321         (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
322         (WebCore::filterInfoForName):
323
324 2012-01-10  Julien Chaffraix  <jchaffraix@webkit.org>
325
326         REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling
327         https://bugs.webkit.org/show_bug.cgi?id=67100
328
329         Reviewed by Dan Bernstein.
330
331         Tests: fast/layers/scroll-with-transform-composited-layer.html
332                fast/layers/scroll-with-transform-layer.html
333
334         The regression came from a previous optimization that was wrongly kept after r93614.
335
336         * rendering/RenderLayer.cpp:
337         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
338         Remove the early return for transformed layer. This change worked as we used
339         to call updateLayerPositions from scrollTo which would call updateLayerPosition on
340         all our descendants. After r93614, this is no longer the case and we explicitely need
341         to call updateLayerPosition on our descendants from updateLayerPositionsAfterScroll.
342
343 2012-01-10  Stephen White  <senorblanco@chromium.org>
344
345         Fix Chrome/Mac build.
346
347         Build fix; unreviewed.
348
349         * platform/graphics/filters/skia/FEColorMatrixSkia.cpp:
350         (WebCore::luminanceToAlphaMatrix):
351
352 2012-01-06  Stephen White  <senorblanco@chromium.org>
353
354         [Skia] Switch FEColorMatrix to use a skia-based implementation when
355         compiling with USE(SKIA).  This change will also switch the software
356         implementation of FEGaussianBlur to the skia implementation (ie.,
357         it removes the acceleration check).
358         https://bugs.webkit.org/show_bug.cgi?id=75582
359
360         Reviewed by Dirk Schulze.
361
362         Covered by svg/W3C-SVG-1.1/filters-color-01-b.svg and friends (will
363         need a rebaseline).
364
365         * WebCore.gypi:
366         Add FEColorMatrixSkia.cpp to the build.
367         * platform/graphics/filters/FEColorMatrix.h:
368         Add platformApplySkia().
369         * platform/graphics/filters/FEGaussianBlur.cpp:
370         (WebCore::FEGaussianBlur::platformApplySoftware):
371         Remove skia-specific code from FEGaussianBlur::platformApplySoftware().
372         * platform/graphics/filters/FEGaussianBlur.h:
373         Make platformApplySkia() virtual, and put it behind #if USE(SKIA).
374         * platform/graphics/filters/FilterEffect.cpp:
375         (WebCore::FilterEffect::apply):
376         Call out to platformApplySkia(), or fall back to
377         platformApplySoftware().
378         * platform/graphics/filters/FilterEffect.h:
379         Add platformApplySkia().
380         * platform/graphics/filters/skia/FEColorMatrixSkia.cpp: Added.
381         (WebCore::saturateMatrix):
382         (WebCore::hueRotateMatrix):
383         (WebCore::luminanceToAlphaMatrix):
384         (WebCore::FEColorMatrix::platformApplySkia):
385         Process color matrix effect, by calling out to generic matrix
386         version of SkColorMatrixFilter.
387         * platform/graphics/filters/skia/FEGaussianBlurSkia.cpp:
388         (WebCore::FEGaussianBlur::platformApplySkia):
389         Change the signature of FEGaussianBlur::platformApplySkia to be an
390         override of the new FilterEffect base class version.
391
392 2012-01-10  Pavel Feldman  <pfeldman@google.com>
393
394         Web Inspector: fix DebuggerPresentationModel::uiSourceCodes - do not iterate
395         over same raw source code multiple times.
396         https://bugs.webkit.org/show_bug.cgi?id=75953
397
398         Reviewed by Yury Semikhatsky.
399
400         * inspector/front-end/DebuggerPresentationModel.js:
401         (WebInspector.DebuggerPresentationModel):
402         (WebInspector.DebuggerPresentationModel.prototype._bindScriptToRawSourceCode):
403         (WebInspector.DebuggerPresentationModel.prototype.uiSourceCodes):
404         (WebInspector.DebuggerPresentationModel.prototype.setFormatSource):
405         (WebInspector.DebuggerPresentationModel.prototype._consoleCleared):
406         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
407
408 2012-01-10  No'am Rosenthal  <noam.rosenthal@nokia.com>
409
410         [Qt] Enable CSS_FILTERS in Qt build
411         https://bugs.webkit.org/show_bug.cgi?id=75777
412
413         Enable CSS_FILTERS and unskip the tests.
414
415         Reviewed by Kenneth Rohde Christiansen.
416
417         Filter tests are now unskipped for Qt.
418
419         * Target.pri: add missing files to build.
420
421 2012-01-10  Pavel Feldman  <pfeldman@google.com>
422
423         Web Inspector: typo: NetworkAgent.canClearBrowserCache -> NetworkAgent.canClearBrowserCookies.
424         https://bugs.webkit.org/show_bug.cgi?id=75949
425
426         Reviewed by Andreas Kling.
427
428         * inspector/front-end/NetworkPanel.js:
429         (WebInspector.NetworkLogView):
430
431 2012-01-10  pfeldman@chomium.org  <pavel.feldman@gmail.com>
432
433         Web Inspector: restore front-end compilation
434         https://bugs.webkit.org/show_bug.cgi?id=75625
435
436         Reviewed by Yury Semikhatsky.
437
438         * inspector/front-end/ScriptsPanel.js:
439         (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.replaceSourceFrames):
440         * inspector/front-end/TabbedPane.js:
441         * inspector/front-end/externs.js:
442         (WebInspector.isCompactMode):
443         * inspector/front-end/treeoutline.js:
444
445 2012-01-10  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
446
447         Add NULL checks to setting access obtained on frame and document.
448         https://bugs.webkit.org/show_bug.cgi?id=72002
449
450         Reviewed by Andreas Kling.
451
452         Adds NULL checks to setting object where it's required.
453         Generally WebCore checks NULL which may be returned from setting object obtained
454         on frame or document but in some cases these are skipped. These checks are not
455         needed to setting's access on page object.
456
457         * html/HTMLCanvasElement.cpp:
458         (WebCore::HTMLCanvasElement::shouldAccelerate):
459         * loader/DocumentLoader.cpp:
460         (WebCore::DocumentLoader::scheduleArchiveLoad):
461         * loader/SubframeLoader.cpp:
462         (WebCore::SubframeLoader::requestPlugin):
463         * loader/appcache/ApplicationCacheGroup.cpp:
464         (WebCore::ApplicationCacheGroup::selectCache):
465         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
466         * page/DragController.cpp:
467         (WebCore::DragController::draggableNode):
468         * page/EventHandler.cpp:
469         (WebCore::EventHandler::handleMouseReleaseEvent):
470         * page/FocusController.cpp:
471         (WebCore::FocusController::advanceFocusInDocumentOrder):
472         * rendering/RenderFrameSet.cpp:
473         (WebCore::RenderFrameSet::flattenFrameSet):
474         * rendering/RenderIFrame.cpp:
475         (WebCore::RenderIFrame::flattenFrame):
476         * rendering/RenderLayerCompositor.cpp:
477         (WebCore::RenderLayerCompositor::updateBacking):
478         * rendering/RenderText.cpp:
479         (WebCore::SecureTextTimer::restartWithNewText):
480
481 2012-01-10  Andreas Kling  <awesomekling@apple.com>
482
483         Matched declaration cache should support mapped attribute declarations.
484         <http://webkit.org/b/75948>
485
486         Reviewed by Antti Koivisto.
487
488         Support caching of matches that include mapped attribute declarations.
489         To make this possible, let the cache hold references to the matched style declarations.
490         Otherwise, declarations are assumed to survive until ~CSSStyleSelector, which may not
491         be the case for CSSMappedAttributeDeclaration.
492
493         To avoid hoarding of stale CSSMappedAttributeDeclarations in the cache, do a sweep for
494         every 100 additions and garbage collect any entries containing a declaration that is
495         only referenced by the cache.
496
497         This increases cache hit rate by up to ~10% on the Alexa top sites.
498
499         * css/CSSStyleSelector.cpp:
500         (WebCore::CSSStyleSelector::CSSStyleSelector):
501         (WebCore::CSSStyleSelector::sweepMatchedDeclarationCache):
502         (WebCore::CSSStyleSelector::matchAllRules):
503         (WebCore::CSSStyleSelector::applyDeclarations):
504         (WebCore::CSSStyleSelector::addToMatchedDeclarationCache):
505         * css/CSSStyleSelector.h:
506
507 2012-01-10  Kenichi Ishibashi  <bashi@chromium.org>
508
509         Complex path should be used when UVS exists in text run
510         https://bugs.webkit.org/show_bug.cgi?id=75289
511
512         Uses complex path when a text run contains UVS. The range from U+180B to U+180D already uses complex path.
513         Removes unnecessary functions that were added by r102915.
514
515         Reviewed by Dan Bernstein.
516
517         No new tests. fast/text/unicode-variation-selector.html should take care of this change.
518
519         * platform/graphics/Font.cpp:
520         (WebCore::Font::codePath): Use Complex path when the text run contains UVS.
521         * platform/graphics/SimpleFontData.h: Removed updateGlyphWithVariationSelector().
522         * platform/graphics/SurrogatePairAwareTextIterator.cpp: Removed unnecessary static functions.
523         * platform/graphics/SurrogatePairAwareTextIterator.h: Removed hasTrailingVariationSelector().
524         * platform/graphics/WidthIterator.cpp:
525         (WebCore::WidthIterator::advance): Removed UVS detection code.
526         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: Removed updateGlyphWithVariationSelector().
527         * platform/graphics/freetype/SimpleFontDataFreeType.cpp: Ditto.
528         * platform/graphics/harfbuzz/SimpleFontDataSkia.cpp: Ditto.
529         * platform/graphics/mac/SimpleFontDataMac.mm: Ditto.
530         * platform/graphics/pango/SimpleFontDataPango.cpp: Ditto.
531         * platform/graphics/qt/SimpleFontDataQt.cpp: Ditto.
532         * platform/graphics/win/SimpleFontDataWin.cpp: Ditto.
533         * platform/graphics/wince/SimpleFontDataWinCE.cpp: Ditto.
534         * platform/graphics/wx/SimpleFontDataWx.cpp: Ditto.
535
536 2012-01-10  Kenichi Ishibashi  <bashi@chromium.org>
537
538         WebFonts are re-fetched from the server upon Document::styleSelectorChanged call.
539         https://bugs.webkit.org/show_bug.cgi?id=73419
540
541         Holds the CachedFont handle in CSSFontFaceSrcValue so that avoiding re-validation during style recalculation.
542
543         Reviewed by Dan Bernstein.
544
545         Test: http/tests/css/font-face-src-loading.html
546
547         * css/CSSFontFaceSrcValue.cpp:
548         (WebCore::CSSFontFaceSrcValue::cachedFont): Added.
549         * css/CSSFontFaceSrcValue.h:
550         * css/CSSFontSelector.cpp:
551         (WebCore::CSSFontSelector::addFontFaceRule): Gets the CachedFont from CSSFontFaceSrcValue object. The object will request the resource if it doesn't exist.
552
553 2012-01-10  pfeldman@chomium.org  <pavel.feldman@gmail.com>
554
555         Web Inspector: introduce experimental setting that makes source files always editable
556         https://bugs.webkit.org/show_bug.cgi?id=75626
557
558         Reviewed by Timothy Hatcher.
559
560         * English.lproj/localizedStrings.js:
561         * inspector/front-end/JavaScriptSourceFrame.js:
562         (WebInspector.JavaScriptSourceFrame):
563         (WebInspector.JavaScriptSourceFrame.prototype.setReadOnly):
564         * inspector/front-end/NetworkPanel.js:
565         (WebInspector.NetworkLogView):
566         * inspector/front-end/ScriptsNavigator.js:
567         (WebInspector.NavigatorScriptTreeElement.prototype.onselect):
568         * inspector/front-end/Settings.js:
569         (WebInspector.ExperimentsSettings):
570         * inspector/front-end/SourceFrame.js:
571         (WebInspector.SourceFrame):
572         (WebInspector.SourceFrame.prototype.get statusBarItems):
573         (WebInspector.SourceFrame.prototype.setReadOnly):
574         * inspector/front-end/inspector.js:
575         (WebInspector.loaded):
576
577 2012-01-09  Sheriff Bot  <webkit.review.bot@gmail.com>
578
579         Unreviewed, rolling out r104507.
580         http://trac.webkit.org/changeset/104507
581         https://bugs.webkit.org/show_bug.cgi?id=75936
582
583         Broke webkit_unit_tests (Requested by dimich on #webkit).
584
585         * WebCore.gypi:
586         * platform/graphics/chromium/RenderSurfaceChromium.h:
587         * platform/graphics/chromium/cc/CCLayerIterator.cpp: Removed.
588         * platform/graphics/chromium/cc/CCLayerIterator.h: Removed.
589         * platform/graphics/chromium/cc/CCLayerIteratorPosition.h: Removed.
590         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
591         (WebCore::CCLayerTreeHost::paintLayerContents):
592         (WebCore::CCLayerTreeHost::updateCompositorResources):
593         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
594         (WebCore::walkLayersAndCalculateVisibleLayerRects):
595         * platform/graphics/chromium/cc/CCRenderSurface.h:
596
597 2012-01-09  Rob Buis  <rbuis@rim.com>
598
599         Upstream change to disable input[color] css rules for BlackBerry port
600         https://bugs.webkit.org/show_bug.cgi?id=75719
601
602         Reviewed by Antonio Gomes.
603
604         Do not enable default css color rules for input["color"] for BlackBerry port.
605
606         * CMakeLists.txt:
607
608 2012-01-09  Greg Billock  <gbillock@google.com>
609
610         Implement navigator.startActivity; add IntentRequest object for managing web intents callbacks.
611         Web content will invoke navigator.startActivity to launch a new Web
612         Intents call. Each such call will map to an IntentRequest broker
613         object which is used by client code to correlate any return data to
614         the (optional) callbacks supplied by web content calls.
615         https://bugs.webkit.org/show_bug.cgi?id=75756
616
617         Reviewed by Adam Barth.
618
619         Test: webintents/web-intents-api.html
620
621         * Modules/intents/Intent.cpp: Added.
622         (WebCore::Intent::identifier):
623         (WebCore::Intent::setIdentifier):
624         * Modules/intents/Intent.h: Added.
625         * Modules/intents/Intent.idl: Added.
626         * Modules/intents/IntentResultCallback.h: Added.
627         (WebCore::IntentResultCallback::~IntentResultCallback):
628         * Modules/intents/IntentResultCallback.idl: Added.
629         * Modules/intents/IntentsRequest.cpp: Added.
630         * Modules/intents/IntentsRequest.h: Added.
631         * WebCore.gyp/WebCore.gyp:
632         * WebCore.gypi:
633         * bindings/scripts/CodeGeneratorV8.pm:
634         (GetNativeTypeForCallbacks):
635         * loader/FrameLoaderClient.h:
636         (WebCore::FrameLoaderClient::dispatchIntent):
637
638 2012-01-09  Dan Bernstein  <mitz@apple.com>
639
640         -[DOMRange renderedImageForcingBlackText:] fails with non-user-selectable text
641         https://bugs.webkit.org/show_bug.cgi?id=75920
642
643         Reviewed by Darin Adler.
644
645         Test: added to TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm
646
647         * page/mac/FrameMac.mm:
648         (WebCore::Frame::rangeImage): Removed the requirement that the start and end positions used
649         for setting the selection in the render tree be candidates.
650
651 2012-01-06  Hajime Morrita  <morrita@chromium.org>
652
653         [Refactoring] Moving between TreeScopes should be done by its own class.
654         https://bugs.webkit.org/show_bug.cgi?id=75290
655
656         Reviewed by Ryosuke Niwa.
657
658         This change extracted Node::setTreeScopeRecursively(),
659         setDocumentRecursively() and a part of setDocument() into a new
660         class called TreeScopeAdopter. By doing this, the idea of
661         moving a node from scope to scope, that was originally hidden
662         behind the forest of Node APIs, has become clearer.
663
664         Note that this change is a preparation for Bug 59816.
665
666         No new tests. No behavioral change.
667
668         * CMakeLists.txt:
669         * GNUmakefile.list.am:
670         * Target.pri:
671         * WebCore.gypi:
672         * WebCore.vcproj/WebCore.vcproj:
673         * WebCore.xcodeproj/project.pbxproj:
674         * dom/ContainerNode.cpp: Followed the renaming.
675         (WebCore::ContainerNode::takeAllChildrenFrom):
676         (WebCore::ContainerNode::insertBefore):
677         (WebCore::ContainerNode::replaceChild):
678         (WebCore::ContainerNode::removeBetween):
679         (WebCore::ContainerNode::removeChildren):
680         (WebCore::ContainerNode::appendChild):
681         (WebCore::ContainerNode::parserAddChild):
682         * dom/DOMAllInOne.cpp:
683         * dom/Document.cpp: Followed te renaming.
684         (WebCore::Document::setDocType):
685         (WebCore::Document::adoptNode):
686         * dom/Element.cpp: Followed te renaming.
687         (WebCore::Element::removeShadowRoot):
688         * dom/Node.cpp:
689         (WebCore::Node::setDocument):
690         (WebCore::Node::setTreeScope):
691         (WebCore::Node::didMoveToNewDocument):
692         * dom/Node.h:
693         * dom/TreeScope.h:
694         * dom/TreeScope.cpp:
695         (WebCore::TreeScope::adoptIfNeeded): moved from setTreeScopeRecursively()
696         * dom/TreeScopeAdopter.cpp: Added.
697         (WebCore::TreeScopeAdopter::TreeScopeAdopter):
698         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
699         (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
700         (WebCore::TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled):
701         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
702         * dom/TreeScopeAdopter.h: Added.
703         (WebCore::TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled):
704         (WebCore::TreeScopeAdopter::execute):
705         (WebCore::TreeScopeAdopter::needsScopeChange()):
706         (WebCore::TreeScopeAdopter::shadowRootFor):
707
708 2012-01-09  Adam Barth  <abarth@webkit.org>
709
710         run-bindings-tests should exercise all the IDL attributes we use
711         https://bugs.webkit.org/show_bug.cgi?id=75900
712
713         Reviewed by Eric Seidel.
714
715         I just grepped through the code generator script for IDL attributes and
716         wrote tests for them.
717
718         * bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.cpp: Added.
719         * bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.h: Added.
720         * bindings/scripts/test/CPP/WebDOMTestEventTarget.cpp: Added.
721         * bindings/scripts/test/CPP/WebDOMTestEventTarget.h: Added.
722         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
723         * bindings/scripts/test/CPP/WebDOMTestObj.h:
724         * bindings/scripts/test/CPP/WebDOMTestOverridingNameGetter.cpp: Added.
725         * bindings/scripts/test/CPP/WebDOMTestOverridingNameGetter.h: Added.
726         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp: Added.
727         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h: Added.
728         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObjectPrivate.h: Added.
729         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp: Added.
730         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h: Added.
731         * bindings/scripts/test/GObject/WebKitDOMTestEventTargetPrivate.h: Added.
732         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
733         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
734         * bindings/scripts/test/GObject/WebKitDOMTestOverridingNameGetter.cpp: Added.
735         * bindings/scripts/test/GObject/WebKitDOMTestOverridingNameGetter.h: Added.
736         * bindings/scripts/test/GObject/WebKitDOMTestOverridingNameGetterPrivate.h: Added.
737         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Added.
738         * bindings/scripts/test/JS/JSTestActiveDOMObject.h: Added.
739         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
740         * bindings/scripts/test/JS/JSTestEventTarget.cpp: Added.
741         * bindings/scripts/test/JS/JSTestEventTarget.h: Added.
742         * bindings/scripts/test/JS/JSTestInterface.cpp:
743         * bindings/scripts/test/JS/JSTestInterface.h:
744         * bindings/scripts/test/JS/JSTestObj.cpp:
745         * bindings/scripts/test/JS/JSTestObj.h:
746         * bindings/scripts/test/JS/JSTestOverridingNameGetter.cpp: Added.
747         * bindings/scripts/test/JS/JSTestOverridingNameGetter.h: Added.
748         * bindings/scripts/test/ObjC/DOMTestActiveDOMObjectInternal.h: Added.
749         * bindings/scripts/test/ObjC/DOMTestEventTarget.h: Added.
750         * bindings/scripts/test/ObjC/DOMTestEventTarget.mm: Added.
751         * bindings/scripts/test/ObjC/DOMTestEventTargetInternal.h: Added.
752         * bindings/scripts/test/ObjC/DOMTestObj.h:
753         * bindings/scripts/test/ObjC/DOMTestObj.mm:
754         * bindings/scripts/test/ObjC/DOMTestOverridingNameGetter.h: Added.
755         * bindings/scripts/test/ObjC/DOMTestOverridingNameGetter.mm: Added.
756         * bindings/scripts/test/ObjC/DOMTestOverridingNameGetterInternal.h: Added.
757         * bindings/scripts/test/TestDomainSecurity.idl: Added.
758         * bindings/scripts/test/TestEventConstructor.idl:
759         * bindings/scripts/test/TestEventTarget.idl: Added.
760         * bindings/scripts/test/TestInterface.idl:
761         * bindings/scripts/test/TestObj.idl:
762         * bindings/scripts/test/TestOverridingNameGetter.idl: Added.
763         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: Added.
764         * bindings/scripts/test/V8/V8TestActiveDOMObject.h: Added.
765         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
766         * bindings/scripts/test/V8/V8TestEventTarget.cpp: Added.
767         * bindings/scripts/test/V8/V8TestEventTarget.h: Added.
768         * bindings/scripts/test/V8/V8TestInterface.h:
769         * bindings/scripts/test/V8/V8TestObj.cpp:
770         * bindings/scripts/test/V8/V8TestOverridingNameGetter.cpp: Added.
771         * bindings/scripts/test/V8/V8TestOverridingNameGetter.h: Added.
772
773 2012-01-09  Nat Duca  <nduca@chromium.org>
774
775         [chromium] Add documentation to updater classes
776         https://bugs.webkit.org/show_bug.cgi?id=75866
777
778         Reviewed by James Robinson.
779
780         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
781         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
782         * platform/graphics/chromium/CanvasLayerTextureUpdater.h:
783         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h:
784         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
785
786 2012-01-09  Adam Barth  <abarth@webkit.org>
787
788         Remove unused variable from CodeGeneratorV8
789         https://bugs.webkit.org/show_bug.cgi?id=75895
790
791         Reviewed by Eric Seidel.
792
793         Unused variables aren't worth keeping around.
794
795         * bindings/scripts/CodeGeneratorV8.pm:
796         (GenerateHeader):
797         (GenerateImplementation):
798
799 2012-01-09  Dana Jansens  <danakj@chromium.org>
800
801         [chromium] Create iterators for the RenderSurface-Layer tree
802         https://bugs.webkit.org/show_bug.cgi?id=74203
803
804         Reviewed by James Robinson.
805
806         New unit tests: CCLayerIteratorTest.cpp
807
808         * WebCore.gypi:
809         * platform/graphics/chromium/RenderSurfaceChromium.h:
810         * platform/graphics/chromium/cc/CCLayerIterator.cpp: Added.
811         (WebCore::CCLayerIteratorActions::BackToFront::begin):
812         (WebCore::CCLayerIteratorActions::BackToFront::end):
813         (WebCore::CCLayerIteratorActions::BackToFront::next):
814         (WebCore::CCLayerIteratorActions::FrontToBack::begin):
815         (WebCore::CCLayerIteratorActions::FrontToBack::end):
816         (WebCore::CCLayerIteratorActions::FrontToBack::next):
817         (WebCore::CCLayerIteratorActions::FrontToBack::goToHighestInSubtree):
818         * platform/graphics/chromium/cc/CCLayerIterator.h: Added.
819         (WebCore::CCLayerIterator::CCLayerIterator):
820         (WebCore::CCLayerIterator::begin):
821         (WebCore::CCLayerIterator::end):
822         (WebCore::CCLayerIterator::operator++):
823         (WebCore::CCLayerIterator::operator==):
824         (WebCore::CCLayerIterator::operator!=):
825         (WebCore::CCLayerIterator::operator->):
826         (WebCore::CCLayerIterator::operator*):
827         (WebCore::CCLayerIterator::representsTargetRenderSurface):
828         (WebCore::CCLayerIterator::representsContributingRenderSurface):
829         (WebCore::CCLayerIterator::representsItself):
830         (WebCore::CCLayerIterator::targetRenderSurfaceLayer):
831         * platform/graphics/chromium/cc/CCLayerIteratorPosition.h: Added.
832         (WebCore::CCLayerIteratorPosition::CCLayerIteratorPosition):
833         (WebCore::CCLayerIteratorPosition::currentLayer):
834         (WebCore::CCLayerIteratorPosition::currentLayerRepresentsContributingRenderSurface):
835         (WebCore::CCLayerIteratorPosition::currentLayerRepresentsTargetRenderSurface):
836         (WebCore::CCLayerIteratorPosition::targetRenderSurfaceLayer):
837         (WebCore::CCLayerIteratorPosition::targetRenderSurface):
838         (WebCore::CCLayerIteratorPosition::targetRenderSurfaceChildren):
839         (WebCore::CCLayerIteratorPosition::operator==):
840         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
841         (WebCore::CCLayerTreeHost::paintLayerContents):
842         (WebCore::CCLayerTreeHost::updateCompositorResources):
843         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
844         (WebCore::walkLayersAndCalculateVisibleLayerRects):
845         * platform/graphics/chromium/cc/CCRenderSurface.h:
846
847 2012-01-09  Joshua Bell  <jsbell@chromium.org>
848
849         IndexedDB: Throw exception if IDBCursor.continue() called with lower key than current
850         https://bugs.webkit.org/show_bug.cgi?id=74213
851
852         Reviewed by Tony Chang.
853
854         * storage/IDBCursorBackendImpl.cpp:
855         (WebCore::IDBCursorBackendImpl::continueFunction):
856
857 2012-01-09  Justin Novosad  <junov@chromium.org>
858
859         [chromium win] Creating lots of temporary canvas contexts will crash.
860         https://bugs.webkit.org/show_bug.cgi?id=68420
861
862         When using the skia port, the allocation of 2d canvas backing stores
863         no longer needs to be done through a platform API (GDI/CG) because
864         canvases now use skia for drawing text.  Removing the allocation through
865         GDI on windows prevents resource exhaustion due to unreferenced canvases
866         that are awaiting garbage collection.
867
868         Reviewed by Stephen White.
869
870         No new tests: Relying on existing canvas layout tests.
871
872         * html/HTMLCanvasElement.cpp:
873         (WebCore::HTMLCanvasElement::createImageBuffer):
874         * platform/graphics/ImageBuffer.h:
875         * platform/graphics/skia/ImageBufferSkia.cpp:
876         (WebCore::createNonPlatformCanvas):
877         (WebCore::ImageBuffer::ImageBuffer):
878
879 2012-01-09  Avi Drissman  <avi@chromium.org>
880
881         https://bugs.webkit.org/show_bug.cgi?id=75860
882         [Chromium Mac] no background is drawn for input elements
883
884         Reviewed by Dimitri Glazkov.
885
886         Reverts r104240 for Chromium. Unfortunately the code that uses Cocoa
887         API misbehaves when built with the 10.5 SDK, so we use SPI. For now.
888
889         * rendering/RenderThemeChromiumMac.h:
890         * rendering/RenderThemeChromiumMac.mm:
891         (WebCore::RenderThemeChromiumMac::paintTextField):
892
893 2012-01-09  Pablo Flouret  <pablof@motorola.com>
894
895         Compilation error on build-webkit --debug --no-3d-canvas on mac.
896         https://bugs.webkit.org/show_bug.cgi?id=75878
897
898         Reviewed by Alexey Proskuryakov.
899
900         * html/canvas/WebGLContextEvent.cpp:
901
902 2012-01-09  Tom Sepez  <tsepez@chromium.org>
903
904         Treat code="" attribute in embed tags similarly to applet tags.
905         https://bugs.webkit.org/show_bug.cgi?id=75871
906
907         Reviewed by Daniel Bates.
908
909         Tests: http/tests/security/xssAuditor/embed-tag-code-attribute-2.html
910                http/tests/security/xssAuditor/embed-tag-code-attribute.html
911
912         * html/parser/XSSAuditor.cpp:
913         (WebCore::XSSAuditor::filterEmbedToken):
914
915 2012-01-09  Justin Novosad  <junov@chromium.org>
916
917         [Chromium] remove all references to the legacy accelerated 2d Canvas
918         implementation
919         https://bugs.webkit.org/show_bug.cgi?id=75108
920
921         Purging an old settings flag that is no longer referenced
922
923         Reviewed by Darin Fisher.
924
925         * page/Settings.cpp:
926         (WebCore::Settings::Settings):
927         * page/Settings.h:
928
929 2012-01-09  Eric Carlson  <eric.carlson@apple.com>
930
931         REGRESSION(r104327?): media/track/track-cues-cuechange.html and track-cues-enter-exit.html 
932         intermittently time out, media/track/track-cues-seeking and  fails
933         https://bugs.webkit.org/show_bug.cgi?id=75817
934
935         Unreviewed, fix a problem introduced in r104327.
936
937         No new tests, covered by existing tests.
938
939         * html/HTMLMediaElement.cpp:
940         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_ignoreTrackDisplayUpdate.
941
942 2012-01-09  Raymond Toy  <rtoy@google.com>
943
944         Add normalize attribute to ConvolverNode to disable normalization.
945         https://bugs.webkit.org/show_bug.cgi?id=75126
946
947         Reviewed by Kenneth Russell.
948
949         Tests added in convolution-mono-mono.html.
950
951         * platform/audio/Reverb.cpp:
952         (WebCore::Reverb::Reverb): Add extra arg to indicate whether
953         normalization is enabled or not, and do it.
954         * platform/audio/Reverb.h: Update declaration.
955         * webaudio/ConvolverNode.cpp:
956         (WebCore::ConvolverNode::ConvolverNode): Initialize attribute (to
957         true).
958         (WebCore::ConvolverNode::setBuffer): Call Reverb with
959         normalization argument.
960         * webaudio/ConvolverNode.h:
961         (WebCore::ConvolverNode::normalize): New method to return
962         normalization. 
963         (WebCore::ConvolverNode::setNormalize):  New method to set
964         normalization. 
965         * webaudio/ConvolverNode.idl: Add normalize attribute.
966         * LayoutTests/webaudio/convolution-mono-mono.html:
967         * LayoutTests/webaudio/convolution-mono-mono-expected.txt:
968         * LayoutTests/webaudio/resources/convolution-testing.js:
969         Test for convolution.  Tests only work when normalization is
970         disabled.
971
972 2012-01-09  Judy Hao  <judy.liqiong-hao@nokia.com>
973
974         [GStreamer] webkitwebsrc: pad template is leaked
975         https://bugs.webkit.org/show_bug.cgi?id=74224
976
977         Reviewed by Philippe Normand.
978
979         Use a GstPadTemplate smart pointer in webkit_web_src_init to
980         avoid a memory leak.
981
982         Fixing memory leaks. So, no new test case is introduced.
983
984         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
985         (webkit_web_src_init):
986
987 2012-01-09  Xianzhu Wang  <wangxianzhu@chromium.org>
988
989         Avoid unnecessary TextureManager::reduceMemoryToLimit().
990         https://bugs.webkit.org/show_bug.cgi?id=75632
991
992         Unnecessary TextureManager::reduceMemoryToLimit() will cause some tile
993         textures that are required soon to be unnecessarily removed/replaced,
994         and degrade performance, sometimes significantly.
995
996         For example, CCLayerTreeHost::setViewport will be called during
997         scrolling. The original code would call TextureManager::reduceMemoryToLimit(),
998         causing some textures unnecessarily discarded and then recreated
999         repeatedly during scrolling.
1000
1001         It's also unnecessary to call TextureManager::reduceMemoryToLimit()
1002         from TextureManager::setPreferredMemoryLimitBytes() because the limit
1003         is not a hard limit. The callers should call reduceMemoryToLimit()
1004         explicitly if it wants it when setting the preferred memory limit.
1005
1006         Reviewed by James Robinson.
1007
1008         Tests: webkit_unit_tests --gtest_filter=TextureManagerTest.*:CCLayerTreeHostTestSetViewportSize.*
1009
1010         * platform/graphics/chromium/LayerRendererChromium.cpp:
1011         (WebCore::LayerRendererChromium::finishDrawingFrame): Call reduceMemoryToLimit() explicitly
1012         * platform/graphics/chromium/TextureManager.cpp:
1013         (WebCore::TextureManager::setPreferredMemoryLimitBytes): Removed call to reduceMemoryToLimit().
1014         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1015         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
1016         (WebCore::CCLayerTreeHost::setViewportSize): Changed name from setViewport(). Check change of viewportSize.
1017         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1018         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1019         (WebCore::CCLayerTreeHostImpl::setViewportSize): Changed name from setViewport()
1020         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1021
1022 2012-01-09  Sami Kyostila  <skyostil@chromium.org>
1023
1024         [Chromium] JPEG RGB swizzling order should match platform pixel format
1025         https://bugs.webkit.org/show_bug.cgi?id=75861
1026
1027         Choose between JCS_EXT_BGRX and JCS_EXT_RGBX channel swizzling
1028         based on the configured Skia 32-bit pixel format.
1029
1030         Reviewed by Kenneth Russell.
1031
1032         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1033         (rgbOutputColorSpace):
1034
1035 2012-01-09  Alexis Menard  <alexis.menard@openbossa.org>
1036
1037         getComputedStyle for border-radius is not implemented.
1038         https://bugs.webkit.org/show_bug.cgi?id=75630
1039
1040         Reviewed by Tony Chang.
1041
1042         Implement getComputedStyle for border-radius shorthand property.
1043
1044         Test: fast/css/getComputedStyle/getComputedStyle-border-radius-shorthand.html
1045
1046         * css/CSSComputedStyleDeclaration.cpp:
1047         (WebCore::getBorderRadiusCornerValues):
1048         (WebCore::getBorderRadiusCornerValue):
1049         (WebCore::getBorderRadiusShorthandValue):
1050         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1051
1052 2012-01-09  Sheriff Bot  <webkit.review.bot@gmail.com>
1053
1054         Unreviewed, rolling out r104418.
1055         http://trac.webkit.org/changeset/104418
1056         https://bugs.webkit.org/show_bug.cgi?id=75855
1057
1058         we still need to build against CG on Mac sometimes (Requested
1059         by epoger on #webkit).
1060
1061         * WebCore.gyp/WebCore.gyp:
1062
1063 2012-01-09  Martin Robinson  <mrobinson@igalia.com>
1064
1065         [GTK] [AC] Simplify accelerated compositing build options
1066         https://bugs.webkit.org/show_bug.cgi?id=75518
1067
1068         Reviewed by Gustavo Noronha Silva.
1069
1070         * GNUmakefile.am: Automatically enable 3D rendering when AC is available.
1071         * GNUmakefile.list.am: Clean up a comment.
1072
1073 2012-01-09  Antti Koivisto  <antti@apple.com>
1074
1075         possible regression: r104060 maybe causing crashes
1076         https://bugs.webkit.org/show_bug.cgi?id=75676
1077
1078         Reviewed by Andreas Kling.
1079
1080         Based on the stacks, CSSStyleSelector may be getting deleted from under the
1081         CSSStyleSelector::appendAuthorStylesheets call. Protect by temporarily detaching
1082         from the document. Also add assertions to catch the case.
1083         
1084         No test, there is no known repro and the fix is speculative.
1085
1086         * dom/Document.cpp:
1087         (WebCore::Document::Document):
1088         (WebCore::Document::setDocType):
1089         (WebCore::Document::childrenChanged):
1090         (WebCore::Document::clearStyleSelector):
1091         (WebCore::Document::updateActiveStylesheets):
1092         * dom/Document.h:
1093
1094 2012-01-09  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1095
1096         Use Vector<OwnPtr> for m_viewportDependentMediaQueryResults in CSSStyleSelector
1097         https://bugs.webkit.org/show_bug.cgi?id=75723
1098
1099         Reviewed by Andreas Kling.
1100
1101         * css/CSSStyleSelector.cpp:
1102         (WebCore::CSSStyleSelector::~CSSStyleSelector):
1103         (WebCore::CSSStyleSelector::addViewportDependentMediaQueryResult):
1104         * css/CSSStyleSelector.h:
1105
1106 2012-01-09  Alexis Menard  <alexis.menard@openbossa.org>
1107
1108         Extend CSSValueList to allow slash separated lists.
1109         https://bugs.webkit.org/show_bug.cgi?id=75841
1110
1111         Reviewed by Andreas Kling.
1112
1113         Multiple CSS properties are using slash to separate
1114         various parts (e.g. border-radius) so having this
1115         feature available in CSSValueList will make it easier
1116         in the future to support these properties.
1117
1118         No new tests : existing ones should cover the refactor.
1119
1120         * css/CSSInitialValue.h:
1121         (WebCore::CSSInitialValue::isImplicit):
1122         (WebCore::CSSInitialValue::CSSInitialValue):
1123         * css/CSSValue.cpp:
1124         (WebCore::CSSValue::isImplicitInitialValue):
1125         * css/CSSValue.h:
1126         In order for CSSValue to not grow I moved m_isImplicitInitialValue
1127         back to CSSInitialValue as this object is used only in CSSValuePool
1128         and is allocated only twice.
1129         (WebCore::CSSValue::CSSValue):
1130         * css/CSSValueList.cpp:
1131         (WebCore::CSSValueList::CSSValueList):
1132         (WebCore::CSSValueList::copy):
1133         Fix also usage of PassRefPtr.
1134         (WebCore::CSSValueList::customCssText):
1135         Refactor to use StringBuilder.
1136         * css/CSSValueList.h:
1137         (WebCore::CSSValueList::createCommaSeparated):
1138         (WebCore::CSSValueList::createSpaceSeparated):
1139         (WebCore::CSSValueList::createSlashSeparated):
1140         * css/WebKitCSSFilterValue.cpp:
1141         (WebCore::WebKitCSSFilterValue::WebKitCSSFilterValue):
1142         * css/WebKitCSSTransformValue.cpp:
1143         (WebCore::WebKitCSSTransformValue::WebKitCSSTransformValue):
1144
1145 2012-01-09  No'am Rosenthal  <noam.rosenthal@nokia.com>
1146
1147         [Texmap] Move surface management from TextureMapperNode to TextureMapper
1148         https://bugs.webkit.org/show_bug.cgi?id=75779
1149
1150         Instead of a TextureMapperSurfaceManager class inside of TextureMapperNode.cpp, we now
1151         maintain that surface pool inside of the TextureMapper class. This will later allow us to
1152         allocate intermediate surface from within TextureMapperGL, a functionality we need for
1153         filters.
1154
1155         Also, surfaces are not automatically created with the viewport size, but rather with the
1156         size passed as a parameter. The surface from the pool is the smallest texture that is
1157         larger than the required size, or any texture if such texture is not yet allocated.
1158
1159         Reviewed by Kenneth Rohde Christiansen.
1160
1161         Tests in LayoutTests/compositing already cover this.
1162
1163         * GNUmakefile.list.am: Added TextureMapper.cpp to the build.
1164         * Target.pri: Added TextureMapper.cpp to the build.
1165         * WebCore.gypi: Added TextureMapper.cpp to the build.
1166         * platform/graphics/texmap/TextureMapper.cpp: Added.
1167         * platform/graphics/texmap/TextureMapper.h:
1168         * platform/graphics/texmap/TextureMapperNode.cpp:
1169         (WebCore::TextureMapperNode::paint):
1170         (WebCore::TextureMapperNode::paintReflection):
1171         (WebCore::TextureMapperNode::paintRecursive):
1172         * platform/graphics/texmap/TextureMapperNode.h:
1173         (WebCore::TextureMapperNode::TextureMapperNode):
1174
1175 2012-01-09  Mario Sanchez Prada  <msanchez@igalia.com>
1176
1177         [Gtk] Regression: text-inserted events lack text inserted and current line
1178         https://bugs.webkit.org/show_bug.cgi?id=72830
1179
1180         Reviewed by Martin Robinson.
1181
1182         Fix issue getting the exposed text for an accessibility object at,
1183         before of after a given offset, after changing it at least once.
1184
1185         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1186         (webkit_accessible_class_init): Don't initialize
1187         gailTextUtilQuark, it won't be used anymore.
1188         (getGailTextUtilForAtk): Don't cache the GailTextUtil as object
1189         data, but create a new one each time this function is called.
1190         (webkit_accessible_text_get_caret_offset): Simplified code by
1191         using the new focusedObjectAndCaretOffsetUnignored function,
1192         instead of the old objectAndOffsetUnignored function.
1193         (focusedObjectAndCaretOffsetUnignored): Rewrite of the old
1194         objectAndOffsetUnignored function so it now needs less
1195         parameters than before and takes care of carefully selecting the
1196         start and end visible positions to calculate the position of the
1197         caret from the point of view of the accessibility object of
1198         reference passed as the only input parameter now. Updated callers.
1199         * accessibility/gtk/AccessibilityObjectWrapperAtk.h:
1200
1201         * editing/gtk/FrameSelectionGtk.cpp:
1202         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1203         Simplified code by calling to focusedObjectAndCaretOffsetUnignored
1204         function, instead of the old objectAndOffsetUnignored function.
1205
1206 2012-01-09  Antti Koivisto  <antti@apple.com>
1207
1208         Subtree invalidation on stylesheet change
1209         https://bugs.webkit.org/show_bug.cgi?id=75834
1210
1211         Reviewed by Andreas Kling.
1212         
1213         Currently if we add a stylesheet with scoped selectors and matching scope elements exist,
1214         we recalculate the entire document style. It is sufficient to invalidate the subtrees 
1215         matching the scope only.
1216         
1217         This allows us to do less full style recalcs on many popular web sites (nytimes.com for example).
1218         Subtree recalcs are typically much cheaper.
1219         
1220         Test: fast/css/id-or-class-before-stylesheet.html
1221
1222         * dom/Document.cpp:
1223         (WebCore::Document::testAddedStylesheetRequiresStyleRecalc):
1224         (WebCore::Document::analyzeStylesheetChange):
1225         (WebCore::Document::updateActiveStylesheets):
1226         * dom/Document.h:
1227
1228 2012-01-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1229
1230         Unreviewed. Fix make distcheck issues.
1231
1232         * GNUmakefile.list.am: Add missing header.
1233
1234 2012-01-09  Kentaro Hara  <haraken@chromium.org>
1235
1236         [Refactoring] Use join(", ", @arguments) to build a method argument string
1237         in CodeGeneratorJS.pm
1238         https://bugs.webkit.org/show_bug.cgi?id=75830
1239
1240         Reviewed by Adam Barth.
1241
1242         The code in CodeGeneratorJS.pm to build a method argument string is dirty
1243         and error-prone. It is concatenating arguments one by one judging whether
1244         ", " is necessary or not. This patch refactors the code so that it pushes
1245         all arguments into @arguments and then builds a method string by
1246         join(", ", @arguments).
1247
1248         Test: bindings/scripts/test/*
1249
1250         * bindings/scripts/CodeGeneratorJS.pm:
1251         (GenerateImplementation):
1252         (GenerateParametersCheck):
1253         (GenerateImplementationFunctionCall):
1254
1255 2012-01-09  Andreas Kling  <awesomekling@apple.com>
1256
1257         CSSMutableStyleDeclaration: Remove propertiesEqual().
1258         <http://webkit.org/b/75829>
1259
1260         Reviewed by Antti Koivisto.
1261
1262         Remove propertiesEqual() since it was wrong (it only compared CSSValue pointers,
1263         not the actual values.)
1264
1265         Skip comparing the style declarations in NamedNodeMap::mappedMapsEquivalent()
1266         and just compare pointers instead. This is possible because the declarations
1267         all come from the mapped attribute/declaration table.
1268
1269         * css/CSSMutableStyleDeclaration.h:
1270         * dom/NamedNodeMap.cpp:
1271         (WebCore::NamedNodeMap::mappedMapsEquivalent):
1272
1273 2012-01-09  Adam Barth  <abarth@webkit.org>
1274
1275         insertAdjacentHTML doesn't play nice with DocumentFragment
1276         https://bugs.webkit.org/show_bug.cgi?id=75826
1277
1278         Reviewed by Eric Seidel.
1279
1280         Test: fast/dom/insertAdjacentHTML-DocumentFragment-crash.html
1281
1282         Document nodes aren't the only non-Element ContainerNodes.
1283
1284         * html/HTMLElement.cpp:
1285         (WebCore::contextElementForInsertion):
1286
1287 2012-01-09  Andreas Kling  <awesomekling@apple.com>
1288
1289         CSSStyleSelector: Any attribute with a decl() can be assumed to be mapped.
1290         <http://webkit.org/b/75832>
1291
1292         Reviewed by Antti Koivisto.
1293
1294         Replace isMappedAttribute() check with an assertion. Only a mapped attribute
1295         will have an associated style declaration.
1296
1297         * css/CSSStyleSelector.cpp:
1298         (WebCore::CSSStyleSelector::matchAllRules):
1299
1300 2012-01-09  Kentaro Hara  <haraken@chromium.org>
1301
1302         [Refactoring] Use join(", ", @arguments) to build a method argument
1303         string in CodeGeneratorV8.pm
1304         https://bugs.webkit.org/show_bug.cgi?id=75828
1305
1306         Reviewed by Darin Adler.
1307
1308         The code in CodeGeneratorV8.pm to build a method argument string is dirty
1309         and error-prone. It is concatenating arguments one by one judging whether
1310         ", " is necessary or not. This patch refactors the code so that it pushes
1311         all arguments into @arguments and then builds a method string by
1312         join(", ", @arguments).
1313
1314         Test: bindings/scripts/test/*
1315
1316         * bindings/scripts/CodeGeneratorV8.pm:
1317         (GenerateFunctionCallString):
1318
1319 2012-01-08  Benjamin Poulain  <benjamin@webkit.org>
1320
1321         Build fix: ScrollAnimatorMac has missing initializer in systemUptime()
1322         https://bugs.webkit.org/show_bug.cgi?id=75827
1323
1324         Reviewed by Darin Adler.
1325
1326         Explicitly initialize the struct timeval to avoid compiler warnings.
1327
1328         * platform/mac/ScrollAnimatorMac.mm:
1329         (systemUptime):
1330
1331 2012-01-08  ChangSeok Oh  <shivamidow@gmail.com>
1332
1333         Memory allocation mismatch by using adoptArrayPtr in GraphicsContext3DOpenGL.cpp
1334         https://bugs.webkit.org/show_bug.cgi?id=75820
1335
1336         Reviewed by Darin Adler.
1337
1338         Dbates submitted a patch to release fastMalloc allocation
1339         in GraphicsContext3DOpenGL.cpp properly.
1340         See http://trac.webkit.org/browser/trunk/Source/WebCore/ChangeLog?rev=104395
1341         But one thing similar to the above still remains mismatched.
1342
1343         No new tests required.
1344
1345         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1346         (WebCore::GraphicsContext3D::getShaderInfoLog):
1347
1348 2012-01-08  Leo Yang  <leo.yang@torchmobile.com.cn>
1349
1350         [BlackBerry] Use the concrete FrameNetworkingContextBlackBerry to access Frame
1351         https://bugs.webkit.org/show_bug.cgi?id=75611
1352
1353         Reviewed by Antonio Gomes.
1354
1355         In platform/network/blackberry/ResourceHandleBlackBerry.cpp, we were using
1356         NetworkingContext::wrappedFrame() to access the frame associated with the
1357         networking context. NetworkingContext::wrappedFrame() was added as a virtual
1358         function by the BlackBerry porting internally. It's unnecessary because
1359         FrameNetworkingContextBlackBerry inherits from FrameNetworkingContext which
1360         has a protected frame() member which is exported as public in
1361         FrameNetworkingContextBlackBerry. We don't want to upstream wrappedFrame()
1362         as a specific change of the BlackBerry porting in
1363         platform/network/NetworkingContext.h, so use the concrete networking context
1364         FrameNetworkingContextBlackBerry to access the associated frame.
1365
1366         No functionalities changed, no new tests.
1367
1368         * platform/network/blackberry/ResourceHandleBlackBerry.cpp:
1369         (WebCore::ResourceHandle::start):
1370         (WebCore::ResourceHandle::loadResourceSynchronously):
1371
1372 2012-01-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1373
1374         Unreviewed, rolling out r104421.
1375         http://trac.webkit.org/changeset/104421
1376         https://bugs.webkit.org/show_bug.cgi?id=75816
1377
1378         Need to rebaseline some tests on Linux (Requested by noamr on
1379         #webkit).
1380
1381         * Target.pri:
1382
1383 2012-01-08  No'am Rosenthal  <noam.rosenthal@nokia.com>
1384
1385         [Qt] Enable CSS_FILTERS in Qt build
1386         https://bugs.webkit.org/show_bug.cgi?id=75777
1387
1388         Enable CSS_FILTERS and unskip the tests.
1389
1390         Reviewed by Kenneth Rohde Christiansen.
1391
1392         Filter tests are now unskipped for Qt.
1393
1394         * Target.pri: add missing files to build.
1395
1396 2012-01-08  Adam Barth  <abarth@webkit.org>
1397
1398         [Chromium] Remove use_skia option from GYP
1399         https://bugs.webkit.org/show_bug.cgi?id=75811
1400
1401         Reviewed by Ryosuke Niwa.
1402
1403         The CG configuration of Chromium Mac is no longer supported.
1404
1405         * WebCore.gyp/WebCore.gyp:
1406
1407 2012-01-08  Benjamin Poulain  <benjamin@webkit.org>
1408
1409         Valid canonical URLs should have a lowercase hostname
1410         https://bugs.webkit.org/show_bug.cgi?id=75771
1411
1412         Reviewed by Adam Barth.
1413
1414         According to the RFC 3986 (and other browsers implementation), the hostname
1415         of valid canonical URLs should be lowercase.
1416
1417         This patch lowercase the hostname in KURL::parse() similarily to what we
1418         do for the scheme.
1419
1420         Tests: fast/url/host-lowercase-per-scheme.html
1421                fast/url/safari-extension.html
1422
1423         * platform/KURL.cpp:
1424         (WebCore::isCanonicalHostnameLowercaseForScheme):
1425         (WebCore::KURL::parse):
1426
1427 2012-01-08  Adam Barth  <abarth@webkit.org>
1428
1429         Rename checkNodeSecurity and allowsAccessFromFrame to have sensible names
1430         https://bugs.webkit.org/show_bug.cgi?id=75796
1431
1432         Reviewed by Sam Weinig.
1433
1434         This patch contains only renames and FIXME comments.  No behavior change.
1435
1436         * bindings/js/JSDOMBinding.cpp:
1437         (WebCore::allowAccessToNode):
1438         (WebCore::allowAccessToFrame):
1439         * bindings/js/JSDOMBinding.h:
1440         * bindings/js/JSHTMLFrameElementCustom.cpp:
1441         (WebCore::allowSettingJavascriptURL):
1442         * bindings/js/JSHistoryCustom.cpp:
1443         (WebCore::JSHistory::getOwnPropertySlotDelegate):
1444         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
1445         (WebCore::JSHistory::putDelegate):
1446         (WebCore::JSHistory::deleteProperty):
1447         (WebCore::JSHistory::getOwnPropertyNames):
1448         * bindings/js/JSLocationCustom.cpp:
1449         (WebCore::JSLocation::getOwnPropertySlotDelegate):
1450         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
1451         (WebCore::JSLocation::putDelegate):
1452         (WebCore::JSLocation::deleteProperty):
1453         (WebCore::JSLocation::getOwnPropertyNames):
1454         (WebCore::JSLocation::toStringFunction):
1455         * bindings/js/ScriptController.cpp:
1456         (WebCore::ScriptController::canAccessFromCurrentOrigin):
1457         * bindings/scripts/CodeGeneratorJS.pm:
1458         (GenerateGetOwnPropertyDescriptorBody):
1459         (GenerateImplementation):
1460         * bindings/scripts/CodeGeneratorV8.pm:
1461         (GenerateNormalAttrGetter):
1462         (GenerateFunctionCallback):
1463
1464 2012-01-08  Adam Barth  <abarth@webkit.org>
1465
1466         Remove deprecated toDynamicFrame and unused [CallWith=DynamicFrame]
1467         https://bugs.webkit.org/show_bug.cgi?id=75795
1468
1469         Reviewed by Eric Seidel.
1470
1471         We've succeeded in removing all the callers fo this function, including
1472         all the uses of CallWith=DynamicFrame in IDL files.
1473
1474         * bindings/js/JSDOMBinding.cpp:
1475         * bindings/js/JSDOMBinding.h:
1476         * bindings/scripts/CodeGeneratorJS.pm:
1477         (GenerateParametersCheck):
1478         * bindings/scripts/CodeGeneratorV8.pm:
1479         (GenerateFunctionCallString):
1480         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1481         * bindings/scripts/test/CPP/WebDOMTestObj.h:
1482         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1483         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1484         * bindings/scripts/test/JS/JSTestObj.cpp:
1485         * bindings/scripts/test/JS/JSTestObj.h:
1486         * bindings/scripts/test/ObjC/DOMTestObj.h:
1487         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1488         * bindings/scripts/test/TestObj.idl:
1489         * bindings/scripts/test/V8/V8TestObj.cpp:
1490
1491 2012-01-08  Adam Barth  <abarth@webkit.org>
1492
1493         NeedsUserGestureCheck IDL attribute is no longer used
1494         https://bugs.webkit.org/show_bug.cgi?id=75794
1495
1496         Reviewed by Eric Seidel.
1497
1498         This IDL attribute is no longer used because we use static state to
1499         keep track of the user gesture state.  We can delete the code that
1500         supports it.
1501
1502         * bindings/scripts/CodeGeneratorCPP.pm:
1503         * bindings/scripts/CodeGeneratorGObject.pm:
1504         * bindings/scripts/CodeGeneratorJS.pm:
1505         * bindings/scripts/CodeGeneratorV8.pm:
1506         * bindings/scripts/test/TestObj.idl:
1507
1508 2012-01-08  Adam Barth  <abarth@webkit.org>
1509
1510         Remove unused security functions from V8 bindings
1511         https://bugs.webkit.org/show_bug.cgi?id=75797
1512
1513         Reviewed by Eric Seidel.
1514
1515         This functions have no callers.  They can be removed.
1516
1517         * bindings/v8/ScriptController.cpp:
1518         * bindings/v8/ScriptController.h:
1519         * bindings/v8/specialization/V8BindingState.cpp:
1520         * bindings/v8/specialization/V8BindingState.h:
1521
1522 2012-01-08  Pratik Solanki  <psolanki@apple.com>
1523
1524         Assertion failure under SharedBuffer::append() when NETWORK_CFDATA_ARRAY_CALLBACK is enabled
1525         https://bugs.webkit.org/show_bug.cgi?id=75656
1526
1527         Reviewed by Darin Adler.
1528
1529         Update the implementation of SubresourceLoader::didReceiveDataArray() to conform to the
1530         refactoring done as part of bug 71149 in r100311.
1531
1532         * loader/SubresourceLoader.cpp:
1533         (WebCore::SubresourceLoader::didReceiveData):
1534         (WebCore::SubresourceLoader::errorLoadingResource):
1535         * loader/SubresourceLoader.h:
1536         * loader/cf/SubresourceLoaderCF.cpp:
1537         (WebCore::SubresourceLoader::didReceiveDataArray):
1538
1539 2012-01-08  Steve Block  <steveblock@google.com>
1540
1541         Remove V8-specific Java Bridge code
1542         https://bugs.webkit.org/show_bug.cgi?id=75801
1543
1544         Reviewed by Darin Adler.
1545
1546         Also remove superfluous JSC and V8 guards, as the code is now used only
1547         with JSC.
1548
1549         No new tests, removing dead code only.
1550
1551         * WebCore.gypi:
1552         * bridge/jni/JNIUtility.cpp:
1553         (JSC::Bindings::javaTypeFromClassName):
1554         (JSC::Bindings::signatureFromJavaType):
1555         (JSC::Bindings::getJNIField):
1556         (JSC::Bindings::callJNIMethod):
1557         * bridge/jni/JavaType.h:
1558         * bridge/jni/jsc/JavaMethodJSC.cpp:
1559         (appendClassName):
1560         (JavaMethod::signature):
1561         * bridge/jni/v8/JNIUtilityPrivate.cpp: Removed.
1562         * bridge/jni/v8/JNIUtilityPrivate.h: Removed.
1563         * bridge/jni/v8/JavaClassV8.h: Removed.
1564         * bridge/jni/v8/JavaFieldV8.h: Removed.
1565         * bridge/jni/v8/JavaInstanceV8.h: Removed.
1566         * bridge/jni/v8/JavaMethodV8.h: Removed.
1567         * bridge/jni/v8/JavaNPObjectV8.cpp: Removed.
1568         * bridge/jni/v8/JavaNPObjectV8.h: Removed.
1569         * bridge/jni/v8/JavaValueV8.h: Removed.
1570         * bridge/jsc/BridgeJSC.h:
1571
1572 2012-01-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1573
1574         Unreviewed, rolling out r104403.
1575         http://trac.webkit.org/changeset/104403
1576         https://bugs.webkit.org/show_bug.cgi?id=75803
1577
1578         It broke all tests on Qt5 (Requested by Ossy_weekend on
1579         #webkit).
1580
1581         * Target.pri:
1582
1583 2012-01-08  Antti Koivisto  <antti@apple.com>
1584
1585         Don't create style selector in Element::recalcStyleIfNeededAfterAttributeChanged if it doesn't exist
1586         https://bugs.webkit.org/show_bug.cgi?id=75802
1587
1588         Rubber-stamped by Andreas Kling.
1589
1590         Element::recalcStyleIfNeededAfterAttributeChanged shouldn't create style selector for attribute 
1591         check if it doesn't already exist. We are going to need a full style recalc anyway in that case
1592         and the constructed style selector may get throw out again.
1593
1594         * dom/Element.cpp:
1595         (WebCore::Element::recalcStyleIfNeededAfterAttributeChanged):
1596
1597 2012-01-08  No'am Rosenthal  <noam.rosenthal@nokia.com>
1598
1599         [Qt] Enable CSS_FILTERS in Qt build
1600         https://bugs.webkit.org/show_bug.cgi?id=75777
1601
1602         Enable CSS_FILTERS and unskip the tests.
1603
1604         Reviewed by Kenneth Rohde Christiansen.
1605
1606         Filter tests are now unskipped for Qt.
1607
1608         * Target.pri: add missing files to build.
1609
1610 2012-01-07  Antti Koivisto  <antti@apple.com>
1611
1612         REGRESSION (r104060): Layout Test fast/media/viewport-media-query.html is occasionally failing
1613         https://bugs.webkit.org/show_bug.cgi?id=75633
1614
1615         Reviewed by Andreas Kling.
1616         
1617         If something triggers CSSStyleSelector construction very early, before documentElement is known,
1618         it won't be able to resolve viewport-related media queries. In the included test case
1619         the attribute on <html> element triggers the style selector creation. I can't repro
1620         the fast/media/viewport-media-query.html failure but I suspect it is the same issue with
1621         a different mechanism for early CSSStyleSelector construction.
1622         
1623         - Reset style selector on documentElement change.
1624         - Remove the code for lazy documentElement initialization. It is not an useful optimization,
1625           the children of Document rarely change.
1626
1627         Test: fast/media/viewport-media-query-synchronous.html
1628
1629         * WebCore.exp.in:
1630         * dom/Document.cpp:
1631         (WebCore::Document::childrenChanged):
1632         * dom/Document.h:
1633         (WebCore::Document::documentElement):
1634
1635 2012-01-07  Andreas Kling  <awesomekling@apple.com>
1636
1637         Attempt to regenerate bindings on the Windows bot.
1638
1639         * html/HTMLCollection.h:
1640
1641 2012-01-07  Daniel Bates  <dbates@webkit.org>
1642
1643         Memory allocator mismatch; Use operator new[] with OwnArrayPtr instead of fastMalloc()
1644
1645         Rubber-stamped by Adam Barth.
1646
1647         Currently getProgramInfoLog() in GraphicsContext3DOpenGL.cpp assumes that operator new[]
1648         and fastMalloc() are equivalent when it adopts a fastMalloc() allocated buffer. Notice,
1649         OwnArrayPtr ultimately calls delete[] on destruction. When GLOBAL_FASTMALLOC_NEW is disabled,
1650         it isn't true that operator new[], operator delete[] are equivalent to fastMalloc(), fastFree(),
1651         respectively. Hence, there may be a mismatch between the allocation and deallocation
1652         routines. Therefore, we should allocate the array to be adopted by OwnArrayPtr using
1653         operator new[].
1654
1655         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1656         (WebCore::GraphicsContext3D::getProgramInfoLog):
1657
1658 2012-01-07  Chris Marrin  <cmarrin@apple.com>
1659
1660         Fixed ANGLE build for GNU and QT broken in https://trac.webkit.org/changeset/104363
1661
1662         Unreviewed.
1663
1664         * GNUmakefile.list.am:
1665         * Target.pri:
1666
1667 2012-01-07  Andreas Kling  <awesomekling@apple.com>
1668
1669         Unreviewed C++ bindings build fix after r104383.
1670
1671         Use WTF::getPtr() to grab at impl pointer since they could be either RefPtr or raw.
1672
1673         * bindings/scripts/CodeGeneratorCPP.pm:
1674         (GenerateImplementation):
1675         * bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
1676         (WebDOMTestCallback::impl):
1677         * bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp:
1678         (WebDOMTestEventConstructor::impl):
1679         * bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
1680         (WebDOMTestInterface::impl):
1681         * bindings/scripts/test/CPP/WebDOMTestMediaQueryListListener.cpp:
1682         (WebDOMTestMediaQueryListListener::impl):
1683         * bindings/scripts/test/CPP/WebDOMTestNamedConstructor.cpp:
1684         (WebDOMTestNamedConstructor::impl):
1685         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1686         (WebDOMTestObj::impl):
1687         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
1688         (WebDOMTestSerializedScriptValueInterface::impl):
1689
1690 2012-01-07  Andreas Kling  <awesomekling@apple.com>
1691
1692         Simplify HTMLCollection ownership model.
1693         <http://webkit.org/b/75437>
1694
1695         Reviewed by Sam Weinig.
1696
1697         Remove HTMLCollection's inheritance from RefCounted and use OwnPtr to store it.
1698         Added ref()/deref() methods that forward to the collection's base node, these
1699         are only ever used by DOM wrappers.
1700
1701         This is a behavior change, HTMLCollection wrappers now keep the base node alive.
1702
1703         Test: fast/dom/htmlcollection-protects-base.html
1704
1705         * html/HTMLCollection.h:
1706         (WebCore::HTMLCollection::ref):
1707         (WebCore::HTMLCollection::deref):
1708
1709             Removed inheritance from RefCounted. Added ref/deref that forward the refs
1710             to the collection's base Node.
1711
1712         * dom/Element.cpp:
1713         (WebCore::Element::~Element):
1714         * dom/Document.h:
1715         * dom/Document.cpp:
1716         (WebCore::Document::~Document):
1717         * html/HTMLFormElement.cpp:
1718         (WebCore::HTMLFormElement::~HTMLFormElement):
1719         * html/HTMLSelectElement.h:
1720         * html/HTMLSelectElement.cpp:
1721
1722             Remove HTMLCollection::detachFromNode() and call sites.
1723
1724         * html/HTMLAllCollection.cpp:
1725         (WebCore::HTMLAllCollection::namedItemWithIndex):
1726         * html/HTMLCollection.cpp:
1727         (WebCore::HTMLCollection::HTMLCollection):
1728         (WebCore::HTMLCollection::invalidateCacheIfNeeded):
1729         (WebCore::HTMLCollection::itemAfter):
1730         (WebCore::HTMLCollection::calcLength):
1731         (WebCore::HTMLCollection::length):
1732         (WebCore::HTMLCollection::item):
1733         (WebCore::HTMLCollection::nextItem):
1734         (WebCore::HTMLCollection::namedItem):
1735         (WebCore::HTMLCollection::updateNameCache):
1736         (WebCore::HTMLCollection::hasNamedItem):
1737         (WebCore::HTMLCollection::namedItems):
1738         (WebCore::HTMLCollection::tags):
1739         * html/HTMLFormCollection.cpp:
1740         (WebCore::HTMLFormCollection::calcLength):
1741         (WebCore::HTMLFormCollection::item):
1742         (WebCore::HTMLFormCollection::getNamedItem):
1743         (WebCore::HTMLFormCollection::namedItem):
1744         (WebCore::HTMLFormCollection::updateNameCache):
1745         * html/HTMLNameCollection.cpp:
1746         (WebCore::HTMLNameCollection::itemAfter):
1747         * html/HTMLOptionsCollection.cpp:
1748         (WebCore::HTMLOptionsCollection::add):
1749         (WebCore::HTMLOptionsCollection::remove):
1750         (WebCore::HTMLOptionsCollection::selectedIndex):
1751         (WebCore::HTMLOptionsCollection::setSelectedIndex):
1752         (WebCore::HTMLOptionsCollection::setLength):
1753         * html/HTMLPropertiesCollection.cpp:
1754         (WebCore::HTMLPropertiesCollection::length):
1755         (WebCore::HTMLPropertiesCollection::item):
1756         (WebCore::HTMLPropertiesCollection::names):
1757
1758             Removed base node null-checks and assertions. Added one assertion to
1759             the HTMLCollection constructor (that m_base is non-null.)
1760
1761         * dom/Document.h:
1762         * dom/Document.cpp:
1763         (WebCore::Document::openSearchDescriptionURL):
1764         (WebCore::Document::cachedCollection):
1765         (WebCore::Document::images):
1766         (WebCore::Document::applets):
1767         (WebCore::Document::embeds):
1768         (WebCore::Document::plugins):
1769         (WebCore::Document::objects):
1770         (WebCore::Document::scripts):
1771         (WebCore::Document::links):
1772         (WebCore::Document::forms):
1773         (WebCore::Document::anchors):
1774         (WebCore::Document::all):
1775         (WebCore::Document::windowNamedItems):
1776         (WebCore::Document::documentNamedItems):
1777         * bindings/js/JSDOMWindowCustom.cpp:
1778         (WebCore::namedItemGetter):
1779         * bindings/js/JSHTMLDocumentCustom.cpp:
1780         (WebCore::JSHTMLDocument::nameGetter):
1781         (WebCore::JSHTMLDocument::all):
1782         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1783         (WebCore::V8DOMWindow::namedPropertyGetter):
1784         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1785         (WebCore::V8HTMLDocument::GetNamedProperty):
1786         * dom/ElementRareData.h:
1787         (WebCore::ElementRareData::ensureCachedHTMLCollection):
1788         * dom/NodeRareData.h:
1789         (WebCore::NodeRareData::properties):
1790         * html/HTMLAllCollection.h:
1791         * html/HTMLAllCollection.cpp:
1792         (WebCore::HTMLAllCollection::create):
1793         * html/HTMLCollection.h:
1794         * html/HTMLCollection.cpp:
1795         (WebCore::HTMLCollection::create):
1796         (WebCore::HTMLCollection::HTMLCollection):
1797         * html/HTMLDataListElement.cpp:
1798         (WebCore::HTMLDataListElement::options):
1799         * html/HTMLDataListElement.h:
1800         * html/HTMLElement.cpp:
1801         (WebCore::HTMLElement::children):
1802         * html/HTMLElement.h:
1803         * html/HTMLSelectElement.h:
1804         (WebCore::HTMLSelectElement::options):
1805         * html/HTMLFormCollection.h:
1806         * html/HTMLFormElement.h:
1807         * html/HTMLFormElement.cpp:
1808         (WebCore::HTMLFormElement::elements):
1809         * html/HTMLNameCollection.h:
1810         (WebCore::HTMLNameCollection::create):
1811         * html/HTMLFormCollection.cpp:
1812         (WebCore::HTMLFormCollection::create):
1813         * html/HTMLMapElement.cpp:
1814         (WebCore::HTMLMapElement::imageElement):
1815         (WebCore::HTMLMapElement::areas):
1816         * html/HTMLMapElement.h:
1817         * html/HTMLPropertiesCollection.h:
1818         * html/HTMLTableElement.cpp:
1819         (WebCore::HTMLTableElement::rows):
1820         (WebCore::HTMLTableElement::tBodies):
1821         * html/HTMLTableElement.h:
1822         * html/HTMLTableRowElement.cpp:
1823         (WebCore::HTMLTableRowElement::insertCell):
1824         (WebCore::HTMLTableRowElement::deleteCell):
1825         (WebCore::HTMLTableRowElement::cells):
1826         * html/HTMLTableRowElement.h:
1827         * html/HTMLTableRowsCollection.cpp:
1828         (WebCore::HTMLTableRowsCollection::create):
1829         (WebCore::HTMLTableRowsCollection::itemAfter):
1830         * html/HTMLTableRowsCollection.h:
1831         * html/HTMLTableSectionElement.h:
1832         * html/HTMLTableSectionElement.cpp:
1833         (WebCore::HTMLTableSectionElement::insertRow):
1834         (WebCore::HTMLTableSectionElement::deleteRow):
1835         (WebCore::HTMLTableSectionElement::rows):
1836         * html/HTMLInputElement.cpp:
1837         (WebCore::HTMLInputElement::selectedOption):
1838         * html/HTMLOptionsCollection.h:
1839         * html/HTMLOptionsCollection.cpp:
1840         (WebCore::HTMLOptionsCollection::create):
1841         * html/HTMLPropertiesCollection.cpp:
1842         (WebCore::HTMLPropertiesCollection::create):
1843         * Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
1844         (WebCore::AccessibilityRenderObject::getDocumentLinks):
1845
1846             Store cached HTMLCollections in OwnPtrs. Methods that used to return
1847             PassRefPtr<HTMLCollection> now simply return HTMLCollection*.
1848             Updated call sites as appropriate.
1849
1850 2012-01-07  Adam Barth  <abarth@webkit.org>
1851
1852         Attempt to fix Qt build.
1853
1854         * page/Geolocation.cpp:
1855         (WebCore::Geolocation::Geolocation):
1856
1857 2012-01-06  Ryosuke Niwa  <rniwa@webkit.org>
1858
1859         REGRESSION(r104210): Crash inside DynamicSubtreeNodeList::length
1860         https://bugs.webkit.org/show_bug.cgi?id=75731
1861
1862         Reviewed by Andreas Kling.
1863
1864         The crash was caused by DynamicSubtreeNodeList::SubtreeCaches::domVersionIsConsistent
1865         using m_cachedItem as a way to access the document. Changed SubtreeCaches to use
1866         DynamicSubtreeNodeList's m_node instead.
1867
1868         Test: fast/dom/node-list-length-after-removing-node.html
1869
1870         * dom/DynamicNodeList.cpp:
1871         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setLengthCache):
1872         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setItemCache):
1873         (WebCore::DynamicSubtreeNodeList::length):
1874         (WebCore::DynamicSubtreeNodeList::item):
1875         * dom/DynamicNodeList.h:
1876         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::isLengthCacheValid):
1877         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::isItemCacheValid):
1878         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItem):
1879         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::domVersionIsConsistent):
1880
1881 2012-01-07  Adam Barth  <abarth@webkit.org>
1882
1883         Disconnecting DOMWindow properties is fragile and overly complicated
1884         https://bugs.webkit.org/show_bug.cgi?id=75699
1885
1886         Reviewed by Alexey Proskuryakov.
1887
1888         Previously, we had to carefully check every object tree hanging off of
1889         DOMWindow to make sure that every property correctly disconnected
1890         itself and all its subobjects from the Frame when the DOMWindow
1891         disconnected from the Frame.
1892
1893         This patch introduces DOMWindowProperty, which is a base class that
1894         handles this work automagically, ensuring that we won't have any
1895         dangling Frame pointers and removing a bunch of boilerplate code.
1896
1897         * CMakeLists.txt:
1898         * GNUmakefile.list.am:
1899         * Target.pri:
1900         * WebCore.gypi:
1901         * WebCore.vcproj/WebCore.vcproj:
1902         * css/StyleMedia.cpp:
1903         (WebCore::StyleMedia::StyleMedia):
1904         * css/StyleMedia.h:
1905         (WebCore::StyleMedia::create):
1906         * loader/appcache/DOMApplicationCache.cpp:
1907         (WebCore::DOMApplicationCache::DOMApplicationCache):
1908         (WebCore::DOMApplicationCache::disconnectFrame):
1909         * loader/appcache/DOMApplicationCache.h:
1910         * page/BarInfo.cpp:
1911         (WebCore::BarInfo::BarInfo):
1912         * page/BarInfo.h:
1913         * page/Console.cpp:
1914         (WebCore::Console::Console):
1915         (WebCore::Console::memory):
1916         * page/Console.h:
1917         * page/DOMSelection.cpp:
1918         (WebCore::DOMSelection::DOMSelection):
1919         * page/DOMSelection.h:
1920         * page/DOMWindow.cpp:
1921         (WebCore::DOMWindow::registerProperty):
1922         (WebCore::DOMWindow::unregisterProperty):
1923         (WebCore::DOMWindow::clear):
1924         * page/DOMWindow.h:
1925         * page/Geolocation.cpp:
1926         (WebCore::Geolocation::Geolocation):
1927         (WebCore::Geolocation::disconnectFrame):
1928         * page/Geolocation.h:
1929         * page/History.cpp:
1930         (WebCore::History::History):
1931         * page/History.h:
1932         * page/Location.cpp:
1933         (WebCore::Location::Location):
1934         * page/Location.h:
1935         * page/Navigator.cpp:
1936         (WebCore::Navigator::Navigator):
1937         (WebCore::Navigator::~Navigator):
1938         * page/Navigator.h:
1939         * page/Performance.cpp:
1940         (WebCore::Performance::Performance):
1941         (WebCore::Performance::memory):
1942         * page/Performance.h:
1943         * page/PerformanceNavigation.cpp:
1944         (WebCore::PerformanceNavigation::PerformanceNavigation):
1945         * page/PerformanceNavigation.h:
1946         * page/PerformanceTiming.cpp:
1947         (WebCore::PerformanceTiming::PerformanceTiming):
1948         * page/PerformanceTiming.h:
1949         * page/Screen.cpp:
1950         (WebCore::Screen::Screen):
1951         * page/Screen.h:
1952         * plugins/DOMMimeTypeArray.cpp:
1953         (WebCore::DOMMimeTypeArray::DOMMimeTypeArray):
1954         * plugins/DOMMimeTypeArray.h:
1955         * plugins/DOMPluginArray.cpp:
1956         (WebCore::DOMPluginArray::DOMPluginArray):
1957         * plugins/DOMPluginArray.h:
1958         * storage/Storage.cpp:
1959         (WebCore::Storage::Storage):
1960         * storage/Storage.h:
1961
1962 2012-01-06  Mark Rowe  <mrowe@apple.com>
1963
1964         REGRESSION (r83075): Save as PDF does not generate any links for webkit.org and others
1965         <http://webkit.org/b/75768> <rdar://problem/10659258>
1966
1967         Use RenderObject::hasOutline when determining whether to always create line boxes so that
1968         we take in to consideration whether we'll be creating PDF link rects.
1969
1970         Reviewed by Dan Bernstein.
1971
1972         * rendering/RenderInline.cpp:
1973         (WebCore::RenderInline::styleDidChange):
1974
1975 2012-01-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1976
1977         Unreviewed, rolling out r104373 and r104374.
1978         http://trac.webkit.org/changeset/104373
1979         http://trac.webkit.org/changeset/104374
1980         https://bugs.webkit.org/show_bug.cgi?id=75769
1981
1982         Too many assertion failures. (Requested by kling on #webkit).
1983
1984         * bindings/js/JSDOMWindowCustom.cpp:
1985         (WebCore::namedItemGetter):
1986         * bindings/js/JSHTMLDocumentCustom.cpp:
1987         (WebCore::JSHTMLDocument::nameGetter):
1988         (WebCore::JSHTMLDocument::all):
1989         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1990         (WebCore::V8DOMWindow::namedPropertyGetter):
1991         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1992         (WebCore::V8HTMLDocument::GetNamedProperty):
1993         * dom/Document.cpp:
1994         (WebCore::Document::~Document):
1995         (WebCore::Document::openSearchDescriptionURL):
1996         (WebCore::Document::cachedCollection):
1997         (WebCore::Document::images):
1998         (WebCore::Document::applets):
1999         (WebCore::Document::embeds):
2000         (WebCore::Document::plugins):
2001         (WebCore::Document::objects):
2002         (WebCore::Document::scripts):
2003         (WebCore::Document::links):
2004         (WebCore::Document::forms):
2005         (WebCore::Document::anchors):
2006         (WebCore::Document::all):
2007         (WebCore::Document::windowNamedItems):
2008         (WebCore::Document::documentNamedItems):
2009         * dom/Document.h:
2010         * dom/Element.cpp:
2011         (WebCore::Element::~Element):
2012         * dom/ElementRareData.h:
2013         (WebCore::ElementRareData::cachedHTMLCollection):
2014         (WebCore::ElementRareData::ensureCachedHTMLCollection):
2015         * dom/NodeRareData.h:
2016         (WebCore::NodeRareData::properties):
2017         * html/HTMLAllCollection.cpp:
2018         (WebCore::HTMLAllCollection::create):
2019         (WebCore::HTMLAllCollection::namedItemWithIndex):
2020         * html/HTMLAllCollection.h:
2021         * html/HTMLCollection.cpp:
2022         (WebCore::HTMLCollection::HTMLCollection):
2023         (WebCore::HTMLCollection::create):
2024         (WebCore::HTMLCollection::detachFromNode):
2025         (WebCore::HTMLCollection::invalidateCacheIfNeeded):
2026         (WebCore::HTMLCollection::itemAfter):
2027         (WebCore::HTMLCollection::calcLength):
2028         (WebCore::HTMLCollection::length):
2029         (WebCore::HTMLCollection::item):
2030         (WebCore::HTMLCollection::nextItem):
2031         (WebCore::HTMLCollection::namedItem):
2032         (WebCore::HTMLCollection::updateNameCache):
2033         (WebCore::HTMLCollection::hasNamedItem):
2034         (WebCore::HTMLCollection::namedItems):
2035         (WebCore::HTMLCollection::tags):
2036         * html/HTMLCollection.h:
2037         * html/HTMLDataListElement.cpp:
2038         (WebCore::HTMLDataListElement::options):
2039         * html/HTMLDataListElement.h:
2040         * html/HTMLElement.cpp:
2041         (WebCore::HTMLElement::children):
2042         * html/HTMLElement.h:
2043         * html/HTMLFormCollection.cpp:
2044         (WebCore::HTMLFormCollection::create):
2045         (WebCore::HTMLFormCollection::calcLength):
2046         (WebCore::HTMLFormCollection::item):
2047         (WebCore::HTMLFormCollection::getNamedItem):
2048         (WebCore::HTMLFormCollection::namedItem):
2049         (WebCore::HTMLFormCollection::updateNameCache):
2050         * html/HTMLFormCollection.h:
2051         * html/HTMLFormElement.cpp:
2052         (WebCore::HTMLFormElement::~HTMLFormElement):
2053         (WebCore::HTMLFormElement::elements):
2054         * html/HTMLFormElement.h:
2055         * html/HTMLInputElement.cpp:
2056         (WebCore::HTMLInputElement::selectedOption):
2057         * html/HTMLMapElement.cpp:
2058         (WebCore::HTMLMapElement::imageElement):
2059         (WebCore::HTMLMapElement::areas):
2060         * html/HTMLMapElement.h:
2061         * html/HTMLNameCollection.cpp:
2062         (WebCore::HTMLNameCollection::itemAfter):
2063         * html/HTMLNameCollection.h:
2064         (WebCore::HTMLNameCollection::create):
2065         * html/HTMLOptionsCollection.cpp:
2066         (WebCore::HTMLOptionsCollection::create):
2067         (WebCore::HTMLOptionsCollection::add):
2068         (WebCore::HTMLOptionsCollection::remove):
2069         (WebCore::HTMLOptionsCollection::selectedIndex):
2070         (WebCore::HTMLOptionsCollection::setSelectedIndex):
2071         (WebCore::HTMLOptionsCollection::setLength):
2072         * html/HTMLOptionsCollection.h:
2073         * html/HTMLPropertiesCollection.cpp:
2074         (WebCore::HTMLPropertiesCollection::create):
2075         (WebCore::HTMLPropertiesCollection::length):
2076         (WebCore::HTMLPropertiesCollection::item):
2077         (WebCore::HTMLPropertiesCollection::names):
2078         * html/HTMLPropertiesCollection.h:
2079         * html/HTMLSelectElement.cpp:
2080         (WebCore::HTMLSelectElement::~HTMLSelectElement):
2081         (WebCore::HTMLSelectElement::options):
2082         * html/HTMLSelectElement.h:
2083         * html/HTMLTableElement.cpp:
2084         (WebCore::HTMLTableElement::~HTMLTableElement):
2085
2086 2012-01-06  Andreas Kling  <awesomekling@apple.com>
2087
2088         Unreviewed build fix after r104373.
2089
2090         * html/HTMLTableElement.cpp:
2091         (WebCore::HTMLTableElement::~HTMLTableElement):
2092
2093 2012-01-06  Andreas Kling  <awesomekling@apple.com>
2094
2095         Simplify HTMLCollection ownership model.
2096         <http://webkit.org/b/75437>
2097
2098         Reviewed by Sam Weinig.
2099
2100         Remove HTMLCollection's inheritance from RefCounted and use OwnPtr to store it.
2101         Added ref()/deref() methods that forward to the collection's base node, these
2102         are only ever used by DOM wrappers.
2103
2104         This is a behavior change, HTMLCollection wrappers now keep the base node alive.
2105
2106         Test: fast/dom/htmlcollection-protects-base.html
2107
2108         * html/HTMLCollection.h:
2109         (WebCore::HTMLCollection::ref):
2110         (WebCore::HTMLCollection::deref):
2111
2112             Removed inheritance from RefCounted. Added ref/deref that forward the refs
2113             to the collection's base Node.
2114
2115         * dom/Element.cpp:
2116         (WebCore::Element::~Element):
2117         * dom/Document.h:
2118         * dom/Document.cpp:
2119         (WebCore::Document::~Document):
2120         * html/HTMLFormElement.cpp:
2121         (WebCore::HTMLFormElement::~HTMLFormElement):
2122         * html/HTMLSelectElement.h:
2123         * html/HTMLSelectElement.cpp:
2124
2125             Remove HTMLCollection::detachFromNode() and call sites.
2126
2127         * html/HTMLAllCollection.cpp:
2128         (WebCore::HTMLAllCollection::namedItemWithIndex):
2129         * html/HTMLCollection.cpp:
2130         (WebCore::HTMLCollection::HTMLCollection):
2131         (WebCore::HTMLCollection::invalidateCacheIfNeeded):
2132         (WebCore::HTMLCollection::itemAfter):
2133         (WebCore::HTMLCollection::calcLength):
2134         (WebCore::HTMLCollection::length):
2135         (WebCore::HTMLCollection::item):
2136         (WebCore::HTMLCollection::nextItem):
2137         (WebCore::HTMLCollection::namedItem):
2138         (WebCore::HTMLCollection::updateNameCache):
2139         (WebCore::HTMLCollection::hasNamedItem):
2140         (WebCore::HTMLCollection::namedItems):
2141         (WebCore::HTMLCollection::tags):
2142         * html/HTMLFormCollection.cpp:
2143         (WebCore::HTMLFormCollection::calcLength):
2144         (WebCore::HTMLFormCollection::item):
2145         (WebCore::HTMLFormCollection::getNamedItem):
2146         (WebCore::HTMLFormCollection::namedItem):
2147         (WebCore::HTMLFormCollection::updateNameCache):
2148         * html/HTMLNameCollection.cpp:
2149         (WebCore::HTMLNameCollection::itemAfter):
2150         * html/HTMLOptionsCollection.cpp:
2151         (WebCore::HTMLOptionsCollection::add):
2152         (WebCore::HTMLOptionsCollection::remove):
2153         (WebCore::HTMLOptionsCollection::selectedIndex):
2154         (WebCore::HTMLOptionsCollection::setSelectedIndex):
2155         (WebCore::HTMLOptionsCollection::setLength):
2156         * html/HTMLPropertiesCollection.cpp:
2157         (WebCore::HTMLPropertiesCollection::length):
2158         (WebCore::HTMLPropertiesCollection::item):
2159         (WebCore::HTMLPropertiesCollection::names):
2160
2161             Removed base node null-checks and assertions. Added one assertion to
2162             the HTMLCollection constructor (that m_base is non-null.)
2163
2164         * dom/Document.h:
2165         * dom/Document.cpp:
2166         (WebCore::Document::openSearchDescriptionURL):
2167         (WebCore::Document::cachedCollection):
2168         (WebCore::Document::images):
2169         (WebCore::Document::applets):
2170         (WebCore::Document::embeds):
2171         (WebCore::Document::plugins):
2172         (WebCore::Document::objects):
2173         (WebCore::Document::scripts):
2174         (WebCore::Document::links):
2175         (WebCore::Document::forms):
2176         (WebCore::Document::anchors):
2177         (WebCore::Document::all):
2178         (WebCore::Document::windowNamedItems):
2179         (WebCore::Document::documentNamedItems):
2180         * bindings/js/JSDOMWindowCustom.cpp:
2181         (WebCore::namedItemGetter):
2182         * bindings/js/JSHTMLDocumentCustom.cpp:
2183         (WebCore::JSHTMLDocument::nameGetter):
2184         (WebCore::JSHTMLDocument::all):
2185         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2186         (WebCore::V8DOMWindow::namedPropertyGetter):
2187         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2188         (WebCore::V8HTMLDocument::GetNamedProperty):
2189         * dom/ElementRareData.h:
2190         (WebCore::ElementRareData::ensureCachedHTMLCollection):
2191         * dom/NodeRareData.h:
2192         (WebCore::NodeRareData::properties):
2193         * html/HTMLAllCollection.h:
2194         * html/HTMLAllCollection.cpp:
2195         (WebCore::HTMLAllCollection::create):
2196         * html/HTMLCollection.h:
2197         * html/HTMLCollection.cpp:
2198         (WebCore::HTMLCollection::create):
2199         (WebCore::HTMLCollection::HTMLCollection):
2200         * html/HTMLDataListElement.cpp:
2201         (WebCore::HTMLDataListElement::options):
2202         * html/HTMLDataListElement.h:
2203         * html/HTMLElement.cpp:
2204         (WebCore::HTMLElement::children):
2205         * html/HTMLElement.h:
2206         * html/HTMLSelectElement.h:
2207         (WebCore::HTMLSelectElement::options):
2208         * html/HTMLFormCollection.h:
2209         * html/HTMLFormElement.h:
2210         * html/HTMLFormElement.cpp:
2211         (WebCore::HTMLFormElement::elements):
2212         * html/HTMLNameCollection.h:
2213         (WebCore::HTMLNameCollection::create):
2214         * html/HTMLFormCollection.cpp:
2215         (WebCore::HTMLFormCollection::create):
2216         * html/HTMLMapElement.cpp:
2217         (WebCore::HTMLMapElement::imageElement):
2218         (WebCore::HTMLMapElement::areas):
2219         * html/HTMLMapElement.h:
2220         * html/HTMLPropertiesCollection.h:
2221         * html/HTMLTableElement.cpp:
2222         (WebCore::HTMLTableElement::rows):
2223         (WebCore::HTMLTableElement::tBodies):
2224         * html/HTMLTableElement.h:
2225         * html/HTMLTableRowElement.cpp:
2226         (WebCore::HTMLTableRowElement::insertCell):
2227         (WebCore::HTMLTableRowElement::deleteCell):
2228         (WebCore::HTMLTableRowElement::cells):
2229         * html/HTMLTableRowElement.h:
2230         * html/HTMLTableRowsCollection.cpp:
2231         (WebCore::HTMLTableRowsCollection::create):
2232         (WebCore::HTMLTableRowsCollection::itemAfter):
2233         * html/HTMLTableRowsCollection.h:
2234         * html/HTMLTableSectionElement.h:
2235         * html/HTMLTableSectionElement.cpp:
2236         (WebCore::HTMLTableSectionElement::insertRow):
2237         (WebCore::HTMLTableSectionElement::deleteRow):
2238         (WebCore::HTMLTableSectionElement::rows):
2239         * html/HTMLInputElement.cpp:
2240         (WebCore::HTMLInputElement::selectedOption):
2241         * html/HTMLOptionsCollection.h:
2242         * html/HTMLOptionsCollection.cpp:
2243         (WebCore::HTMLOptionsCollection::create):
2244         * html/HTMLPropertiesCollection.cpp:
2245         (WebCore::HTMLPropertiesCollection::create):
2246
2247             Store cached HTMLCollections in OwnPtrs. Methods that used to return
2248             PassRefPtr<HTMLCollection> now simply return HTMLCollection*.
2249             Updated call sites as appropriate.
2250
2251 2012-01-06  Adam Barth  <abarth@webkit.org>
2252
2253         DOMWindow should be a FrameDestructionObserver
2254         https://bugs.webkit.org/show_bug.cgi?id=75697
2255
2256         Reviewed by Alexey Proskuryakov.
2257
2258         DOMWindow plays exactly the role of a FrameDestructionObserver, just
2259         with special-case code.  It should just use the general-case code.
2260
2261         * page/DOMWindow.cpp:
2262         (WebCore::DOMWindow::DOMWindow):
2263         (WebCore::DOMWindow::~DOMWindow):
2264         (WebCore::DOMWindow::frameDestroyed):
2265         * page/DOMWindow.h:
2266         * page/Frame.cpp:
2267         (WebCore::Frame::~Frame):
2268         (WebCore::Frame::clearDOMWindow):
2269         (WebCore::Frame::setDOMWindow):
2270         * page/Frame.h:
2271
2272 2012-01-06  Joseph Pecoraro  <pecoraro@apple.com>
2273
2274         Web Inspector: Missing Implementation of Public InspectorDOMAgent Function
2275         https://bugs.webkit.org/show_bug.cgi?id=75759
2276
2277         Implement missing accessor and make setter public.
2278
2279         Reviewed by Timothy Hatcher.
2280
2281         * inspector/InspectorDOMAgent.cpp:
2282         (WebCore::InspectorDOMAgent::searchingForNodeInPage):
2283         * inspector/InspectorDOMAgent.h:
2284
2285 2012-01-06  W. James MacLean  <wjmaclean@chromium.org>
2286
2287         [Chromium] Cull occluded tiles in tiled layers
2288         https://bugs.webkit.org/show_bug.cgi?id=70533
2289
2290         Reviewed by James Robinson.
2291
2292         Unit test provided, must pass all existing GPU layout tests.
2293
2294         * WebCore.gypi:
2295         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2296         (WebCore::CCLayerImpl::appendQuads):
2297         (WebCore::CCLayerImpl::quadTransform):
2298         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2299         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
2300         (WebCore::CCLayerTreeHostImpl::optimizeRenderPasses):
2301         (WebCore::CCLayerTreeHostImpl::drawLayers):
2302         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2303         * platform/graphics/chromium/cc/CCQuadCuller.cpp: Added.
2304         (std::swap):
2305         (WebCore::regionContainsRect):
2306         (WebCore::CCQuadCuller::cullOccludedQuads):
2307         * platform/graphics/chromium/cc/CCQuadCuller.h: Added.
2308         (WebCore::CCQuadCuller::CCQuadCuller):
2309         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2310         (WebCore::CCRenderPass::optimizeQuads):
2311         * platform/graphics/chromium/cc/CCRenderPass.h:
2312
2313 2012-01-06  Anders Carlsson  <andersca@apple.com>
2314
2315         Move more rubberbanding code into ScrollAnimatorMac::smoothScrollWithEvent
2316         https://bugs.webkit.org/show_bug.cgi?id=75750
2317
2318         Reviewed by Sam Weinig.
2319
2320         * platform/mac/ScrollAnimatorMac.h:
2321         * platform/mac/ScrollAnimatorMac.mm:
2322         (WebCore::ScrollAnimatorMac::handleWheelEvent):
2323         Move rubberbanding related code into smoothScrollWithEvent.
2324
2325         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
2326         Move code here from handleWheelEvent and made the function return a boolean.
2327
2328         (WebCore::ScrollAnimatorMac::snapRubberBand):
2329         Call the client.
2330
2331         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2332         Ditto.
2333
2334 2012-01-06  Greg Billock  <gbillock@google.com>
2335
2336         WebCore implementation of the Intent object
2337         See http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html
2338         for draft spec.
2339
2340         https://bugs.webkit.org/show_bug.cgi?id=73051
2341
2342         Reviewed by Adam Barth.
2343
2344         Test: web-intents/web-intents-api.html
2345
2346         * WebCore.gypi:
2347         * page/DOMWindow.idl:
2348         * Modules/intents/Intent.cpp: Added.
2349         (WebCore::Intent::Intent):
2350         (WebCore::Intent::action):
2351         (WebCore::Intent::setAction):
2352         (WebCore::Intent::type):
2353         (WebCore::Intent::setType):
2354         (WebCore::Intent::data):
2355         (WebCore::Intent::setData):
2356         (WebCore::Intent::create):
2357         * Modules/intents/Intent.h: Added.
2358         * Modules/intents/Intent.idl: Added.
2359
2360 2012-01-06  Tim Horton  <timothy_horton@apple.com>
2361
2362         [cg] userSpaceOnUse SVG Patterns have the wrong origin
2363         https://bugs.webkit.org/show_bug.cgi?id=75741
2364         <rdar://problem/9383222>
2365
2366         Reviewed by Simon Fraser.
2367
2368         The transformation from pattern space to user space should use the userToBase CTM,
2369         not the current CTM.
2370
2371         Test: svg/custom/pattern-userSpaceOnUse-userToBaseTransform.xhtml
2372
2373         * platform/graphics/cg/GraphicsContextCG.cpp:
2374         (WebCore::GraphicsContext::applyStrokePattern):
2375         (WebCore::GraphicsContext::applyFillPattern):
2376         (WebCore::GraphicsContext::getCTM):
2377         * platform/graphics/cg/TransformationMatrixCG.cpp:
2378         (WebCore::AffineTransform::AffineTransform): Add a AffineTransform(CGAffineTransform) constructor
2379         * platform/graphics/transforms/AffineTransform.h:
2380
2381 2012-01-05  Simon Fraser  <simon.fraser@apple.com>
2382
2383         Avoid falling into tiled layers more often when the device scale factor is > 1
2384         <rdar://problem/10588725>
2385
2386         Reviewed by John Sullivan.
2387         
2388         Stop taking the device scale factor into account when deciding to make
2389         tiled layers.
2390
2391         Test: compositing/tiled-layers-hidpi.html
2392
2393         * platform/graphics/ca/GraphicsLayerCA.cpp:
2394         (WebCore::GraphicsLayerCA::requiresTiledLayer):
2395
2396 2012-01-06  Ryosuke Niwa  <rniwa@webkit.org>
2397
2398         Touch a bunch of files in an attempt to fix Mac release builds.
2399
2400         * accessibility/AXObjectCache.cpp:
2401         (WebCore::AXObjectCache::get):
2402         * accessibility/AccessibilityAllInOne.cpp:
2403         * editing/visible_units.cpp:
2404         (WebCore::previousBoundary):
2405
2406 2012-01-06  No'am Rosenthal  <noam.rosenthal@nokia.com>
2407
2408         Enable a compositing trigger for filters
2409         https://bugs.webkit.org/show_bug.cgi?id=75658
2410
2411         This will enable forcing the compositing code path when filters exist for a RenderObject.
2412
2413         Reviewed by Simon Fraser.
2414
2415         No new functionality so no new tests.
2416
2417         * page/ChromeClient.h:
2418         * rendering/RenderLayerCompositor.cpp:
2419         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
2420         (WebCore::RenderLayerCompositor::requiresCompositingForFilters):
2421         * rendering/RenderLayerCompositor.h:
2422
2423 2012-01-06  Anders Carlsson  <andersca@apple.com>
2424
2425         Add and use ScrollElasticityControllerClient::absoluteScrollPosition
2426         https://bugs.webkit.org/show_bug.cgi?id=75744
2427
2428         Reviewed by Dan Bernstein.
2429
2430         * platform/mac/ScrollAnimatorMac.h:
2431         * platform/mac/ScrollAnimatorMac.mm:
2432         (WebCore::ScrollAnimatorMac::absoluteScrollPosition):
2433         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2434         * platform/mac/ScrollElasticityController.h:
2435
2436 2012-01-06  Adam Barth  <abarth@webkit.org>
2437
2438         Move FrameDestructionObserver to its own file
2439         https://bugs.webkit.org/show_bug.cgi?id=75693
2440
2441         Reviewed by Eric Seidel.
2442
2443         We should have one class per file, on general principles.  Also, this
2444         make it possible to use this class in DOMWindow without introducing a
2445         circular include dependency.
2446
2447         * CMakeLists.txt:
2448         * GNUmakefile.list.am:
2449         * Target.pri:
2450         * WebCore.gypi:
2451         * WebCore.vcproj/WebCore.vcproj:
2452         * page/Frame.cpp:
2453         * page/Frame.h:
2454         * page/FrameDestructionObserver.cpp: Added.
2455         (WebCore::FrameDestructionObserver::FrameDestructionObserver):
2456         (WebCore::FrameDestructionObserver::~FrameDestructionObserver):
2457         (WebCore::FrameDestructionObserver::frameDestroyed):
2458         * page/FrameDestructionObserver.h: Added.
2459         (WebCore::FrameDestructionObserver::frame):
2460         * plugins/DOMMimeType.h:
2461         * plugins/DOMPlugin.h:
2462
2463 2012-01-06  Anders Carlsson  <andersca@apple.com>
2464
2465         Fix Snow Leopard build.
2466
2467         * platform/mac/ScrollAnimatorMac.mm:
2468         (WebCore::ScrollAnimatorMac::immediateScrollBy):
2469         Move the function definition inside #if ENABLE(RUBBER_BANDING).
2470
2471 2012-01-04  Jon Lee  <jonlee@apple.com>
2472
2473         Clicking on the cancel button on readonly and disabled search fields darkens as if the search field was editable
2474         https://bugs.webkit.org/show_bug.cgi?id=69886
2475         <rdar://problem/10070187>
2476
2477         Reviewed by Adele Peterson.
2478
2479         Tests: ManualTests/search-cancel-button.html
2480
2481         * rendering/RenderThemeMac.mm:
2482         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): If the input is readonly and/or disabled, force the cell to
2483         render without highlight.
2484
2485 2012-01-06  Simon Fraser  <simon.fraser@apple.com>
2486
2487         Mitigate scrollbar differences when running pixel tests
2488         https://bugs.webkit.org/show_bug.cgi?id=67217
2489
2490         Reviewed by Dan Bernstein.
2491
2492         Export WebCore::Settings::mockScrollbarsEnabled() for DRT.
2493
2494         * WebCore.exp.in:
2495
2496 2012-01-06  Tom Sepez  <tsepez@chromium.org>
2497
2498         Pass Content-Security-Policy directives to worker threads.
2499         https://bugs.webkit.org/show_bug.cgi?id=73242
2500
2501         Reviewed by David Levin.
2502
2503         Tests: http/tests/security/contentSecurityPolicy/shared-worker-connect-src-allowed.html
2504                http/tests/security/contentSecurityPolicy/shared-worker-connect-src-blocked.html
2505                http/tests/security/contentSecurityPolicy/worker-connect-src-allowed.html
2506                http/tests/security/contentSecurityPolicy/worker-connect-src-blocked.html
2507
2508         * page/ContentSecurityPolicy.h:
2509         (WebCore::ContentSecurityPolicy::policy):
2510         (WebCore::ContentSecurityPolicy::headerType):
2511         * workers/DedicatedWorkerContext.cpp:
2512         (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
2513         * workers/DedicatedWorkerContext.h:
2514         (WebCore::DedicatedWorkerContext::create):
2515         * workers/DedicatedWorkerThread.cpp:
2516         (WebCore::DedicatedWorkerThread::create):
2517         (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
2518         (WebCore::DedicatedWorkerThread::createWorkerContext):
2519         * workers/DedicatedWorkerThread.h:
2520         * workers/DefaultSharedWorkerRepository.cpp:
2521         (WebCore::SharedWorkerScriptLoader::notifyFinished):
2522         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
2523         * workers/DefaultSharedWorkerRepository.h:
2524         * workers/SharedWorkerContext.cpp:
2525         (WebCore::SharedWorkerContext::SharedWorkerContext):
2526         * workers/SharedWorkerContext.h:
2527         (WebCore::SharedWorkerContext::create):
2528         * workers/SharedWorkerThread.cpp:
2529         (WebCore::SharedWorkerThread::create):
2530         (WebCore::SharedWorkerThread::SharedWorkerThread):
2531         (WebCore::SharedWorkerThread::createWorkerContext):
2532         * workers/SharedWorkerThread.h:
2533         * workers/WorkerContext.cpp:
2534         (WebCore::WorkerContext::WorkerContext):
2535         * workers/WorkerContext.h:
2536         * workers/WorkerMessagingProxy.cpp:
2537         (WebCore::WorkerMessagingProxy::startWorkerContext):
2538         * workers/WorkerThread.cpp:
2539         (WebCore::WorkerThreadStartupData::create):
2540         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
2541         (WebCore::WorkerThread::WorkerThread):
2542         (WebCore::WorkerThread::workerThread):
2543         * workers/WorkerThread.h:
2544
2545 2012-01-06  Mihnea Ovidenie  <mihnea@adobe.com>
2546
2547         [CSSRegions]Crash while collecting svg elements in render flow thread.
2548         https://bugs.webkit.org/show_bug.cgi?id=73735
2549
2550         Reviewed by David Hyatt.
2551
2552         Tests: fast/regions/svg-doc-fragment-not-collected-expected.html
2553                fast/regions/svg-doc-fragment-not-collected.html
2554                fast/regions/svg-element-not-collected-expected.html
2555                fast/regions/svg-element-not-collected.html
2556                fast/regions/svg-root-element-collected.html
2557
2558         By allowing only svg root elements to be collected in a render flow thread,
2559         the svg render tree is properly constructed, thus prevented a possible further crash.
2560
2561         * dom/NodeRenderingContext.cpp:
2562         (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
2563
2564 2012-01-06  Eric Carlson  <eric.carlson@apple.com>
2565
2566         Make TextTrackCue more mutable
2567         https://bugs.webkit.org/show_bug.cgi?id=72555
2568
2569         Reviewed by Anders Carlsson.
2570
2571         Test: media/track/track-cue-mutable.html
2572
2573         * html/HTMLMediaElement.cpp:
2574         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Do nothing if the "ignore cue updates"
2575             flag is set
2576         (WebCore::HTMLMediaElement::textTrackAddCues): Block cue updates until all of the new cues have
2577             been added, then call updateActiveTextTrackCues so update the display if necessary.
2578         (WebCore::HTMLMediaElement::textTrackRemoveCues): Block cue updates until all of the new cues have
2579             been removed, then call updateActiveTextTrackCues so update the display if necessary.
2580         (WebCore::HTMLMediaElement::textTrackAddCue): Call updateActiveTextTrackCues so update the display if necessary.
2581         (WebCore::HTMLMediaElement::textTrackRemoveCue): Ditto.
2582         * html/HTMLMediaElement.h:
2583         (WebCore::HTMLMediaElement::ignoreTrackDisplayUpdateRequests):
2584         (WebCore::HTMLMediaElement::beginIgnoringTrackDisplayUpdateRequests):
2585         (WebCore::HTMLMediaElement::endIgnoringTrackDisplayUpdateRequests):
2586
2587         * html/TextTrack.cpp:
2588         (WebCore::TextTrack::cueWillChange): New, remove the cue from the media element because its
2589             position in the interval tree is based on start and end times.
2590         (WebCore::TextTrack::cueDidChange): Add the cue to the media element.
2591         * html/TextTrack.h:
2592
2593         * html/TextTrackCue.cpp:
2594         (WebCore::startKeyword): New, use a static String for the constant.
2595         (WebCore::middleKeyword): Ditto.
2596         (WebCore::endKeyword): Ditto.
2597         (WebCore::horizontalKeyword): Ditto.
2598         (WebCore::verticalKeyword): Ditto.
2599         (WebCore::verticallrKeyword): Ditto.
2600         (WebCore::TextTrackCue::cueWillChange): New, tell the track the cue is about to change.
2601         (WebCore::TextTrackCue::cueDidChange): New, tell the track the cue has changed.
2602         (WebCore::TextTrackCue::setId): New, attribute is mutable.
2603         (WebCore::TextTrackCue::setStartTime): Ditto.
2604         (WebCore::TextTrackCue::setEndTime): Ditto.
2605         (WebCore::TextTrackCue::setPauseOnExit): Ditto.
2606         (WebCore::TextTrackCue::direction): Ditto.
2607         (WebCore::TextTrackCue::setDirection): Ditto.
2608         (WebCore::TextTrackCue::setSnapToLines): Ditto.
2609         (WebCore::TextTrackCue::setLinePosition): Ditto.
2610         (WebCore::TextTrackCue::setTextPosition): Ditto.
2611         (WebCore::TextTrackCue::setSize): Ditto.
2612         (WebCore::TextTrackCue::alignment): Ditto.
2613         (WebCore::TextTrackCue::setAlignment): Ditto.
2614         (WebCore::TextTrackCue::parseSettings): Use the static strings.
2615         * html/TextTrackCue.h:
2616         (WebCore::TextTrackCue::id):
2617         (WebCore::TextTrackCue::startTime):
2618         (WebCore::TextTrackCue::endTime):
2619         (WebCore::TextTrackCue::pauseOnExit):
2620         * html/TextTrackCue.idl:
2621
2622 2012-01-06  Oliver Hunt  <oliver@apple.com>
2623
2624         DFG no longer optimises CanvasPixelArray
2625         https://bugs.webkit.org/show_bug.cgi?id=75729
2626
2627         Reviewed by Gavin Barraclough.
2628
2629         Remove the custom ClassInfo for CanvasPixelArray as that is
2630         defeating ByteArray optimisation, and is no longer needed
2631         anyway as it was only there to change the visible name.
2632
2633         * bindings/js/JSImageDataCustom.cpp:
2634         (WebCore::toJS):
2635
2636 2012-01-06  Ken Buchanan  <kenrb@chromium.org>
2637
2638         ASSERT failure due to combine-text with preceding spaces
2639         https://bugs.webkit.org/show_bug.cgi?id=65147
2640
2641         Reviewed by David Hyatt.
2642
2643         A couple of ASSERTs were failing due to a parsing problem when
2644         advancing an inline iterator to the next linebreak in a
2645         RenderCombineText. skipLeadingWhitespace advances the iterator
2646         over leading whitespace but when searching for the line break
2647         nextLineBreak would call RenderCombineText::combineText(),
2648         collapsing the text so that the iterator is pointing past the
2649         end of it.
2650
2651         This patch causes combineText() to be called during
2652         skipLeadingWhiteSpace before iteration over the RenderCombineText
2653         begins.
2654
2655         * rendering/RenderBlockLineLayout.cpp:
2656         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
2657         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
2658
2659 2012-01-06  Anders Carlsson  <andersca@apple.com>
2660
2661         Make ScrollAnimatorMac::snapRubberBandTimerFired use m_scrollElasticityController in more places
2662         https://bugs.webkit.org/show_bug.cgi?id=75726
2663
2664         Reviewed by Sam Weinig.
2665
2666         * platform/mac/ScrollAnimatorMac.h:
2667         * platform/mac/ScrollAnimatorMac.mm:
2668         (WebCore::ScrollAnimatorMac::canScrollHorizontally):
2669         (WebCore::ScrollAnimatorMac::canScrollVertically):
2670         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
2671         * platform/mac/ScrollElasticityController.h:
2672
2673 2012-01-06  Pratik Solanki  <psolanki@apple.com>
2674
2675         WebKit1 fails to compile with USE(CFNETWORK) and HAVE(NETWORK_CFDATA_ARRAY_CALLBACK)
2676         https://bugs.webkit.org/show_bug.cgi?id=75675
2677
2678         Reviewed by Oliver Hunt.
2679
2680         * platform/network/cf/ResourceHandleCFNet.cpp:
2681         (WebCore::willCacheResponse):
2682
2683 2012-01-06  Abhishek Arya  <inferno@chromium.org>
2684
2685         Crash with range selection across different documents.
2686         https://bugs.webkit.org/show_bug.cgi?id=74285
2687
2688         Reviewed by Ryosuke Niwa.
2689
2690         Test: fast/dom/Range/range-selection-across-documents-crash.html
2691
2692         * page/DOMSelection.cpp:
2693         (WebCore::DOMSelection::addRange):
2694
2695 2012-01-06  Sam Weinig  <sam@webkit.org>
2696
2697         Remove unused OwnFastMallocPtr class.
2698         https://bugs.webkit.org/show_bug.cgi?id=75722
2699
2700         Reviewed by Geoffrey Garen.
2701
2702         * ForwardingHeaders/wtf/OwnFastMallocPtr.h: Removed.
2703         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2704
2705 2012-01-06  Tony Chang  <tony@chromium.org>
2706
2707         Need to relayout when stretching the height of a flex item
2708         https://bugs.webkit.org/show_bug.cgi?id=75661
2709
2710         Reviewed by Ojan Vafai.
2711
2712         Test: css3/flexbox/flex-align-stretch.html
2713
2714         * rendering/RenderFlexibleBox.cpp:
2715         (WebCore::RenderFlexibleBox::computePreferredMainAxisExtent): Always clear the override size since
2716         it may be set when aligning.
2717         (WebCore::RenderFlexibleBox::alignChildren): Only relayout if the height changed.
2718
2719 2012-01-06  Anders Carlsson  <andersca@apple.com>
2720
2721         Add ScrollElasticityControllerClient::immediateScrollBy
2722         https://bugs.webkit.org/show_bug.cgi?id=75720
2723
2724         Reviewed by Andreas Kling.
2725
2726         Add a new ScrollElasticityControllerClient::immediateScrollBy client member function.
2727         Also, make ScrollAnimatorMac::smoothScrollWithEvent calls go through the ScrollElasticityController
2728         in preparation for moving that function to ScrollElasticityController.
2729
2730         * platform/mac/ScrollAnimatorMac.h:
2731         * platform/mac/ScrollAnimatorMac.mm:
2732         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
2733         * platform/mac/ScrollElasticityController.h:
2734
2735 2012-01-06  Wei James  <james.wei@intel.com>
2736
2737         Use VectorMath lib when possible to optimize the processing in WebAudio AudioBus
2738         https://bugs.webkit.org/show_bug.cgi?id=75334
2739
2740         Reviewed by Kenneth Russell.
2741
2742         * platform/audio/AudioBus.cpp:
2743         (WebCore::AudioBus::processWithGainFromMonoStereo):
2744
2745 2012-01-06  Jer Noble  <jer.noble@apple.com>
2746
2747         Fullscreen video controller can't be dragged the first time I enter fullscreen
2748         https://bugs.webkit.org/show_bug.cgi?id=75709
2749
2750         Reviewed by Eric Carlson.
2751
2752         No new tests; updated video-controls-drag.html.
2753
2754         When the media controls are created, check to see if we are full screen, and pass
2755         that information to the newly created controls.
2756
2757         * html/HTMLMediaElement.cpp:
2758         (WebCore::HTMLMediaElement::createMediaControls):
2759
2760 2012-01-05  Jer Noble  <jer.noble@apple.com>
2761
2762         Media Element: scrubbing in full-screen mode breaks playback.
2763         https://bugs.webkit.org/show_bug.cgi?id=75650
2764
2765         Reviewed by John Sullivan.
2766
2767         Test: fullscreen/video-controls-timeline.html
2768
2769         Only begin scrubbing if the panel itself is the mousedown event target.
2770
2771         * html/shadow/MediaControlElements.cpp:
2772         (WebCore::MediaControlPanelElement::defaultEventHandler):
2773
2774 2012-01-05  Jer Noble  <jer.noble@apple.com>
2775
2776         REGRESSION (r90797): Full screen video HUD cannot be dragged horizontally
2777         https://bugs.webkit.org/show_bug.cgi?id=75200
2778
2779         Reviewed by Eric Carlson.
2780
2781         Test: fullscreen/video-controls-drag.html
2782
2783         The !important rules in fullscreenQuickTime.css are overriding the styles added by the 
2784         drag operation in MediaControlElements.cpp.  Give the panel a "dragged" class in setPosition
2785         (clearing it in resetPosition) that allows the !important rules to apply only when the 
2786         panel is not dragged.
2787
2788         * css/fullscreenQuickTime.css:
2789         (video:-webkit-full-screen::-webkit-media-controls-panel):
2790         (video:-webkit-full-screen::-webkit-media-controls-panel:not(.dragged)):
2791         * html/shadow/MediaControlElements.cpp:
2792         (WebCore::MediaControlPanelElement::setPosition):
2793         (WebCore::MediaControlPanelElement::resetPosition):
2794
2795 2012-01-05  Antti Koivisto  <antti@apple.com>
2796
2797         REGRESSION (r104060): fast/forms/textarea-metrics.html is failing
2798         https://bugs.webkit.org/show_bug.cgi?id=75644
2799
2800         Reviewed by Alexey Proskuryakov.
2801
2802         We need to clear the style selector on doc type change as the doc type
2803         may affect interpretation of the stylesheets. r104060 extended the life
2804         of the style selector in some cases, exposing this problem.
2805
2806         * dom/Document.cpp:
2807         (WebCore::Document::setDocType):
2808
2809 2012-01-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2810
2811         [Qt] Move listing of include paths and libs to pri files in sources
2812
2813         Includepaths are sometimes modified by non-Qt contributors so keeping
2814         them in files inside Sources makes it more likely that they are updated
2815         along with project files for the other ports.
2816
2817         Using pri files instead of prf files for this also has the benefit that
2818         the include() from the main target file can be parsed and followed by
2819         Qt Creator -- something that does not work with load().
2820
2821         Dependency from a target to a library through the WEBKIT variable are
2822         handled through forwarding-files in Tools/qmake/mkspecs/modules, which
2823         set the source root of the module and include the right pri file.
2824
2825         Ideally we'd use the variant of include() that takes an optional
2826         namespace to read the variables into, or the fromfile() function,
2827         but both of these add an overhead of about 40% on the total qmake
2828         runtime, due to making a deep copy of all the variables in the
2829         project or re-reading all the prf files from scratch.
2830
2831         Reviewed by Simon Hausmann.
2832         Reviewed by Ossy.
2833
2834         * Target.pri:
2835         * WebCore.pri: Renamed from Tools/qmake/mkspecs/features/webcore.prf.
2836
2837 2012-01-06  Adam Barth  <abarth@webkit.org>
2838
2839         FrameDestructionObserver should be more full-service
2840         https://bugs.webkit.org/show_bug.cgi?id=75690
2841
2842         Reviewed by Eric Seidel.
2843
2844         This patch moves code common to both subclasses of
2845         FrameDestructionObserver into FrameDestructionObserver itself.  As we
2846         add more subclasses, we don't want to keep copy/pasting this code.
2847
2848         * page/Frame.cpp:
2849         (WebCore::FrameDestructionObserver::FrameDestructionObserver):
2850         (WebCore::FrameDestructionObserver::~FrameDestructionObserver):
2851         (WebCore::FrameDestructionObserver::frameDestroyed):
2852         * page/Frame.h:
2853         (WebCore::FrameDestructionObserver::frame):
2854         * plugins/DOMMimeType.cpp:
2855         (WebCore::DOMMimeType::DOMMimeType):
2856         (WebCore::DOMMimeType::~DOMMimeType):
2857         * plugins/DOMMimeType.h:
2858         * plugins/DOMPlugin.cpp:
2859         (WebCore::DOMPlugin::DOMPlugin):
2860         (WebCore::DOMPlugin::~DOMPlugin):
2861         * plugins/DOMPlugin.h:
2862
2863 2012-01-06  Dale Curtis  <dalecurtis@chromium.org>
2864
2865         Move MediaDocument styles into CSS. Set black background for chromium.
2866         https://bugs.webkit.org/show_bug.cgi?id=74123
2867
2868         Reviewed by Eric Seidel.
2869
2870         Test: platform/chromium/media/video-black-bg-in-media-document.html
2871
2872         * css/mediaControls.css:
2873         (body:-webkit-full-page-media):
2874         (video:-webkit-full-page-media):
2875         * css/mediaControlsChromium.css:
2876         (body:-webkit-full-page-media):
2877         * html/MediaDocument.cpp:
2878         (WebCore::MediaDocumentParser::createDocumentStructure):
2879
2880 2012-01-06  Alice Boxhall  <aboxhall@chromium.org>
2881
2882         Report correct line number for non-native editable text elements.
2883         https://bugs.webkit.org/show_bug.cgi?id=71263
2884
2885         Reviewed by Ryosuke Niwa.
2886
2887         A non-native editable text element is an element with an ARIA role of "textbox", which is
2888         set on an element which behaves like an editable text element (such as a textarea, text
2889         input field or contenteditable text), but whose behaviour is controlled by the author rather
2890         than the browser.
2891
2892         This change makes certain methods on Node, and related methods in htmlediting and
2893         visible_units, aware of the notion that an element may be editable only from the point of
2894         view of assistive technology (via the ARIA textbox role), via the EditableType enum added to
2895         EditingBoundary.h.
2896
2897         This is so that AccessibilityObject::lineForPosition() can use previousLinePosition(), and
2898         AccessibilityRenderObject::indexForVisiblePosition() can use highestEditableRoot(), in a way
2899         that respects non-native editability.
2900
2901         Test: accessibility/textbox-role-reports-line-number.html
2902
2903         * accessibility/AXObjectCache.cpp:
2904         (WebCore::AXObjectCache::rootAXEditableElement): Returns the root element which is
2905         editable from the point of view of assistive technology, whether natively or otherwise.
2906         (WebCore::AXObjectCache::nodeIsTextControl): Whether the given node is considered an
2907         editable text element by assistive technology, natively or otherwise.
2908         * accessibility/AccessibilityObject.cpp:
2909         (WebCore::AccessibilityObject::lineForPosition): Modified to request the previous line
2910         position in an element which is editable to Accessibility.
2911         * accessibility/AccessibilityRenderObject.cpp:
2912         (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Modified to request the
2913         highest root element which is editable to Accessibility.
2914         * dom/Node.cpp:
2915         (WebCore::Node::rendererIsEditableToAccessibility): Whether this node is editable to
2916         Accessibility for the given EditableLevel.
2917         (WebCore::Node::rootEditableElement): Overloaded version of this method which takes an
2918         EditableType enum value indicating whether non-native editability is to be respected.
2919         * dom/Node.h:
2920         (WebCore::Node::rendererIsEditable): Overloaded version of this method which takes an
2921         EditableType enum value indicating whether non-native editability is to be respected.
2922         (WebCore::Node::rendererIsRichlyEditable):  Overloaded version of this method which takes
2923         an EditableType enum value indicating whether non-native editability is to be respected.
2924         * editing/EditingBoundary.h:
2925         * editing/htmlediting.cpp:
2926         (WebCore::highestEditableRoot): Added optional EditableType parameter.
2927         (WebCore::isEditablePosition): Added optional EditableType parameter.
2928         (WebCore::isRichlyEditablePosition): Added optional EditableType parameter.
2929         (WebCore::editableRootForPosition): Added optional EditableType parameter.
2930         * editing/htmlediting.h:
2931         * editing/visible_units.cpp:
2932         (WebCore::previousLeafWithSameEditability): Added optional EditableType parameter.
2933         (WebCore::previousLinePosition): Added optional EditableType parameter.
2934         (WebCore::nextLeafWithSameEditability): Added optional EditableType parameter.
2935         (WebCore::nextLinePosition): Added optional EditableType parameter.
2936         * editing/visible_units.h:
2937
2938 2012-01-05  Kent Tamura  <tkent@chromium.org>
2939
2940         Fix a crash by importing an element of which local name ends with ":input".
2941         https://bugs.webkit.org/show_bug.cgi?id=75103
2942
2943         Reviewed by Ryosuke Niwa.
2944
2945         Test: fast/dom/importNode-confusing-localName.html
2946
2947         * dom/Document.cpp:
2948         (WebCore::Document::importNode): Pass QualifiedName of the source elemnt
2949         to createElement() in order to avoid unnecessary serialization and
2950         parsing of the qualified name
2951
2952 2012-01-06  Alexis Menard  <alexis.menard@openbossa.org>
2953
2954         Move HTMLFormControlElementWithState class in its own header file.
2955         https://bugs.webkit.org/show_bug.cgi?id=75482
2956
2957         Reviewed by Kent Tamura.
2958
2959         Move HTMLFormControlElementWithState class which was mixed in HTMLFormControlElement
2960         files into its own header file and its own implementation file.
2961
2962         No new tests : the existing ones should cover the refactoring.
2963
2964         * CMakeLists.txt:
2965         * GNUmakefile.list.am:
2966         * Target.pri:
2967         * WebCore.gypi:
2968         * WebCore.vcproj/WebCore.vcproj:
2969         * WebCore.xcodeproj/project.pbxproj:
2970         * html/HTMLElementsAllInOne.cpp:
2971         * html/HTMLFormControlElement.cpp:
2972         * html/HTMLFormControlElement.h:
2973         * html/HTMLKeygenElement.h:
2974         * html/HTMLSelectElement.h:
2975         * html/HTMLTextFormControlElement.h:
2976
2977 2012-01-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2978
2979         Unreviewed, rolling out r104268.
2980         http://trac.webkit.org/changeset/104268
2981         https://bugs.webkit.org/show_bug.cgi?id=75689
2982
2983         It broke the mac build (Requested by Ossy on #webkit).
2984
2985         * CMakeLists.txt:
2986         * GNUmakefile.list.am:
2987         * Target.pri:
2988         * WebCore.gypi:
2989         * WebCore.vcproj/WebCore.vcproj:
2990         * WebCore.xcodeproj/project.pbxproj:
2991         * html/HTMLElementsAllInOne.cpp:
2992         * html/HTMLFormControlElement.cpp:
2993         (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
2994         (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
2995         (WebCore::HTMLFormControlElementWithState::didMoveToNewDocument):
2996         (WebCore::HTMLFormControlElementWithState::shouldAutocomplete):
2997         (WebCore::HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState):
2998         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
2999         * html/HTMLFormControlElement.h:
3000         (WebCore::HTMLFormControlElementWithState::canContainRangeEndPoint):
3001         (WebCore::HTMLFormControlElementWithState::saveFormControlState):
3002         (WebCore::HTMLFormControlElementWithState::restoreFormControlState):
3003         * html/HTMLFormControlElementWithState.cpp: Removed.
3004         * html/HTMLFormControlElementWithState.h: Removed.
3005         * html/HTMLKeygenElement.h:
3006         * html/HTMLSelectElement.h:
3007         * html/HTMLTextFormControlElement.h:
3008
3009 2012-01-06  Sheriff Bot  <webkit.review.bot@gmail.com>
3010
3011         Unreviewed, rolling out r104259 and r104261.
3012         http://trac.webkit.org/changeset/104259
3013         http://trac.webkit.org/changeset/104261
3014         https://bugs.webkit.org/show_bug.cgi?id=75688
3015
3016         Caused assertion failures (Requested by rniwa on #webkit).
3017
3018         * CMakeLists.txt:
3019         * GNUmakefile.list.am:
3020         * Target.pri:
3021         * WebCore.gypi:
3022         * WebCore.vcproj/WebCore.vcproj:
3023         * WebCore.xcodeproj/project.pbxproj:
3024         * dom/ContainerNode.cpp:
3025         (WebCore::ContainerNode::takeAllChildrenFrom):
3026         (WebCore::ContainerNode::insertBefore):
3027         (WebCore::ContainerNode::replaceChild):
3028         (WebCore::ContainerNode::removeBetween):
3029         (WebCore::ContainerNode::removeChildren):
3030         (WebCore::ContainerNode::appendChild):
3031         (WebCore::ContainerNode::parserAddChild):
3032         * dom/DOMAllInOne.cpp:
3033         * dom/Document.cpp:
3034         (WebCore::Document::setDocType):
3035         (WebCore::Document::adoptNode):
3036         * dom/Element.cpp:
3037         (WebCore::Element::removeShadowRoot):
3038         * dom/Node.cpp:
3039         (WebCore::Node::setDocument):
3040         (WebCore::Node::setTreeScopeRecursively):
3041         (WebCore::Node::setDocumentRecursively):
3042         (WebCore::Node::didMoveToNewDocument):
3043         * dom/Node.h:
3044         * dom/TreeScope.cpp:
3045         * dom/TreeScope.h:
3046         * dom/TreeScopeAdopter.cpp: Removed.
3047         * dom/TreeScopeAdopter.h: Removed.
3048
3049 2012-01-05  Dan Bernstein  <mitz@apple.com>
3050
3051         <rdar://problem/10633760> Update copyright strings
3052
3053         Reviewed by Mark Rowe.
3054
3055         * Info.plist:
3056
3057 2012-01-05  Alexis Menard  <alexis.menard@openbossa.org>
3058
3059         Move HTMLFormControlElementWithState class in its own header file.
3060         https://bugs.webkit.org/show_bug.cgi?id=75482
3061
3062         Reviewed by Kent Tamura.
3063
3064         Move HTMLFormControlElementWithState class which was mixed in HTMLFormControlElement
3065         files into its own header file and its own implementation file.
3066
3067         No new tests : the existing ones should cover the refactoring.
3068
3069         * CMakeLists.txt:
3070         * GNUmakefile.list.am:
3071         * Target.pri:
3072         * WebCore.gypi:
3073         * WebCore.vcproj/WebCore.vcproj:
3074         * WebCore.xcodeproj/project.pbxproj:
3075         * html/HTMLElementsAllInOne.cpp:
3076         * html/HTMLFormControlElement.cpp:
3077         * html/HTMLFormControlElement.h:
3078         * html/HTMLKeygenElement.h:
3079         * html/HTMLSelectElement.h:
3080         * html/HTMLTextFormControlElement.h:
3081
3082 2012-01-05  Wei James  <james.wei@intel.com>
3083
3084         Optimize with memcpy instead of copying frame by frame in Realtimeanalyser::doFFTAnalysis
3085         https://bugs.webkit.org/show_bug.cgi?id=74693
3086
3087         Reviewed by Kenneth Russell.
3088
3089         * webaudio/RealtimeAnalyser.cpp:
3090         (WebCore::RealtimeAnalyser::doFFTAnalysis):
3091
3092 2012-01-05  Ryosuke Niwa  <rniwa@webkit.org>
3093
3094         REGRESSION(r104210): Dromaeo DOM test score is lower
3095         https://bugs.webkit.org/show_bug.cgi?id=75679
3096
3097         Reviewed by Andreas Kling.
3098
3099         The regression was caused by isDomVersionConsistent not being able to obtain the tree version
3100         inside isLengthCacheValid when m_cachedItem is null. Fix the regression by always setting
3101         m_cachedItem to some node when caching the length so that we can obtain the tree version later.
3102
3103         Also address Antti's review comment to fit m_cachedLength, m_isLengthCacheValid, and
3104         m_isItemCacheValid all in 32-bit.
3105
3106         * dom/DynamicNodeList.cpp:
3107         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setLengthCache):
3108
3109 2012-01-05  Hajime Morrita  <morrita@chromium.org>
3110
3111         Unreviewed bad merge fix for r104259 which dropped a line from r104210.
3112
3113         * dom/TreeScopeAdopter.cpp:
3114         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
3115
3116 2012-01-05  Yongjun Zhang  <yongjun_zhang@apple.com>
3117
3118         https://bugs.webkit.org/show_bug.cgi?id=75593
3119         Reviewed by Alexey Proskuryakov.
3120
3121         Null-check 'page' variable before use, to follow the common usage pattern of m_frame->page()
3122         throughout the rest of FrameView.cpp.
3123
3124         * page/FrameView.cpp:
3125         (WebCore::FrameView::notifyPageThatContentAreaWillPaint):
3126
3127 2012-01-04  Hajime Morrita  <morrita@chromium.org>
3128
3129         [Refactoring] Moving between TreeScopes should be done by its own class.
3130         https://bugs.webkit.org/show_bug.cgi?id=75290
3131
3132         Reviewed by Ryosuke Niwa.
3133
3134         This change extracted Node::setTreeScopeRecursively(),
3135         setDocumentRecursively() and a part of setDocument() into a new
3136         class called TreeScopeAdopter. By doing this, the idea of
3137         moving a node from scope to scope, that was originally hidden
3138         behind the forest of Node APIs, has become clearer.
3139
3140         Note that this change is a preparation for Bug 59816.
3141
3142         No new tests. No behavioral change.
3143
3144         * CMakeLists.txt:
3145         * GNUmakefile.list.am:
3146         * Target.pri:
3147         * WebCore.gypi:
3148         * WebCore.vcproj/WebCore.vcproj:
3149         * WebCore.xcodeproj/project.pbxproj:
3150         * dom/ContainerNode.cpp: Followed the renaming.
3151         (WebCore::ContainerNode::takeAllChildrenFrom):
3152         (WebCore::ContainerNode::insertBefore):
3153         (WebCore::ContainerNode::replaceChild):
3154         (WebCore::ContainerNode::removeBetween):
3155         (WebCore::ContainerNode::removeChildren):
3156         (WebCore::ContainerNode::appendChild):
3157         (WebCore::ContainerNode::parserAddChild):
3158         * dom/DOMAllInOne.cpp:
3159         * dom/Document.cpp: Followed te renaming.
3160         (WebCore::Document::setDocType):
3161         (WebCore::Document::adoptNode):
3162         * dom/Element.cpp: Followed te renaming.
3163         (WebCore::Element::removeShadowRoot):
3164         * dom/Node.cpp:
3165         (WebCore::Node::setDocument):
3166         (WebCore::Node::setTreeScope):
3167         (WebCore::Node::didMoveToNewDocument):
3168         * dom/Node.h:
3169         * dom/TreeScope.h:
3170         * dom/TreeScope.cpp:
3171         (WebCore::TreeScope::adoptIfNeeded): moved from setTreeScopeRecursively()
3172         * dom/TreeScopeAdopter.cpp: Added.
3173         (WebCore::TreeScopeAdopter::TreeScopeAdopter):
3174         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
3175         (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
3176         (WebCore::TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled):
3177         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
3178         * dom/TreeScopeAdopter.h: Added.
3179         (WebCore::TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled):
3180         (WebCore::TreeScopeAdopter::execute):
3181         (WebCore::TreeScopeAdopter::needsScopeChange()):
3182         (WebCore::TreeScopeAdopter::shadowRootFor):
3183
3184 2012-01-05  Jochen Eisinger  <jochen@chromium.org>
3185
3186         Disallow access to DOM storage from detached frames.
3187         https://bugs.webkit.org/show_bug.cgi?id=61326
3188
3189         Reviewed by Adam Barth.
3190
3191         * storage/StorageAreaImpl.cpp:
3192         (WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame):
3193
3194 2012-01-05  No'am Rosenthal  <noam.rosenthal@nokia.com>
3195
3196         [Qt][Texmap] Convert shaders in TextureMapperGL to use a macro
3197         https://bugs.webkit.org/show_bug.cgi?id=75598
3198
3199         Use VERTEX_SHADER() and FRAGMENT_SHADER() macros, instead of quoted string literals when
3200         declaring shaders in TextureMapperGL.
3201
3202         We need two macros to account for the differences between OpenGL and OpenGL ES2.
3203
3204         Reviewed by Martin Robinson.
3205
3206 2012-01-05  Ryosuke Niwa  <rniwa@webkit.org>
3207
3208         sizeof(CSSRule) is 20 instead of 12 on Windows
3209         https://bugs.webkit.org/show_bug.cgi?id=75665
3210
3211         Reviewed by Darin Fisher.
3212
3213         Unlike gcc and clang, MSVC pads each consecutive member variables of the same type
3214         in bitfields. e.g. if you have:
3215
3216         sturct AB {
3217         unsigned m_1 : 31;
3218         bool m_2 : 1;
3219         }
3220
3221         then MSVC pads m_1 and allocates sizeof(unsigned) * 2 for AB whereas gcc and clang
3222         only allocate sizeof(unsigned) * 1 for AB.
3223
3224         Fix the bloat by turning all bitfields in CSSRule either signed or unsigned integers.
3225
3226         * css/CSSRule.cpp:
3227         * css/CSSRule.h:
3228         (WebCore::CSSRule::sourceLine):
3229         (WebCore::CSSRule::setSourceLine):
3230         (WebCore::CSSRule::hasCachedSelectorText):
3231         (WebCore::CSSRule::setHasCachedSelectorText):
3232         * css/CSSStyleRule.cpp:
3233         (WebCore::CSSStyleRule::CSSStyleRule):
3234         (WebCore::CSSStyleRule::cleanup):
3235         (WebCore::CSSStyleRule::selectorText):
3236         (WebCore::CSSStyleRule::setSelectorText):
3237         * css/CSSStyleRule.h:
3238
3239 2012-01-05  David Grogan  <dgrogan@chromium.org>
3240
3241         IndexedDB: fix cursor prefetch crash
3242         http://crbug.com/108071
3243         https://bugs.webkit.org/show_bug.cgi?id=75596
3244
3245         Reviewed by Tony Chang.
3246
3247         Test: storage/indexeddb/prefetch-bugfix-108071.html
3248         Note: DumpRenderTree doesn't exercise the bug, it only occurs in
3249         multi-process chromium.  The layout test will soon be run as a
3250         chromium ui test: http://codereview.chromium.org/9108004
3251
3252         * storage/IDBCursorBackendImpl.cpp:
3253         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
3254         (WebCore::IDBCursorBackendImpl::~IDBCursorBackendImpl): Destroy
3255         cursors before their objectstores.
3256         (WebCore::IDBCursorBackendImpl::prefetchReset): Don't run continue if
3257         the cursor is closed.
3258         (WebCore::IDBCursorBackendImpl::close): Set a closed flag.
3259         * storage/IDBCursorBackendImpl.h:
3260
3261 2012-01-04  James Robinson  <jamesr@chromium.org>
3262
3263         [chromium] Route all animate calls through CCLayerTreeHost in composited mode to simplify rate limiting logic
3264         https://bugs.webkit.org/show_bug.cgi?id=75577
3265
3266         Reviewed by Darin Fisher.
3267
3268         This internalizes the animation rate limiting logic to CCLayerTreeHost and removes the setters/getters for the
3269         m_animating flag. This requires that all animation updates have to go through CCLayerTreeHost to get the right
3270         rate limiting behavior, regardless of which proxy is being used.
3271
3272         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3273         (WebCore::CCLayerTreeHost::updateAnimations):
3274         (WebCore::CCLayerTreeHost::layout):
3275         (WebCore::CCLayerTreeHost::startRateLimiter):
3276         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3277         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3278         (WebCore::CCThreadProxy::beginFrameAndCommit):
3279
3280 2012-01-05  Justin Novosad  <junov@chromium.org>
3281
3282         [Chromium] NativeImageSkia should mark SkBitmaps as immutable
3283         https://bugs.webkit.org/show_bug.cgi?id=74962
3284
3285         Removed m_isDataComplete from class NativeImageSkia. Instead, data
3286         completeness will be tracked through SkBitmap::setImmutable/
3287         isImmutable.  The immutable state signifies that the pixel data
3288         will no longer change for the lifetime of the bitmap, which corresponds
3289         to the semantic of the old m_isDataComplete member. setImmutable is
3290         also called on the cached resized bitmap, since it too is invariant for
3291         its life time. Temporary resized bitmaps are also marked as immutable
3292         since they technically are.
3293
3294         Reviewed by Stephen White.
3295
3296         * platform/graphics/skia/NativeImageSkia.cpp:
3297         (WebCore::NativeImageSkia::NativeImageSkia):
3298         (WebCore::NativeImageSkia::resizedBitmap):
3299         (WebCore::NativeImageSkia::shouldCacheResampling):
3300         * platform/graphics/skia/NativeImageSkia.h:
3301         (WebCore::NativeImageSkia::setDataComplete):
3302         (WebCore::NativeImageSkia::isDataComplete):
3303
3304 2012-01-05  Sheriff Bot  <webkit.review.bot@gmail.com>
3305
3306         Unreviewed, rolling out r104231.
3307         http://trac.webkit.org/changeset/104231
3308         https://bugs.webkit.org/show_bug.cgi?id=75668
3309
3310         Breaks the Qt build (Requested by abarth on #webkit).
3311
3312         * platform/SchemeRegistry.cpp:
3313         * platform/SchemeRegistry.h:
3314
3315 2012-01-05  Beth Dakin  <bdakin@apple.com>
3316
3317         https://bugs.webkit.org/show_bug.cgi?id=75654
3318         Text fields should draw using NSTextFieldCell instead of WebKitSystemInterface
3319
3320         Reviewed by John Sullivan.
3321
3322         This change should not have any affect on tests or real web sites. It just changed 
3323         the implementation under the hood to the more modern NSCell approach.
3324         * rendering/RenderThemeMac.h:
3325         * rendering/RenderThemeMac.mm:
3326         (WebCore::RenderThemeMac::paintTextField):
3327         (WebCore::RenderThemeMac::textField):
3328
3329 2012-01-05  Ryosuke Niwa  <rniwa@webkit.org>
3330
3331         Add a compile-time assertion for the size of CSSValue
3332         https://bugs.webkit.org/show_bug.cgi?id=75635
3333
3334         Reviewed by Tony Chang.
3335
3336         Tightened the compile-time assertion.
3337
3338         * css/CSSValue.cpp:
3339
3340 2012-01-05  Adam Barth  <abarth@webkit.org>
3341
3342         [V8] CodeGeneration for SerializedScriptValue doesn't play nice with [Constructor]
3343         https://bugs.webkit.org/show_bug.cgi?id=75641
3344
3345         Reviewed by David Levin.
3346
3347         Rather than generate getters for SerializedScriptValues, we eagerly
3348         deserialize them into JavaScript objects.  However, previously, we were
3349         only doing that for DOM wrappers created by taking an existing C++
3350         object and wrapping it.  For objects created with Constructors (e.g.,
3351         those with the [Constructor] attribute), we need to do this eager
3352         deserialization during the constructor as well.
3353
3354         This bug isn't observable yet, but it is causing the WebIntent test
3355         being added in Bug 73051 to fail.
3356
3357         Test: TestSerializedScriptValueInterface.idl
3358               webintents/web-intents-api.html (after Bug 73051 lands)
3359
3360         * bindings/scripts/CodeGeneratorV8.pm:
3361         (GenerateEagerDeserialization):
3362         (GenerateConstructorCallback):
3363         (GenerateNamedConstructorCallback):
3364         (GenerateImplementation):
3365         (GenerateToV8Converters):
3366         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3367         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
3368         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::getConstructData):
3369         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3370         * bindings/scripts/test/TestSerializedScriptValueInterface.idl:
3371         * bindings/scripts/test/V8/V8TestInterface.cpp:
3372         (WebCore::V8TestInterface::constructorCallback):
3373         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3374         (WebCore::V8TestNamedConstructorConstructorCallback):
3375         * bindings/scripts/test/V8/V8TestObj.cpp:
3376         (WebCore::V8TestObj::constructorCallback):
3377         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3378         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
3379         (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate):
3380         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
3381
3382 2012-01-05  Adam Barth  <abarth@webkit.org>
3383
3384         Introduce Platform namespace for WebCore/platform
3385         https://bugs.webkit.org/show_bug.cgi?id=75653
3386
3387         Reviewed by Eric Seidel.
3388
3389         This patch introduces the Platform namespace for WebCore/platform.
3390         Introducing this namespace will help us find and fix layering
3391         violations in preparation for moving WebCore/platform to Platform.
3392
3393         * platform/SchemeRegistry.cpp:
3394         * platform/SchemeRegistry.h:
3395
3396 2012-01-05  Ryosuke Niwa  <rniwa@webkit.org>
3397
3398         Inserting nodes is slow due to Node::notifyNodeListsAttributeChanged (20%+)
3399         https://bugs.webkit.org/show_bug.cgi?id=73853
3400
3401         Reviewed by Antti Koivisto.
3402
3403         Lazily invalidate the node list caches instead of invaliding them at the time of modification. We use
3404         the DOM tree version to detect whether caches need to be invalidated or not. We now invalidate caches more
3405         frequently after this patch (in particular, invalidates caches that are stored on nodes not present in
3406         the ancestry of the modified nodes); however, our study on major Web sites such as Gmail, Facebook, Twitter,
3407         etc... indicate that about 1% of real-world usage benefits from keeping the caches alive across different
3408         DOM tree versions.
3409
3410         In order to invalidate caches lazily, this patch adds replaces the type of m_caches in DynamicSubtreeNodeList
3411         by DynamicSubtreeNodeList::SubtreeCaches which encapsulates member variables in DynamicNodeList::Caches and
3412         invalidates values as needed. Also this change allows m_caches to be allocated as a part of
3413         DynamicSubtreeNodeList instead of a separate ref-counted object.
3414
3415         * dom/Attr.cpp:
3416         (WebCore::Attr::setValue):
3417         (WebCore::Attr::childrenChanged):
3418         * dom/DynamicNodeList.cpp:
3419         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
3420         (WebCore::DynamicSubtreeNodeList::length):
3421         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
3422         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
3423         (WebCore::DynamicSubtreeNodeList::item):
3424         (WebCore::DynamicSubtreeNodeList::invalidateCache):
3425         (WebCore::DynamicNodeList::Caches::create):
3426         (WebCore::DynamicNodeList::Caches::reset):
3427         * dom/DynamicNodeList.h:
3428         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::SubtreeCaches): Added.
3429         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::isLengthCacheValid): Added.
3430         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::isItemCacheValid): Added.
3431         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedLength): Added.
3432         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItem): Added.
3433         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::cachedItemOffset): Added.
3434         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setLengthCache): Added.
3435         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::setItemCache): Added.
3436         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::reset): Added.
3437         (WebCore::DynamicSubtreeNodeList::SubtreeCaches::domVersionIsConsistent): Added.
3438         * dom/Element.cpp:
3439         (WebCore::Element::updateAfterAttributeChanged):
3440         * dom/Node.cpp:
3441         (WebCore::Node::setTreeScopeRecursively): Clear caches when a node moves from one document to another.
3442         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Only clears child node list of Attr.
3443         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Only clears child node list.
3444         (WebCore::NodeListsNodeData::invalidateCaches): Merged with invalidateCachesThatDependOnAttributes.
3445         * dom/Node.h:
3446         * dom/NodeRareData.h:
3447         * html/HTMLElement.cpp:
3448         (WebCore::HTMLElement::parseMappedAttribute):
3449         * html/HTMLLabelElement.cpp:
3450         * html/HTMLLabelElement.h:
3451
3452 2012-01-05  Ojan Vafai  <ojan@chromium.org>
3453
3454         IE quirk for percentage size on a table element doesn't work with orthogonal writing modes
3455         https://bugs.webkit.org/show_bug.cgi?id=70195
3456
3457         Reviewed by Eric Seidel.
3458
3459         Remove this quirk entirely. Mozilla and Opera don't implement it and IE
3460         doesn't restrict the quirk to standards mode. As it's unlikely for
3461         webkit-only content to hit this quirk (e.g. use tables for layout),
3462         it should be relatively safe to match Mozilla/Opera here.
3463
3464         Test: fast/writing-mode/table-percent-width-quirk.html
3465
3466         * rendering/RenderBlock.cpp:
3467         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
3468
3469 2012-01-05  Tien Ren Chen  <trchen@chromium.org>
3470
3471         [chromium] Add CCTimer class for the compositor
3472         https://bugs.webkit.org/show_bug.cgi?id=74769
3473
3474         Reviewed by James Robinson.
3475
3476         Add a simple timer class for CCThread that the timered task can be
3477         manually cancelled.
3478
3479         * WebCore.gypi:
3480         * platform/graphics/chromium/cc/CCTimer.cpp: Added.
3481         (WebCore::CCTimerTask::CCTimerTask):
3482         (WebCore::CCTimerTask::~CCTimerTask):
3483         (WebCore::CCTimerTask::performTask):
3484         (WebCore::CCTimer::CCTimer):
3485         (WebCore::CCTimer::~CCTimer):
3486         (WebCore::CCTimer::startOneShot):
3487         (WebCore::CCTimer::stop):
3488         * platform/graphics/chromium/cc/CCTimer.h: Added.
3489         (WebCore::CCTimerClient::~CCTimerClient):
3490         (WebCore::CCTimer::isActive):
3491
3492 2012-01-05  Eric Carlson  <eric.carlson@apple.com>
3493
3494         Implement temporal dimension portion of Media Fragments URI specification for video/audio
3495         https://bugs.webkit.org/show_bug.cgi?id=65838
3496
3497         Reviewed by Sam Weinig.
3498
3499         Tests: media/media-fragments/TC0001-TC0009.html
3500                media/media-fragments/TC0010-TC0019.html
3501                media/media-fragments/TC0020-TC0029.html
3502                media/media-fragments/TC0030-TC0039.html
3503                media/media-fragments/TC0040-TC0049.html
3504                media/media-fragments/TC0050-TC0059.html
3505                media/media-fragments/TC0060-TC0069.html
3506                media/media-fragments/TC0070-TC0079.html
3507                media/media-fragments/TC0080-TC0089.html
3508                media/media-fragments/TC0090-TC0099.html
3509
3510         * CMakeLists.txt: Add fragment parser files.
3511         * GNUmakefile.list.am: Ditto.