Fix svg/in-html/script-write.html with threaded HTML parser
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-13  Tony Gentilcore  <tonyg@chromium.org>
2
3         Fix svg/in-html/script-write.html with threaded HTML parser
4         https://bugs.webkit.org/show_bug.cgi?id=109495
5
6         Reviewed by Eric Seidel.
7
8         This patch makes the background parser's simulateTreeBuilder() more realistic.
9         1. The HTMLTreeBuilder does not call the updateStateFor() setState()s when in foreign content mode so we shouldn't do it when simulating the tree builder.
10         2. HTMLTreeBuilder::processTokenInForeignContent has a list of tags which exit foreign content mode. We need to respect those.
11         3. Support the <foreignObject> tag which enters and leaves foreign content mode.
12         4. The tree builder sets state to DataState upon a </script> tag when not in foreign content mode. We need to do the same.
13
14         This involved creating a namespace stack where we push upon entering each namespace and pop upon leaving.
15         We are in foreign content if the topmost namespace is SVG or MathML.
16
17         This fixes svg/in-html/script-write.html and likely others.
18
19         * html/parser/BackgroundHTMLParser.cpp:
20         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
21         * html/parser/BackgroundHTMLParser.h:
22         (BackgroundHTMLParser):
23         * html/parser/CompactHTMLToken.cpp:
24         (WebCore::CompactHTMLToken::getAttributeItem): Returns the attribute of the given name. Necessary to test for <font> attributes in simulateTreeBuilder.
25         (WebCore):
26         * html/parser/CompactHTMLToken.h:
27         (WebCore):
28         (CompactHTMLToken):
29
30 2013-02-13  Andreas Kling  <akling@apple.com>
31
32         Remove Element::getAttributeItem() overload that returned a mutable Attribute*.
33         <http://webkit.org/b/109756>
34
35         Reviewed by Antti Koivisto.
36
37         Remove this to prevent callers from accidentally causing elements to convert to UniqueElementData.
38         There are two call sites (Attr and HTMLSelectElement) that legitimately need to mutate Attribute
39         objects in-place, they now use Element::ensureUniqueElementData()->getAttributeItem() directly instead.
40
41         Small progression on Membuster3, mostly for peace of mind.
42
43         * dom/Attr.cpp:
44         (WebCore::Attr::elementAttribute):
45         * dom/Element.h:
46         (Element):
47         * html/HTMLInputElement.cpp:
48         (WebCore::HTMLInputElement::updateType):
49         * html/HTMLSelectElement.cpp:
50         (WebCore::HTMLSelectElement::parseAttribute):
51         * svg/SVGStyledElement.cpp:
52         (WebCore::SVGStyledElement::getPresentationAttribute):
53
54 2013-02-13  Andreas Kling  <akling@apple.com>
55
56         Stronger ElementData pointer typing.
57         <http://webkit.org/b/109752>
58
59         Reviewed by Antti Koivisto.
60
61         Use ShareableElementData/UniqueElementData pointers instead of generic ElementData pointers
62         where possible. Moved some methods from base class into leaf classes that don't make sense
63         for both classes.
64
65         * dom/DocumentSharedObjectPool.cpp:
66         (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
67         (ShareableElementDataCacheEntry):
68         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
69         * dom/DocumentSharedObjectPool.h:
70         (DocumentSharedObjectPool):
71         * dom/Element.cpp:
72         (WebCore::Element::parserSetAttributes):
73         (WebCore::Element::setAttributeNode):
74         (WebCore::Element::removeAttributeInternal):
75         (WebCore::Element::cloneAttributesFromElement):
76         (WebCore::Element::createUniqueElementData):
77         (WebCore::ShareableElementData::createWithAttributes):
78         (WebCore::UniqueElementData::create):
79         (WebCore::ElementData::makeUniqueCopy):
80         (WebCore::UniqueElementData::makeShareableCopy):
81         * dom/Element.h:
82         (ElementData):
83         (ShareableElementData):
84         (UniqueElementData):
85         (Element):
86         (WebCore::Element::ensureUniqueElementData):
87         * dom/StyledElement.cpp:
88         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
89
90 2013-02-13  Antti Koivisto  <antti@apple.com>
91
92         Reschedule shared CFRunLoopTimer instead of reconstructing it
93         https://bugs.webkit.org/show_bug.cgi?id=109765
94
95         Reviewed by Andreas Kling and Anders Carlsson.
96
97         Using CFRunLoopTimerSetNextFireDate is over 2x faster than deleting and reconstructing timers.
98
99         * platform/mac/SharedTimerMac.mm:
100         (WebCore):
101         (WebCore::PowerObserver::restartSharedTimer):
102         (WebCore::sharedTimer):
103         (WebCore::setSharedTimerFireInterval):
104         (WebCore::stopSharedTimer):
105
106 2013-02-13  Emil A Eklund  <eae@chromium.org>
107
108         getComputedStyle returns truncated value for margin-right
109         https://bugs.webkit.org/show_bug.cgi?id=109759
110
111         Reviewed by Tony Chang.
112         
113         Due to an unfortunate cast in CSSComputedStyleDeclaration::
114         getPropertyCSSValue getComputedStyle returns truncated styles
115         for margin-right in cases where it isn't set to a specific pixel
116         value.
117
118         Test: fast/sub-pixel/computedstylemargin.html
119
120         * css/CSSComputedStyleDeclaration.cpp:
121         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
122         Change type of temporary value variable to float to prevent loss of precision.
123
124 2013-02-13  Max Vujovic  <mvujovic@adobe.com>
125
126         [CSS Filters] Refactor filter outsets into a class
127         https://bugs.webkit.org/show_bug.cgi?id=109330
128
129         Reviewed by Dean Jackson.
130
131         In filters related code, we're often operating on 4 ints representing the top, right,
132         bottom, and left filter outsets. These outsets come from a filter like blur or drop-shadow.
133         This patch packages those ints and their related operations into a class called
134         IntRectExtent.
135
136         Here are some signs that we should make a class to hold those 4 ints:
137         1) In RenderLayer.cpp, we have a expandRectForFilterOutsets function, which looks like
138            feature envy.
139         2) RenderStyle and other classes have methods like getFilterOutsets which set the 4 ints by
140            reference. The calling code has to define 4 ints, which looks bloated.
141         3) To fix bug 109098, we will need to check if filter outsets changed, which sounds like a
142            nice job for an inequality operator. (https://bugs.webkit.org/show_bug.cgi?id=109098)
143
144         No new tests. No change in behavior. Just refactoring.
145
146         * GNUmakefile.list.am:
147         * Target.pri:
148         * WebCore.gypi:
149         * WebCore.xcodeproj/project.pbxproj:
150         * platform/graphics/IntRectExtent.h: Added.
151         (WebCore):
152         (IntRectExtent):
153         (WebCore::IntRectExtent::IntRectExtent):
154         (WebCore::IntRectExtent::top):
155         (WebCore::IntRectExtent::setTop):
156         (WebCore::IntRectExtent::right):
157         (WebCore::IntRectExtent::setRight):
158         (WebCore::IntRectExtent::bottom):
159         (WebCore::IntRectExtent::setBottom):
160         (WebCore::IntRectExtent::left):
161         (WebCore::IntRectExtent::setLeft):
162         (WebCore::IntRectExtent::expandRect):
163         (WebCore::IntRectExtent::isZero):
164         (WebCore::operator==):
165         (WebCore::operator!=):
166         (WebCore::operator+=):
167         * platform/graphics/filters/FilterOperations.cpp:
168         (WebCore::FilterOperations::outsets):
169         * platform/graphics/filters/FilterOperations.h:
170         (FilterOperations):
171         * platform/graphics/texmap/TextureMapperLayer.cpp:
172         (WebCore::TextureMapperLayer::intermediateSurfaceRect):
173         * rendering/FilterEffectRenderer.cpp:
174         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
175         (WebCore::FilterEffectRenderer::build):
176         (WebCore::FilterEffectRenderer::computeSourceImageRectForDirtyRect):
177         * rendering/FilterEffectRenderer.h:
178         (FilterEffectRenderer):
179         * rendering/RenderLayer.cpp:
180         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
181         (WebCore::transparencyClipBox):
182         (WebCore::RenderLayer::calculateLayerBounds):
183         * rendering/style/RenderStyle.h:
184
185 2013-02-13  Adam Barth  <abarth@webkit.org>
186
187         Factor HTMLTokenScanner out of HTMLPreloadScanner
188         https://bugs.webkit.org/show_bug.cgi?id=109754
189
190         Reviewed by Eric Seidel.
191
192         This patch is just a mechanical separation of the per-token "scanning"
193         logic from HTMLPreloadScanner into a separate class.
194         HTMLPreloadScanner's job is now to keep track of the input stream and
195         to pump the tokenizer.
196
197         This factorization class will let us use HTMLTokenScanner on the
198         background thread (once we finish making it thread-safe). In a follow
199         up patch, I'll move HTMLTokenScanner to its own file.
200
201         * html/parser/HTMLPreloadScanner.cpp:
202         (WebCore::HTMLTokenScanner::HTMLTokenScanner):
203         (WebCore::HTMLTokenScanner::~HTMLTokenScanner):
204         (WebCore::HTMLTokenScanner::processPossibleTemplateTag):
205         (WebCore::HTMLTokenScanner::processPossibleStyleTag):
206         (WebCore::HTMLTokenScanner::processPossibleBaseTag):
207         (WebCore::HTMLTokenScanner::scan):
208         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
209         (WebCore):
210         (WebCore::HTMLPreloadScanner::~HTMLPreloadScanner):
211         (WebCore::HTMLPreloadScanner::appendToEnd):
212         (WebCore::HTMLPreloadScanner::scan):
213         * html/parser/HTMLPreloadScanner.h:
214         (HTMLTokenScanner):
215         (WebCore::HTMLTokenScanner::setPredictedBaseElementURL):
216         (HTMLPreloadScanner):
217         (WebCore):
218
219 2013-02-13  Elliott Sprehn  <esprehn@chromium.org>
220
221         ASSERT(!renderer()->needsLayout()) when calling Element::focus() with generated content
222         https://bugs.webkit.org/show_bug.cgi?id=109616
223
224         Reviewed by Julien Chaffraix.
225
226         Test: fast/css-generated-content/quote-layout-focus-crash.html
227
228         In some cases RenderQuote may mark itself and containing blocks as needing layout
229         during a layout, but then one of it's containing blocks will mark itself as having
230         finished layout so the RenderQuote and potentially some of it's ancestor renderers
231         needLayout(), but the ancestors above those do not.
232
233         Until we have proper pre-layout tasks we should just walk the list of quotes
234         right before layout and mark all their ancestors as needing layout if the quote
235         needs layout.
236
237         * dom/Document.cpp:
238         (WebCore::Document::updateLayout): Call markQuoteContainingBlocksForLayoutIfNeeded.
239         (WebCore::Document::implicitClose): Call markQuoteContainingBlocksForLayoutIfNeeded.
240         * rendering/RenderQuote.h:
241         (WebCore::RenderQuote::next): Added.
242         * rendering/RenderView.cpp:
243         (WebCore::RenderView::markQuoteContainingBlocksForLayoutIfNeeded): Added.
244         * rendering/RenderView.h:
245         (RenderView):
246
247 2013-02-13  Jer Noble  <jer.noble@apple.com>
248
249         EME: MediaPlayer::keyNeede() should return a bool indicating whether an event listener was triggered.
250         https://bugs.webkit.org/show_bug.cgi?id=109701
251
252         Reviewed by Eric Carlson.
253
254         Clients of MediaPlayer may need to do cleanup if calling keyNeeded()
255         results in no event listener being triggered. Return a bool (like the
256         v1 equivalent keyNeeded method) to indicate this.
257
258         * html/HTMLMediaElement.cpp:
259         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
260         * html/HTMLMediaElement.h:
261         * platform/graphics/MediaPlayer.cpp:
262         (WebCore::MediaPlayer::keyNeeded):
263         * platform/graphics/MediaPlayer.h:
264         (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
265
266 2013-02-13  Abhishek Arya  <inferno@chromium.org>
267
268         ASSERTION FAILED: !object || object->isBox(), Bad cast in RenderBox::computeLogicalHeight
269         https://bugs.webkit.org/show_bug.cgi?id=107748
270
271         Reviewed by Levi Weintraub.
272
273         Make sure that body renderer is not an inline-block display
274         when determining that it stretches to viewport or when paginated
275         content needs base height.
276
277         Test: fast/block/body-inline-block-crash.html
278
279         * rendering/RenderBox.cpp:
280         (WebCore::RenderBox::computeLogicalHeight):
281         * rendering/RenderBox.h:
282         (WebCore::RenderBox::stretchesToViewport):
283
284 2013-02-13  Shawn Singh  <shawnsingh@chromium.org>
285
286         Fix debug assertion being triggered because we may access dirty normalFlowList.
287         https://bugs.webkit.org/show_bug.cgi?id=109740
288
289         A debug assertion in RenderLayer.h is being hit when trying to
290         access the normalFlowList when it is dirty.  This is caused by a
291         new recursion that I added in RenderLayerBacking::hasVisibleNonCompositingDescendant(),
292         but I overlooked the need to call updateLayerListsIfNeeded()
293         recursively as well.
294
295         Reviewed by Simon Fraser.
296
297         No test, because there's no reliable way to test this (same as bug 85512).
298
299         * rendering/RenderLayerBacking.cpp:
300         (WebCore::hasVisibleNonCompositingDescendant):
301         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
302
303 2013-02-13  Antti Koivisto  <antti@apple.com>
304
305         Don't restart shared timer if both the current and the new fire time are in the past
306         https://bugs.webkit.org/show_bug.cgi?id=109731
307
308         Reviewed by Andreas Kling.
309
310         In 40-50% of cases we reschedule the shared timer both the old and the new fire time have already passed. This can happen at least when rescheduling 
311         a zero duration timer and when stopping a timer that was ready to fire.
312
313         We can skip rescheduling in this case, the shared timer will fire immediately anyway.
314         
315         Scheduling timers calls into platform layer and can be slow. This about halves the time under setSharedTimerFireInterval in PLT3
316         for ~0.1% total CPU time reduction.
317
318         * platform/ThreadTimers.cpp:
319         (WebCore::ThreadTimers::ThreadTimers):
320         (WebCore::ThreadTimers::setSharedTimer):
321         (WebCore::ThreadTimers::updateSharedTimer):
322         (WebCore::ThreadTimers::sharedTimerFiredInternal):
323         * platform/ThreadTimers.h:
324         (ThreadTimers):
325
326 2013-02-13  Zan Dobersek  <zdobersek@igalia.com>
327
328         The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
329         https://bugs.webkit.org/show_bug.cgi?id=109325
330
331         Reviewed by Anders Carlsson.
332
333         Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
334         two methods as they're provided by the C++ standard library being used.
335
336         No new tests as there's no change in functionality.
337
338         * Modules/mediasource/MediaSource.cpp:
339         (WebCore::MediaSource::setDuration):
340         * Modules/webaudio/AudioBufferSourceNode.cpp:
341         (WebCore::AudioBufferSourceNode::totalPitchRate):
342         * Modules/webaudio/AudioParam.cpp:
343         (WebCore::AudioParam::setValue):
344         * Modules/webaudio/AudioParamTimeline.cpp:
345         (WebCore::isValidNumber):
346         * Modules/webaudio/PannerNode.cpp:
347         (WebCore::fixNANs):
348         * bindings/js/IDBBindingUtilities.cpp:
349         (WebCore::createIDBKeyFromValue):
350         * bindings/js/JSDataViewCustom.cpp:
351         (WebCore::getDataViewMember):
352         * bindings/js/JSGeolocationCustom.cpp:
353         (WebCore::setTimeout):
354         (WebCore::setMaximumAge):
355         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
356         (WebCore::JSHTMLOptionsCollection::setLength):
357         * bindings/js/JSWebKitPointCustom.cpp:
358         (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
359         * bindings/scripts/CodeGeneratorJS.pm:
360         (GenerateImplementation):
361         (GenerateParametersCheck):
362         * bindings/scripts/CodeGeneratorV8.pm:
363         (GenerateParametersCheck):
364         * bindings/scripts/test/JS/JSFloat64Array.cpp:
365         (WebCore::JSFloat64Array::getByIndex):
366         * bindings/scripts/test/JS/JSTestObj.cpp:
367         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
368         * bindings/scripts/test/V8/V8TestObj.cpp:
369         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
370         * bindings/v8/IDBBindingUtilities.cpp:
371         (WebCore::createIDBKeyFromValue):
372         * bindings/v8/V8Binding.cpp:
373         (WebCore::toInt32):
374         (WebCore::toUInt32):
375         * bindings/v8/custom/V8GeolocationCustom.cpp:
376         (WebCore::createPositionOptions):
377         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
378         (WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
379         * bindings/v8/custom/V8WebKitPointCustom.cpp:
380         (WebCore::V8WebKitPoint::constructorCallbackCustom):
381         * bridge/qt/qt_runtime.cpp:
382         (JSC::Bindings::convertValueToQVariant):
383         * css/WebKitCSSMatrix.cpp:
384         (WebCore::WebKitCSSMatrix::translate):
385         (WebCore::WebKitCSSMatrix::scale):
386         (WebCore::WebKitCSSMatrix::rotate):
387         (WebCore::WebKitCSSMatrix::rotateAxisAngle):
388         (WebCore::WebKitCSSMatrix::skewX):
389         (WebCore::WebKitCSSMatrix::skewY):
390         * html/HTMLMediaElement.cpp:
391         (WebCore::HTMLMediaElement::percentLoaded):
392         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
393         (WebCore::HTMLMediaElement::endedPlayback):
394         * html/MediaController.cpp:
395         (MediaController::duration):
396         * html/canvas/WebGLRenderingContext.cpp:
397         (WebCore):
398         (WebCore::WebGLRenderingContext::clearColor):
399         * html/track/TextTrack.cpp:
400         (WebCore::TextTrack::addCue):
401         * html/track/TextTrackCue.cpp:
402         (WebCore::TextTrackCue::setStartTime):
403         (WebCore::TextTrackCue::setEndTime):
404         * page/DOMWindow.cpp:
405         (WebCore::DOMWindow::adjustWindowRect):
406         * page/WindowFeatures.cpp:
407         (WebCore::WindowFeatures::floatFeature): Also include an opportunistic style fix.
408         * platform/CalculationValue.cpp:
409         (WebCore::CalculationValue::evaluate):
410         * platform/Decimal.cpp:
411         (WebCore::Decimal::fromDouble):
412         * platform/Length.cpp:
413         (WebCore::Length::nonNanCalculatedValue):
414         * platform/audio/AudioResampler.cpp:
415         (WebCore::AudioResampler::setRate):
416         * platform/audio/DynamicsCompressorKernel.cpp:
417         (WebCore::DynamicsCompressorKernel::process):
418         * platform/audio/Reverb.cpp:
419         (WebCore::calculateNormalizationScale):
420         * platform/graphics/Font.cpp:
421         (WebCore::Font::width):
422         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
423         (WebCore::MediaPlayerPrivateAVFoundation::isLiveStream):
424         * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
425         (LoopBlinnMathUtils):
426         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
427         (WebCore::MediaPlayerPrivateGStreamer::buffered):
428         (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
429         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
430         (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable):
431         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
432         (WebCore::OpenTypeVerticalData::getVerticalTranslationsForGlyphs):
433         * platform/graphics/transforms/TransformationMatrix.cpp:
434         (WebCore::clampEdgeValue):
435         (WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad):
436         * platform/network/ResourceResponseBase.cpp:
437         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
438         * rendering/RenderMediaControlsChromium.cpp:
439         (WebCore::paintMediaSlider):
440         (WebCore::paintMediaVolumeSlider):
441         * rendering/RenderThemeMac.mm:
442         (WebCore::RenderThemeMac::paintMediaSliderTrack):
443         * svg/SVGAnimationElement.cpp:
444         (WebCore::SVGAnimationElement::beginElementAt):
445         (WebCore::SVGAnimationElement::endElementAt):
446         * svg/SVGSVGElement.cpp:
447         (WebCore::SVGSVGElement::setCurrentTime):
448         * svg/animation/SMILTime.h:
449         (WebCore::SMILTime::SMILTime):
450         * svg/animation/SVGSMILElement.cpp:
451         (WebCore::SVGSMILElement::addBeginTime):
452         (WebCore::SVGSMILElement::addEndTime):
453         * xml/XPathFunctions.cpp:
454         (WebCore::XPath::FunSubstring::evaluate):
455         (WebCore::XPath::FunRound::round):
456         * xml/XPathValue.cpp:
457         (WebCore::XPath::Value::toBoolean): Also include an opportunistic style fix.
458         (WebCore::XPath::Value::toString):
459
460 2013-02-13  Eric Carlson  <eric.carlson@apple.com>
461
462         [Mac] Caption menu should have only one item selected
463         https://bugs.webkit.org/show_bug.cgi?id=109730
464
465         Reviewed by Dean Jackson.
466
467         No new tests, media/track/track-user-preferences.html was modified to test the changes.
468
469         * CMakeLists.txt: Add CaptionUserPreferences.cpp.
470         * GNUmakefile.list.am: Ditto.
471         * Target.pri: Ditto.
472         * WebCore.gypi: Ditto.
473         * WebCore.vcproj/WebCore.vcproj: Ditto.
474         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
475         * WebCore.xcodeproj/project.pbxproj: Ditto.
476
477         * html/HTMLMediaElement.cpp:
478         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_processingPreferenceChange.
479         (WebCore::HTMLMediaElement::configureTextTrackGroup): Only end up with one selected track when
480             called because of a preferences change.
481         (WebCore::HTMLMediaElement::captionPreferencesChanged): Call setClosedCaptionsVisible instead
482             of calling markCaptionAndSubtitleTracksAsUnconfigured directly.
483         (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Process all tracks, 
484             not just track elements.
485         * html/HTMLMediaElement.h:
486
487         * page/CaptionUserPreferences.cpp: Added so the functionality can be tested in DRT.
488         (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks):
489         (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks):
490         (WebCore::CaptionUserPreferences::setUserPrefersCaptions):
491         (WebCore::CaptionUserPreferences::captionPreferencesChanged):
492         (WebCore::CaptionUserPreferences::preferredLanguages):
493         (WebCore::CaptionUserPreferences::setPreferredLanguage):
494         (WebCore::CaptionUserPreferences::displayNameForTrack):
495         * page/CaptionUserPreferences.h:
496
497         * page/CaptionUserPreferencesMac.h:
498         * page/CaptionUserPreferencesMac.mm:
499         (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Moved some logic
500             to base class.
501         (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Ditto.
502
503 2013-02-13  Hans Muller  <hmuller@adobe.com>
504
505         [CSS Exclusions] ExclusionPolygon reflex vertices should constrain the first fit location.
506         https://bugs.webkit.org/show_bug.cgi?id=107568
507
508         Reviewed by Dirk Schulze.
509
510         The ExclusionPolygon::firstIncludedIntervalLogicalTop() method now includes offset edges
511         for each of the polygon's reflex vertices. The motivation for this change is explained
512         here: http://hansmuller-webkit.blogspot.com/2013/01/getting-to-point-reflex-vertices.html.
513
514         Test: fast/exclusions/shape-inside/shape-inside-first-fit-reflex.html
515
516         * rendering/ExclusionPolygon.cpp:
517         (WebCore::isReflexVertex): Given three vertices that represent a pair of connected polygon edges, return true if the second vertex is a reflex vertex.
518         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): This method now includes offset edges for reflex vertices.
519         * rendering/ExclusionPolygon.h:
520         (WebCore::OffsetPolygonEdge::OffsetPolygonEdge): Added a constructor for creating an OffsetPolygonEdge given a reflex vertex.
521         (WebCore::OffsetPolygonEdge::edgeIndex): Changed this property from unsigned to int. Now using -1 to indicate that the offset edge doesn't correspond to a single polygon edge.
522
523 2013-02-13  Adam Barth  <abarth@webkit.org>
524
525         CSSPreloadScanner should not depend on HTMLToken
526         https://bugs.webkit.org/show_bug.cgi?id=109742
527
528         Reviewed by Eric Seidel.
529
530         There's no need for the CSSPreloadScanner to depend on HTMLToken. On
531         the background thread, we'll likely want to use a CompactHTMLToken for
532         preload scanning, so this dependency is problematic. This patch also
533         teaches the CSSPreloadScanner how to scan LChars.
534
535         * html/parser/CSSPreloadScanner.cpp:
536         (WebCore::CSSPreloadScanner::~CSSPreloadScanner):
537         (WebCore):
538         (WebCore::CSSPreloadScanner::scan):
539         * html/parser/CSSPreloadScanner.h:
540         (CSSPreloadScanner):
541         * html/parser/HTMLPreloadScanner.cpp:
542         (WebCore::HTMLPreloadScanner::processToken):
543
544 2013-02-13  Julien Chaffraix  <jchaffraix@webkit.org>
545
546         [CSS Grid Layout] Adding or removing grid items doesn't properly recompute the track sizes
547         https://bugs.webkit.org/show_bug.cgi?id=109100
548
549         Reviewed by Ojan Vafai.
550
551         Test: fast/css-grid-layout/grid-item-removal-track-breadth-update.html
552
553         The test uncovered several bugs in our implementation that is fixed as part
554         of this change. They will be detailed below.
555
556         * rendering/RenderGrid.cpp:
557         (WebCore::RenderGrid::logicalContentHeightForChild):
558         Added this function to share the code between minContentForChild and maxContentForChild.
559         Also forced a relayout in this case to avoid getting a wrong answer (e.g. the logical height
560         constrained by the previous layout's grid breadth).
561
562         (WebCore::RenderGrid::minContentForChild):
563         (WebCore::RenderGrid::maxContentForChild):
564         Updated to use logicalContentHeightForChild.
565
566         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
567         Updated to match the specification and set max breadth to current breadth per the specification.
568         This made us over-grow some cases in the test.
569
570         (WebCore::RenderGrid::distributeSpaceToTracks):
571         Updated to match the specification and use an extra variable to do the intermediate spreading. Also removed
572         a now unneeded max. This fixes the case of multiple grid items in the same grid area that was completely broken.
573
574         (WebCore::RenderGrid::layoutGridItems):
575         Added a FIXME about always relaying out content sized tracks' children.
576
577         * rendering/RenderGrid.h:
578         Added logicalContentHeightForChild.
579
580 2013-02-13  Adam Barth  <abarth@webkit.org>
581
582         Clean up some style nits in HTMLPreloadScanner
583         https://bugs.webkit.org/show_bug.cgi?id=109738
584
585         Reviewed by Tony Gentilcore.
586
587         This patch just fixes a few style nits I noticed when reading through
588         the code.
589
590         * html/parser/HTMLPreloadScanner.cpp:
591         (WebCore::StartTagScanner::StartTagScanner):
592         (WebCore::HTMLPreloadScanner::processPossibleStyleTag):
593         (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
594         * html/parser/HTMLResourcePreloader.cpp:
595         (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
596         * html/parser/HTMLResourcePreloader.h:
597         (PreloadRequest):
598         (WebCore::PreloadRequest::PreloadRequest):
599         (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
600
601 2013-02-13  Sheriff Bot  <webkit.review.bot@gmail.com>
602
603         Unreviewed, rolling out r142747.
604         http://trac.webkit.org/changeset/142747
605         https://bugs.webkit.org/show_bug.cgi?id=109746
606
607         broke component build (Requested by alecf_gardening on
608         #webkit).
609
610         * inspector/HeapGraphSerializer.cpp:
611         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
612         (WebCore::HeapGraphSerializer::pushUpdate):
613         (WebCore::HeapGraphSerializer::reportNode):
614         (WebCore::HeapGraphSerializer::toNodeId):
615         (WebCore::HeapGraphSerializer::addRootNode):
616         * inspector/HeapGraphSerializer.h:
617         (WebCore):
618         (HeapGraphSerializer):
619         * inspector/InspectorMemoryAgent.cpp:
620         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
621
622 2013-02-13  Levi Weintraub  <leviw@chromium.org>
623
624         Bidi-Isolated inlines can cause subsequent content to not be rendered
625         https://bugs.webkit.org/show_bug.cgi?id=108137
626
627         Reviewed by Eric Seidel.
628
629         First step in fixing how inline isolates behave with collapsed spaces.
630         webkit.org/b/109624 tracks the overarching issue.
631
632         Test: fast/text/content-following-inline-isolate-with-collapsed-whitespace.html
633
634         * rendering/InlineIterator.h:
635         (WebCore::IsolateTracker::addFakeRunIfNecessary): If we enter an isolate while
636         ignoring spaces, ensure we leave it considering them again. This can result in
637         including spaces that should be ignored following the isolate on the line, but
638         failing to do so results in those contents not being rendered at all.
639
640 2013-02-13  Andreas Kling  <akling@apple.com>
641
642         Better names for ElementAttributeData & subclasses.
643         <http://webkit.org/b/109529>
644
645         Reviewed by Antti Koivisto.
646
647         - ElementAttributeData => ElementData
648
649             Because ElementAttributeData won't be a good name once we move some non-attribute related
650             things to this structure.
651
652         - ImmutableElementAttributeData => ShareableElementData
653
654             These objects can be shared with other Elements that have the same attribute name/value pairs.
655
656         - MutableElementAttributeData => UniqueElementData
657
658             These objects contain data that is unique to a specific Element, and cannot be shared with
659             other Elements. This is what's important about it, not that its underlying storage is mutable.
660
661         - attributeData() -> elementData()
662         - updatedAttributeData() -> elementDataWithSynchronizedAttributes()
663         - ensureUpdatedAttributeData() -> ensureElementDataWithSynchronizedAttributes()
664         - mutableAttributeData() -> ensureUniqueElementData()
665
666             Ride-along renames. Much less vague than previous names IMO.
667
668         * css/StyleResolver.cpp:
669         (WebCore::StyleResolver::canShareStyleWithControl):
670         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
671         * dom/Attr.cpp:
672         (WebCore::Attr::elementAttribute):
673         * dom/DocumentSharedObjectPool.cpp:
674         (WebCore::ShareableElementDataCacheKey::ShareableElementDataCacheKey):
675         (WebCore::ShareableElementDataCacheKey::operator!=):
676         (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
677         (ShareableElementDataCacheEntry):
678         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
679         * dom/DocumentSharedObjectPool.h:
680         (DocumentSharedObjectPool):
681         * dom/Element.cpp:
682         (WebCore::Element::detachAttribute):
683         (WebCore::Element::removeAttribute):
684         (WebCore::Element::attributes):
685         (WebCore::Element::getAttribute):
686         (WebCore::Element::setAttribute):
687         (WebCore::Element::setSynchronizedLazyAttribute):
688         (WebCore::Element::setAttributeInternal):
689         (WebCore::Element::attributeChanged):
690         (WebCore::Element::classAttributeChanged):
691         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
692         (WebCore::Element::parserSetAttributes):
693         (WebCore::Element::hasAttributes):
694         (WebCore::Element::hasEquivalentAttributes):
695         (WebCore::Element::setAttributeNode):
696         (WebCore::Element::removeAttributeNode):
697         (WebCore::Element::removeAttributeInternal):
698         (WebCore::Element::addAttributeInternal):
699         (WebCore::Element::getAttributeNode):
700         (WebCore::Element::getAttributeNodeNS):
701         (WebCore::Element::hasAttribute):
702         (WebCore::Element::hasAttributeNS):
703         (WebCore::Element::computeInheritedLanguage):
704         (WebCore::Element::getURLAttribute):
705         (WebCore::Element::getNonEmptyURLAttribute):
706         (WebCore::Element::cloneAttributesFromElement):
707         (WebCore::Element::createUniqueElementData):
708         (WebCore::Element::reportMemoryUsage):
709         (WebCore::ElementData::deref):
710         (WebCore::ElementData::ElementData):
711         (WebCore::sizeForShareableElementDataWithAttributeCount):
712         (WebCore::ElementData::createShareableWithAttributes):
713         (WebCore::ElementData::createUnique):
714         (WebCore::ShareableElementData::ShareableElementData):
715         (WebCore::ShareableElementData::~ShareableElementData):
716         (WebCore::UniqueElementData::UniqueElementData):
717         (WebCore::ElementData::makeMutableCopy):
718         (WebCore::ElementData::makeImmutableCopy):
719         (WebCore::ElementData::setPresentationAttributeStyle):
720         (WebCore::ElementData::addAttribute):
721         (WebCore::ElementData::removeAttribute):
722         (WebCore::ElementData::isEquivalent):
723         (WebCore::ElementData::reportMemoryUsage):
724         (WebCore::ElementData::getAttributeItemIndexSlowCase):
725         * dom/Element.h:
726         (ElementData):
727         (WebCore::ElementData::isUnique):
728         (ShareableElementData):
729         (UniqueElementData):
730         (WebCore::Element::getAttributeItemIndex):
731         (WebCore::Element::elementData):
732         (Element):
733         (WebCore::Element::elementDataWithSynchronizedAttributes):
734         (WebCore::Element::ensureElementDataWithSynchronizedAttributes):
735         (WebCore::Element::fastHasAttribute):
736         (WebCore::Element::fastGetAttribute):
737         (WebCore::Element::hasAttributesWithoutUpdate):
738         (WebCore::Element::idForStyleResolution):
739         (WebCore::Element::classNames):
740         (WebCore::Element::attributeCount):
741         (WebCore::Element::attributeItem):
742         (WebCore::Element::getAttributeItem):
743         (WebCore::Element::updateInvalidAttributes):
744         (WebCore::Element::hasID):
745         (WebCore::Element::hasClass):
746         (WebCore::Element::ensureUniqueElementData):
747         (WebCore::ElementData::mutableAttributeVector):
748         (WebCore::ElementData::immutableAttributeArray):
749         (WebCore::ElementData::length):
750         (WebCore::ElementData::presentationAttributeStyle):
751         (WebCore::ElementData::getAttributeItem):
752         (WebCore::ElementData::getAttributeItemIndex):
753         (WebCore::ElementData::attributeItem):
754         * dom/Node.cpp:
755         (WebCore::Node::dumpStatistics):
756         (WebCore::Node::compareDocumentPosition):
757         * dom/StyledElement.cpp:
758         (WebCore::StyledElement::updateStyleAttribute):
759         (WebCore::StyledElement::ensureMutableInlineStyle):
760         (WebCore::StyledElement::attributeChanged):
761         (WebCore::StyledElement::inlineStyleCSSOMWrapper):
762         (WebCore::StyledElement::setInlineStyleFromString):
763         (WebCore::StyledElement::styleAttributeChanged):
764         (WebCore::StyledElement::inlineStyleChanged):
765         (WebCore::StyledElement::addSubresourceAttributeURLs):
766         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
767         * dom/StyledElement.h:
768         (WebCore::StyledElement::inlineStyle):
769         (WebCore::StyledElement::invalidateStyleAttribute):
770         (WebCore::StyledElement::presentationAttributeStyle):
771         * html/ClassList.cpp:
772         (WebCore::ClassList::classNames):
773         * html/HTMLInputElement.cpp:
774         (WebCore::HTMLInputElement::updateType):
775         * html/parser/HTMLConstructionSite.cpp:
776         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
777         * svg/SVGElement.cpp:
778         (WebCore::SVGElement::updateAnimatedSVGAttribute):
779         * svg/SVGElement.h:
780         (WebCore::SVGElement::invalidateSVGAttributes):
781         * xml/parser/XMLDocumentParserQt.cpp:
782         (WebCore::XMLDocumentParser::XMLDocumentParser):
783
784 2013-02-13  Christian Biesinger  <cbiesinger@chromium.org>
785
786         Crash when encountering <object style="resize:both;">
787         https://bugs.webkit.org/show_bug.cgi?id=109728
788
789         See also https://code.google.com/p/chromium/issues/detail?id=175535
790         This bug can be reproduced on
791         http://dramalink.net/tudou.y/?xink=162601060
792
793         Reviewed by Eric Seidel.
794
795         Test: fast/css/resize-object-crash.html
796
797         * rendering/RenderWidget.cpp:
798         (WebCore::RenderWidget::paint):
799         Only call paintResizer() if we have a layer and canResize() is true
800
801 2013-02-13  Arko Saha  <arko@motorola.com>
802
803         [Microdata] HTMLPropertiesCollection code cleanup
804         https://bugs.webkit.org/show_bug.cgi?id=109721
805
806         Reviewed by Ryosuke Niwa.
807
808         Removed forward declaration of DOMStringList class.
809         Removed unused findRefElements() method declaration.
810         Also Removed unused parameter Element* from updatePropertyCache() method.
811
812         No new test since no change in behavior.
813
814         * html/HTMLPropertiesCollection.cpp:
815         (WebCore::HTMLPropertiesCollection::updateNameCache):
816         * html/HTMLPropertiesCollection.h:
817         (WebCore):
818         (HTMLPropertiesCollection):
819         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
820
821 2013-02-13  Kondapally Kalyan  <kalyan.kondapally@intel.com>
822
823         [WebGL][EFL][GTK][Qt]Add support for OES_vertex_array_object.
824         https://bugs.webkit.org/show_bug.cgi?id=109382
825
826         Reviewed by Kenneth Russell.
827
828         Covered by fast/canvas/webgl/oes-vertex-array-object.html
829
830         This patch adds support for using Vertex Array Object with OpenGl.
831         The patch adds support for loading necessary opengl functions
832         and support for checking GL_ARB_vertex_array_object. The support
833         for OES_vertex_array_object is advertised if GL_ARB_vertex_array_object is
834         supported.
835
836         * platform/graphics/OpenGLShims.cpp:
837         (WebCore::initializeOpenGLShims):
838         * platform/graphics/OpenGLShims.h:
839         (_OpenGLFunctionTable):
840         Added support for loading the necessary functions.
841
842         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
843         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
844         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
845         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
846         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
847         (WebCore::Extensions3DOpenGL::supportsExtension):
848
849         (WebCore):
850         (WebCore::Extensions3DOpenGL::isVertexArrayObjectSupported):
851         * platform/graphics/opengl/Extensions3DOpenGL.h:
852         (Extensions3DOpenGL):
853
854 2013-02-13  Eberhard Graether  <egraether@google.com>
855
856         chromium: remove CompositorHUDFontAtlas
857         https://bugs.webkit.org/show_bug.cgi?id=109328
858
859         Reviewed by James Robinson.
860
861         After switching the HudLayer to use skia's font rendering the
862         CompositorHUDFontAtlas has become obsolete. This change removes
863         this class and the related WebLayerTreeView API.
864
865         No new tests.
866
867         * WebCore.gypi:
868         * platform/graphics/chromium/CompositorHUDFontAtlas.cpp: Removed.
869         * platform/graphics/chromium/CompositorHUDFontAtlas.h: Removed.
870
871 2013-02-13  Dean Jackson  <dino@apple.com>
872
873         Small update to speech bubble for captions menu [Mac]
874         https://bugs.webkit.org/show_bug.cgi?id=109641
875
876         Reviewed by Eric Carlson
877
878         Small adjustment to the embedded SVG that draws a speech bubble
879         for the captions button. Remove a polygon that was so small
880         it looked like a rendering error.
881
882         * css/mediaControlsQuickTime.css:
883         (video::-webkit-media-controls-toggle-closed-captions-button):
884
885 2013-02-13  Dean Jackson  <dino@apple.com>
886
887         Clicking outside captions menu should dismiss it
888         https://bugs.webkit.org/show_bug.cgi?id=109648
889
890         Reviewed by Eric Carlson.
891
892         Add a virtual override to the platform-specific
893         defaultEventHandler to intercept any click in the controls,
894         and hide the captions menu if it is showing.
895
896         Test: media/video-controls-captions-trackmenu-hide-on-click.html
897
898         * html/shadow/MediaControlsApple.cpp:
899         (WebCore::MediaControlsApple::defaultEventHandler): Override from MediaControls. Hide
900             captions menu if a click event comes in.
901         * html/shadow/MediaControlsApple.h:
902
903 2013-02-13  Tommy Widenflycht  <tommyw@google.com>
904
905         MediaStream API: Use the source id when creating new tracks
906         https://bugs.webkit.org/show_bug.cgi?id=109688
907
908         Reviewed by Adam Barth.
909
910         This patch reuses the ids from the source when creating tracks instead of creating a new one.
911         This was requested by the chromium port to greatly simplify their implementation.
912         In the longer run the API should be rewritten to only use tracks instead of sources.
913
914         Covered by existing tests.
915
916         * platform/chromium/support/WebMediaStream.cpp:
917         (WebKit::WebMediaStream::audioTracks):
918         (WebKit::WebMediaStream::videoTracks):
919         (WebKit::WebMediaStream::initialize):
920         (WebKit):
921         * platform/chromium/support/WebMediaStreamTrack.cpp:
922         (WebKit::WebMediaStreamTrack::initialize):
923         (WebKit):
924         * platform/mediastream/MediaStreamComponent.h:
925         (WebCore::MediaStreamComponent::create):
926         (MediaStreamComponent):
927         (WebCore::MediaStreamComponent::MediaStreamComponent):
928         (WebCore):
929         * platform/mediastream/MediaStreamDescriptor.h:
930         (WebCore::MediaStreamDescriptor::create):
931         (MediaStreamDescriptor):
932         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
933
934 2013-02-13  Eric Seidel  <eric@webkit.org>
935
936         Use fancy new Vector-based String constructors in the WebVTT parser
937         https://bugs.webkit.org/show_bug.cgi?id=109619
938
939         Reviewed by Benjamin Poulain.
940
941         No change in behavior. Added some FIXMEs for future perf optimization.
942
943         * html/track/WebVTTParser.cpp:
944         (WebCore::WebVTTParser::constructTreeFromToken):
945
946 2013-02-13  Morten Stenshorne  <mstensho@opera.com>
947
948         WebKit ignores column-rules wider than column-gap
949         https://bugs.webkit.org/show_bug.cgi?id=15553
950
951         Paint column rules even if they are wider than the gap.
952         Rules wider than the gap should just overlap with column contents.
953
954         Reviewed by Eric Seidel.
955
956         Test: fast/multicol/rule-thicker-than-gap.html
957
958         * rendering/RenderBlock.cpp:
959         (WebCore::RenderBlock::paintColumnRules):
960
961 2013-02-13  Philip Rogers  <pdr@google.com>
962
963         Replace SVG bitmap cache with directly-rendered SVG
964         https://bugs.webkit.org/show_bug.cgi?id=106159
965
966         Reviewed by Tim Horton.
967
968         This patch removes the caching of SVG bitmaps so SVG images are rendered directly. This
969         enables WebKit to pass the IE Chalkboard demo in 10s on a Z620:
970         http://ie.microsoft.com/testdrive/Performance/Chalkboard/
971
972         On a simple scaled SVG benchmark similar to the IE10 Chalkboard demo
973         (http://philbit.com/SvgImagePerformance/viewport.html):
974             without patch: ~20FPS
975             with patch: ~55FPS
976
977         The bitmap SVG image cache had several shortcomings:
978             - The bitmap cache prevented viewport rendering. (WK104693)
979             - Bitmap memory usage was high. (WK106484)
980             - Caching animating images was expensive.
981
982         This change removes almost all of the SVGImageCache implementation, replacing it with
983         directly-rendered SVG. Instead of caching bitmaps, an SVGImageForContainer is cached which
984         is a thin wrapper around an SVG image with the associated container size and scale.
985         When rendering patterns (e.g., tiled backgrounds), a temporary bitmap is used for
986         performance. This change also removes the redraw timer of the old cache, instead relying
987         on the SVG image to notify clients if the image changes (e.g., during animations).
988
989         This patch fixes two existing bugs (WK99481 and WK104189) that were due to caching bitmaps
990         at a fixed size. A test has been added for each of these bugs.
991
992         Tests: svg/as-image/svg-image-scaled.html
993                svg/as-image/svg-image-viewbox.html
994
995         * CMakeLists.txt:
996         * GNUmakefile.list.am:
997         * Target.pri:
998         * WebCore.gypi:
999         * WebCore.vcproj/WebCore.vcproj:
1000         * WebCore.xcodeproj/project.pbxproj:
1001         * loader/cache/CachedImage.cpp:
1002         (WebCore::CachedImage::lookupOrCreateImageForRenderer):
1003         (WebCore::CachedImage::setContainerSizeForRenderer):
1004         (WebCore::CachedImage::clear):
1005         (WebCore::CachedImage::changedInRect):
1006
1007             SVG images are no longer special-cased here. When the SVG image changes, users are
1008             notified through this function, and users can then request their content to be redrawn.
1009
1010         * svg/graphics/SVGImage.cpp:
1011         (WebCore::SVGImage::setContainerSize):
1012         (WebCore::SVGImage::drawForContainer):
1013
1014             drawForContainer lays out the SVG content for a specific container size and renders it.
1015             The logic is fairly straightforward but a note about the scales and zooms here:
1016                 the destination rect parameter is zoomed but not scaled
1017                 the source rect parameter is zoomed but not scaled
1018                 the context is scaled but not zoomed
1019             SVGImage::draw(...) only accepts a source and destination rect but does not consider
1020             scale or zoom. Therefore, drawForContainer removes the zoom component from the source
1021             so SVGImage::draw(...) will draw from the pre-zoom source to the post-zoom destination.
1022
1023         (WebCore::SVGImage::drawPatternForContainer):
1024
1025             For performance, drawPatternForContainer renders the SVG content onto a bitmap, then
1026             has the bitmap image draw the pattern. This is necessary because drawPattern is used
1027             for tiling.
1028
1029         (WebCore):
1030         (WebCore::SVGImage::startAnimation):
1031         (WebCore::SVGImage::stopAnimation):
1032         (WebCore::SVGImage::resetAnimation):
1033         (WebCore::SVGImage::reportMemoryUsage):
1034         * svg/graphics/SVGImage.h:
1035         (WebCore):
1036         (SVGImage):
1037         * svg/graphics/SVGImageCache.cpp:
1038
1039             Instead of storing a SizeAndScales values for each renderer, a SVGImageForContainer
1040             is stored which is just a thin wrapper around an SVG image that contains container
1041             sizing information. By combining the image and size information, the two maps of
1042             SVGImageCache have been merged into one.
1043
1044             To make this patch easier to review, SVGImageCache still exists and works similar to
1045             how it did before the patch. Now, SVGImageCache simply stores the SVGImageForContainers.
1046             In a followup patch it will be removed.
1047
1048             Note: the redraw timer of SVGImageCache has been removed because animation
1049             invalidation is now properly propagated back to the image clients.
1050
1051         (WebCore):
1052         (WebCore::SVGImageCache::SVGImageCache):
1053         (WebCore::SVGImageCache::~SVGImageCache):
1054         (WebCore::SVGImageCache::removeClientFromCache):
1055         (WebCore::SVGImageCache::setContainerSizeForRenderer):
1056         (WebCore::SVGImageCache::imageSizeForRenderer):
1057
1058             Previously, this function returned the scaled image size which was incorrect. The image
1059             size is used by clients such as GraphicsContext2D to determine the source size
1060             for drawing the image. draw() accepts zoomed but not scaled values, so this has been
1061             changed.
1062
1063         (WebCore::SVGImageCache::imageForRenderer):
1064
1065             A FIXME has been added here to not set the scale on every lookup. This can be improved
1066             by setting the page scale factor in setContainerSizeForRenderer() in a future patch.
1067
1068         * svg/graphics/SVGImageCache.h:
1069         (WebCore):
1070         (SVGImageCache):
1071         * svg/graphics/SVGImageForContainer.cpp: Added.
1072         (WebCore):
1073
1074             SVGImageForContainer is a thin wrapper around an SVG image. The lifetime of the
1075             SVGImage will be longer than the image cache.
1076
1077         (WebCore::SVGImageForContainer::size):
1078
1079             This is the only logic in SVGImageForContainer. The size returned needs to be zoomed
1080             but not scaled because it is used (e.g., by RenderImage) to pass back into draw() which
1081             takes zoomed but not scaled values.
1082
1083         (WebCore::SVGImageForContainer::draw):
1084         (WebCore::SVGImageForContainer::drawPattern):
1085         * svg/graphics/SVGImageForContainer.h: Added.
1086         (WebCore):
1087         (SVGImageForContainer):
1088
1089             In a future patch SVGImageForContainer can be made immutable but without a refactoring
1090             for not setting the page scale factor in SVGImageCache::lookupOrCreateImageForRenderer,
1091             setters are needed.
1092
1093         (WebCore::SVGImageForContainer::create):
1094         (WebCore::SVGImageForContainer::containerSize):
1095         (WebCore::SVGImageForContainer::pageScale):
1096         (WebCore::SVGImageForContainer::zoom):
1097         (WebCore::SVGImageForContainer::setSize):
1098         (WebCore::SVGImageForContainer::setZoom):
1099         (WebCore::SVGImageForContainer::setPageScale):
1100         (WebCore::SVGImageForContainer::SVGImageForContainer):
1101         (WebCore::SVGImageForContainer::destroyDecodedData):
1102         (WebCore::SVGImageForContainer::decodedSize):
1103
1104 2013-02-12  Antti Koivisto  <antti@apple.com>
1105
1106         Avoid updating timer heap when nothing changes
1107         https://bugs.webkit.org/show_bug.cgi?id=109630
1108
1109         Reviewed by Andreas Kling.
1110
1111         When the fire time of a Timer is changed we remove it from the timer heap and reinsert it. This is pretty slow. 
1112         Turns out that in ~80% of cases we are already in the heap and the insertion position is the same as the 
1113         original position. We can check if anything is actually going to change before doing this work.
1114         
1115         This makes starting a timer ~30% faster in average, ~0.1% progression in PLT3.
1116         
1117         * platform/Timer.cpp:
1118         (TimerHeapLessThanFunction):
1119         (WebCore::TimerHeapLessThanFunction::operator()):
1120         (WebCore::parentHeapPropertyHolds):
1121         (WebCore):
1122         (WebCore::childHeapPropertyHolds):
1123         (WebCore::TimerBase::hasValidHeapPosition):
1124         
1125             The code here assumes that STL heap is a normal binary heap. If there is a different implementation
1126             somewhere the assertions will catch it.
1127
1128         (WebCore::TimerBase::updateHeapIfNeeded):
1129         
1130             Skip updating the heap if it is already valid.
1131
1132         (WebCore::TimerBase::setNextFireTime):
1133         * platform/Timer.h:
1134         (TimerBase):
1135
1136 2013-02-13  Martin Robinson  <mrobinson@igalia.com>
1137
1138         [GTK] Remove remaining dead code from the GLib unicode backend
1139         https://bugs.webkit.org/show_bug.cgi?id=109707
1140
1141         Reviewed by Philippe Normand.
1142
1143         * platform/KURL.cpp:
1144         (WebCore::appendEncodedHostname):
1145         * platform/text/TextEncoding.cpp:
1146         (WebCore::TextEncoding::encode):
1147         * platform/text/TextEncodingRegistry.cpp:
1148         (WebCore::buildBaseTextCodecMaps):
1149         (WebCore::extendTextCodecMaps):
1150
1151 2013-02-13  Xianzhu Wang  <wangxianzhu@chromium.org>
1152
1153         Heap-use-after-free in WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects
1154         https://bugs.webkit.org/show_bug.cgi?id=108695
1155
1156         See comments of RenderLayerModelObject::willBeDestroyed() below for details.
1157
1158         Reviewed by Abhishek Arya.
1159
1160         Test: ManulTests/scrolling-coordinator-viewport-constrained-crash.html
1161         Unable to write a normal layout test because
1162         1) must waitUntilDone() to reproduce the crash but the redirected URL can't notifyDone();
1163         2) Can't use a frame to contain the test because ScrollingCoordinator handles only the main frame.
1164
1165         * rendering/RenderBoxModelObject.cpp:
1166         (WebCore::RenderBoxModelObject::willBeDestroyed): Moved removeViewportConstrainedObject() call into RenderLayerModelObject::willBeDestroyed() because only RenderLayerModelObjects can be added as viewportConstrainedObjects.
1167         * rendering/RenderLayerModelObject.cpp:
1168         (WebCore::RenderLayerModelObject::willBeDestroyed): Changed this->view() (then view->frameView()) to this->frame() (then frame->view()) because when willBeDestroyed() is called, the document has set its renderView to 0 thus this->view() will return 0, causing removeViewportConstrainedObject() not called and a deleted RenderLayerModelObject in FrameView's viewportConstrainedObjects.
1169
1170 2013-02-13  Florin Malita  <fmalita@chromium.org>
1171
1172         [SVG] OOB access in SVGListProperty::replaceItemValues()
1173         https://bugs.webkit.org/show_bug.cgi?id=109293
1174
1175         Replacing a list property item with itself should be a no-op. This patch updates the related
1176         APIs and logic to detect the self-replace case and prevent removal of the item from the list.
1177
1178         To avoid scanning the list multiple times, removeItemFromList() is updated to operate on
1179         indices and a findItem() method is added to resolve an item to an index.
1180
1181         Reviewed by Dirk Schulze.
1182
1183         No new tests: updated existing tests cover the change.
1184
1185         * svg/properties/SVGAnimatedListPropertyTearOff.h:
1186         (WebCore::SVGAnimatedListPropertyTearOff::findItem):
1187         (SVGAnimatedListPropertyTearOff):
1188         (WebCore::SVGAnimatedListPropertyTearOff::removeItemFromList):
1189         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
1190         (WebCore::SVGAnimatedPathSegListPropertyTearOff::findItem):
1191         (SVGAnimatedPathSegListPropertyTearOff):
1192         (WebCore::SVGAnimatedPathSegListPropertyTearOff::removeItemFromList):
1193         Add a findItem() delegating method, and update removeItemFromList() to use the new
1194         index-based API.
1195
1196         * svg/properties/SVGListProperty.h:
1197         (WebCore::SVGListProperty::insertItemBeforeValues):
1198         (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
1199         (WebCore::SVGListProperty::replaceItemValues):
1200         (WebCore::SVGListProperty::replaceItemValuesAndWrappers):
1201         (SVGListProperty):
1202         Updated to handle the no-op case for insertItemBefore() & replaceItem().
1203
1204         * svg/properties/SVGListPropertyTearOff.h:
1205         (WebCore::SVGListPropertyTearOff::findItem):
1206         (WebCore::SVGListPropertyTearOff::removeItemFromList):
1207         Index-based API updates.
1208
1209         (WebCore::SVGListPropertyTearOff::processIncomingListItemValue):
1210         (WebCore::SVGListPropertyTearOff::processIncomingListItemWrapper):
1211         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
1212         (WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemValue):
1213         Detect the self-replace case and return without removing the item from the list.
1214
1215         * svg/properties/SVGPathSegListPropertyTearOff.h:
1216         (WebCore::SVGPathSegListPropertyTearOff::findItem):
1217         (WebCore::SVGPathSegListPropertyTearOff::removeItemFromList):
1218         (SVGPathSegListPropertyTearOff):
1219         (WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemWrapper):
1220         * svg/properties/SVGStaticListPropertyTearOff.h:
1221         (WebCore::SVGStaticListPropertyTearOff::processIncomingListItemValue):
1222         (WebCore::SVGStaticListPropertyTearOff::processIncomingListItemWrapper):
1223         Index-based API updates.
1224
1225 2013-02-13  Takashi Sakamoto  <tasak@google.com>
1226
1227         [Refactoring] StyleResolver::State should have methods to access its member variables.
1228         https://bugs.webkit.org/show_bug.cgi?id=108563
1229
1230         Reviewed by Antti Koivisto.
1231
1232         Made all member variables private and added methods to access the
1233         variables, because most of the member variables are read-only.
1234         We don't need to update those read-only variables while resolving
1235         styles.
1236
1237         No new tests, because just refactoring.
1238
1239         * css/SVGCSSStyleSelector.cpp:
1240         (WebCore::StyleResolver::applySVGProperty):
1241         * css/StyleResolver.cpp:
1242         (WebCore):
1243         (WebCore::StyleResolver::collectMatchingRules):
1244         (WebCore::StyleResolver::collectMatchingRulesForRegion):
1245         (WebCore::StyleResolver::sortAndTransferMatchedRules):
1246         (WebCore::StyleResolver::matchScopedAuthorRules):
1247         (WebCore::StyleResolver::styleSharingCandidateMatchesHostRules):
1248         (WebCore::StyleResolver::matchHostRules):
1249         (WebCore::StyleResolver::matchAuthorRules):
1250         (WebCore::StyleResolver::matchUserRules):
1251         (WebCore::StyleResolver::matchUARules):
1252         (WebCore::StyleResolver::collectMatchingRulesForList):
1253         (WebCore::StyleResolver::sortMatchedRules):
1254         (WebCore::StyleResolver::matchAllRules):
1255         (WebCore::StyleResolver::State::initElement):
1256         (WebCore::StyleResolver::initElement):
1257         Modified to invoke m_state.initElement if a given element is
1258         different from current m_state's element.
1259         (WebCore::StyleResolver::State::initForStyleResolve):
1260         Moved from StyleResolver.
1261         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
1262         (WebCore::StyleResolver::canShareStyleWithControl):
1263         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
1264         (WebCore::StyleResolver::canShareStyleWithElement):
1265         (WebCore::StyleResolver::locateSharedStyle):
1266         (WebCore::StyleResolver::styleForElement):
1267         (WebCore::StyleResolver::styleForKeyframe):
1268         (WebCore::StyleResolver::keyframeStylesForAnimation):
1269         (WebCore::StyleResolver::pseudoStyleForElement):
1270         Changed ASSERT in the first line. ASSERT(m_state.parentStyle) would be
1271         wrong, because it depends on previous resolving. However,
1272         initForStyleResolve will also update m_state.parentStyle. No code in
1273         pseudoStyleForElement depends on previous resolving state.
1274         (WebCore::StyleResolver::styleForPage):
1275         (WebCore::StyleResolver::defaultStyleForElement):
1276         (WebCore::StyleResolver::adjustRenderStyle):
1277         (WebCore::StyleResolver::updateFont):
1278         (WebCore::StyleResolver::pseudoStyleRulesForElement):
1279         (WebCore::StyleResolver::ruleMatches):
1280         Added one more parameter, dynamicPseudo, because dynamicPseudo in
1281         State class is just used for returning matched pseudo style from
1282         this ruleMatches to collectMatchingRulesForList. No need to keep
1283         dynamicPseudo while resolving styles.
1284         (WebCore::StyleResolver::checkRegionSelector):
1285         Removed m_pseudoStyle = NOPSEUDO, because this method uses just
1286         SelectorChecker::matched. SelectorChecker doesn't see StyleResolver's
1287         m_pseudoStyle directly. Need to use SelectorCheckerContext. So no
1288         need to set m_pseudoStyle to be NOPSEUDO.
1289         (WebCore::StyleResolver::applyProperties):
1290         (WebCore::StyleResolver::applyMatchedProperties):
1291         (WebCore::StyleResolver::isLeftPage):
1292         (WebCore::StyleResolver::applyPropertyToStyle):
1293         (WebCore::StyleResolver::useSVGZoomRules):
1294         (WebCore::createGridTrackBreadth):
1295         (WebCore::StyleResolver::resolveVariables):
1296         (WebCore::StyleResolver::applyProperty):
1297         (WebCore::StyleResolver::cachedOrPendingFromValue):
1298         (WebCore::StyleResolver::generatedOrPendingFromValue):
1299         (WebCore::StyleResolver::setOrPendingFromValue):
1300         (WebCore::StyleResolver::cursorOrPendingFromValue):
1301         (WebCore::StyleResolver::checkForTextSizeAdjust):
1302         (WebCore::StyleResolver::initializeFontStyle):
1303         (WebCore::StyleResolver::setFontSize):
1304         (WebCore::StyleResolver::colorFromPrimitiveValue):
1305         (WebCore::StyleResolver::loadPendingSVGDocuments):
1306         (WebCore::StyleResolver::cachedOrPendingStyleShaderFromValue):
1307         (WebCore::StyleResolver::loadPendingShaders):
1308         (WebCore::StyleResolver::parseCustomFilterTransformParameter):
1309         (WebCore::StyleResolver::createFilterOperations):
1310         (WebCore::StyleResolver::loadPendingImage):
1311         (WebCore::StyleResolver::loadPendingImages):
1312         * css/StyleResolver.h:
1313         (WebCore::StyleResolver::style):
1314         (WebCore::StyleResolver::parentStyle):
1315         (WebCore::StyleResolver::rootElementStyle):
1316         (WebCore::StyleResolver::element):
1317         (WebCore::StyleResolver::hasParentNode):
1318         (StyleResolver):
1319         (WebCore::StyleResolver::State::State):
1320         (State):
1321         (WebCore::StyleResolver::State::clear):
1322         Modified to use clear at the end of styleForElement.
1323         (WebCore::StyleResolver::State::document):
1324         (WebCore::StyleResolver::State::element):
1325         (WebCore::StyleResolver::State::styledElement):
1326         (WebCore::StyleResolver::State::setStyle):
1327         (WebCore::StyleResolver::State::style):
1328         (WebCore::StyleResolver::State::takeStyle):
1329         (WebCore::StyleResolver::State::ensureRuleList):
1330         (WebCore::StyleResolver::State::takeRuleList):
1331         (WebCore::StyleResolver::State::parentNode):
1332         (WebCore::StyleResolver::State::setParentStyle):
1333         (WebCore::StyleResolver::State::parentStyle):
1334         (WebCore::StyleResolver::State::rootElementStyle):
1335         (WebCore::StyleResolver::State::regionForStyling):
1336         (WebCore::StyleResolver::State::setSameOriginOnly):
1337         (WebCore::StyleResolver::State::isSameOriginOnly):
1338         (WebCore::StyleResolver::State::pseudoStyle):
1339         (WebCore::StyleResolver::State::elementLinkState):
1340         (WebCore::StyleResolver::State::distributedToInsertionPoint):
1341         (WebCore::StyleResolver::State::setElementAffectedByClassRules):
1342         (WebCore::StyleResolver::State::elementAffectedByClassRules):
1343         (WebCore::StyleResolver::State::setApplyPropertyToRegularStyle):
1344         (WebCore::StyleResolver::State::setApplyPropertyToVisitedLinkStyle):
1345         (WebCore::StyleResolver::State::applyPropertyToRegularStyle):
1346         (WebCore::StyleResolver::State::applyPropertyToVisitedLinkStyle):
1347         (WebCore::StyleResolver::State::pendingImageProperties):
1348         (WebCore::StyleResolver::State::pendingSVGDocuments):
1349         (WebCore::StyleResolver::State::setHasPendingShaders):
1350         (WebCore::StyleResolver::State::hasPendingShaders):
1351         (WebCore::StyleResolver::State::setLineHeightValue):
1352         (WebCore::StyleResolver::State::lineHeightValue):
1353         (WebCore::StyleResolver::State::setFontDirty):
1354         (WebCore::StyleResolver::State::fontDirty):
1355         (WebCore::StyleResolver::State::cacheBorderAndBackground):
1356         (WebCore::StyleResolver::State::hasUAAppearance):
1357         (WebCore::StyleResolver::State::borderData):
1358         (WebCore::StyleResolver::State::backgroundData):
1359         (WebCore::StyleResolver::State::backgroundColor):
1360         (WebCore::StyleResolver::State::fontDescription):
1361         (WebCore::StyleResolver::State::parentFontDescription):
1362         (WebCore::StyleResolver::State::setFontDescription):
1363         (WebCore::StyleResolver::State::setZoom):
1364         (WebCore::StyleResolver::State::setEffectiveZoom):
1365         (WebCore::StyleResolver::State::setTextSizeAdjust):
1366         (WebCore::StyleResolver::State::setWritingMode):
1367         (WebCore::StyleResolver::State::setTextOrientation):
1368         fontDescription, ... and setTextOrientation were moved from
1369         StyleResolver.
1370         (WebCore::StyleResolver::State::matchedRules):
1371         (WebCore::StyleResolver::State::addMatchedRule):
1372         Moved from StyleResolver.
1373         (WebCore::StyleResolver::applyPropertyToRegularStyle):
1374         (WebCore::StyleResolver::applyPropertyToVisitedLinkStyle):
1375         (WebCore::StyleResolver::fontDescription):
1376         (WebCore::StyleResolver::parentFontDescription):
1377         (WebCore::StyleResolver::setFontDescription):
1378         (WebCore::StyleResolver::setZoom):
1379         (WebCore::StyleResolver::setEffectiveZoom):
1380         (WebCore::StyleResolver::setTextSizeAdjust):
1381         (WebCore::StyleResolver::setWritingMode):
1382         (WebCore::StyleResolver::setTextOrientation):
1383         These fontDescription, ..., setTextOrientation are wrappers to
1384         invoke State's methods. StyleBuilder still depends on StyleResolver
1385         and invokes these methods. So we need these wrappers.
1386
1387 2013-02-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1388
1389         [Qt] window.open passes height and width parameters even if not defined in a page
1390         https://bugs.webkit.org/show_bug.cgi?id=107705
1391
1392         Reviewed by Kenneth Rohde Christiansen.
1393
1394         Do not override width or height of 0, as that indicates default size, and not minimum size.
1395
1396         Tested by tst_qwebpage.
1397
1398         * page/DOMWindow.cpp:
1399         (WebCore::DOMWindow::adjustWindowRect):
1400
1401 2013-02-13  Rashmi Shyamasundar  <rashmi.s2@samsung.com>
1402
1403         The 2D Canvas functions fillText()/strokeText() should display nothing when maxWidth is less then or equal to zero
1404         https://bugs.webkit.org/show_bug.cgi?id=102656
1405
1406         Reviewed by Dirk Schulze.
1407
1408         The functions fillText()/strokeText() should not display anything when 
1409         maxWidth is less than or equal to zero, according to spec :
1410         http://www.w3.org/TR/2dcontext/#text-preparation-algorithm
1411
1412         Test: fast/canvas/canvas-fillText-maxWidth-zero.html
1413
1414         * html/canvas/CanvasRenderingContext2D.cpp:
1415         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1416
1417 2013-02-13  ChangSeok Oh  <shivamidow@gmail.com>
1418
1419         [GTK][AC] Implement basic transform animations with clutter ac backend
1420         https://bugs.webkit.org/show_bug.cgi?id=109363
1421
1422         Reviewed by Gustavo Noronha Silva.
1423
1424         Implement basic transform animation with clutter ac backend.
1425         GraphicsLayerClutter is almost same with GraphicsLayerCA. And PlatformClutterAnimation
1426         interfaces are also similar with PlatformCAAnimation, but they are implemented
1427         with native clutter APIs. Clutter backend AC supports a basic single transform animation
1428         with this patch now, but additive animation combination and keyframe animation
1429         are not supported yet.
1430
1431         Covered by existing animation tests.
1432
1433         * platform/graphics/clutter/GraphicsLayerActor.cpp:
1434         (graphicsLayerActorSetTransform):
1435         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
1436         (WebCore::isTransformTypeTransformationMatrix):
1437         (WebCore):
1438         (WebCore::isTransformTypeFloatPoint3D):
1439         (WebCore::isTransformTypeNumber):
1440         (WebCore::getTransformFunctionValue):
1441         (WebCore::getValueFunctionNameForTransformOperation):
1442         (WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
1443         (WebCore::GraphicsLayerClutter::appendToUncommittedAnimations):
1444         (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
1445         * platform/graphics/clutter/GraphicsLayerClutter.h:
1446         (GraphicsLayerClutter):
1447         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
1448         (WebCore::toClutterActorPropertyString):
1449         (WebCore):
1450         (WebCore::PlatformClutterAnimation::supportsValueFunction):
1451         (WebCore::PlatformClutterAnimation::duration):
1452         (WebCore::PlatformClutterAnimation::setDuration):
1453         (WebCore::PlatformClutterAnimation::setAdditive):
1454         (WebCore::PlatformClutterAnimation::valueFunction):
1455         (WebCore::PlatformClutterAnimation::setValueFunction):
1456         (WebCore::PlatformClutterAnimation::setFromValue):
1457         (WebCore::PlatformClutterAnimation::setToValue):
1458         (WebCore::PlatformClutterAnimation::timeline):
1459         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
1460         (WebCore::PlatformClutterAnimation::addOpacityTransition):
1461         (WebCore::PlatformClutterAnimation::addTransformTransition):
1462         (WebCore::PlatformClutterAnimation::addAnimationForKey):
1463         * platform/graphics/clutter/PlatformClutterAnimation.h:
1464         (PlatformClutterAnimation):
1465
1466 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
1467
1468         Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
1469         https://bugs.webkit.org/show_bug.cgi?id=109554
1470
1471         In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
1472         can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
1473
1474         Drive by fix: I introduced a client interface for the HeapGraphSerializer.
1475         It helps me to do the tests for the serializer.
1476
1477         Reviewed by Yury Semikhatsky.
1478
1479         It is covered by newly added tests in TestWebKitAPI.
1480
1481         * inspector/HeapGraphSerializer.cpp:
1482         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
1483         (WebCore::HeapGraphSerializer::pushUpdate):
1484         (WebCore::HeapGraphSerializer::reportNode):
1485         (WebCore::HeapGraphSerializer::toNodeId):
1486         (WebCore::HeapGraphSerializer::addRootNode):
1487         * inspector/HeapGraphSerializer.h:
1488         (HeapGraphSerializer):
1489         (Client):
1490         (WebCore::HeapGraphSerializer::Client::~Client):
1491         * inspector/InspectorMemoryAgent.cpp:
1492         (WebCore):
1493         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
1494
1495 2013-02-13  Yury Semikhatsky  <yurys@chromium.org>
1496
1497         Web Inspector: add experimental native heap graph to Timeline panel
1498         https://bugs.webkit.org/show_bug.cgi?id=109687
1499
1500         Reviewed by Alexander Pavlov.
1501
1502         Added experimentatl support for native heap graph on the Timeline panel.
1503         Native memory usage data is collected after each top level task and can
1504         be displayed instead of DOM counters graph on the Timeline panel if
1505         corresponding experiment is enabled in the inspector settings.
1506
1507         * inspector/Inspector.json:
1508         * inspector/InspectorController.cpp:
1509         (WebCore::InspectorController::InspectorController):
1510         * inspector/InspectorTimelineAgent.cpp:
1511         (TimelineAgentState):
1512         (WebCore::InspectorTimelineAgent::setIncludeDomCounters):
1513         (WebCore):
1514         (WebCore::InspectorTimelineAgent::setIncludeNativeMemoryStatistics):
1515         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
1516         (WebCore::InspectorTimelineAgent::setDOMCounters):
1517         (WebCore::InspectorTimelineAgent::setNativeHeapStatistics):
1518         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
1519         * inspector/InspectorTimelineAgent.h:
1520         (WebCore):
1521         (WebCore::InspectorTimelineAgent::create):
1522         (InspectorTimelineAgent):
1523         * inspector/WorkerInspectorController.cpp:
1524         (WebCore::WorkerInspectorController::WorkerInspectorController):
1525         * inspector/front-end/MemoryStatistics.js:
1526         (WebInspector.MemoryStatistics):
1527         * inspector/front-end/NativeMemoryGraph.js:
1528         (WebInspector.NativeMemoryGraph):
1529         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
1530         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
1531         * inspector/front-end/Settings.js:
1532         (WebInspector.ExperimentsSettings):
1533         * inspector/front-end/TimelinePanel.js:
1534
1535 2013-02-13  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1536
1537         Web Inspector: Fixed colorpicker editing and scrolling.
1538         https://bugs.webkit.org/show_bug.cgi?id=109434.
1539
1540         Reviewed by Alexander Pavlov.
1541
1542         The color picker scrolling logic relied on the fixed DOM structure which changed with the introduction of
1543         SidebarPaneStack (https://bugs.webkit.org/show_bug.cgi?id=108183).
1544         Added a special CSS class to mark the scroll target.
1545
1546         No new tests.
1547
1548         * inspector/front-end/SplitView.js:
1549         (WebInspector.SplitView):
1550         * inspector/front-end/StylesSidebarPane.js:
1551         (WebInspector.StylePropertyTreeElement.prototype.updateTitle.):
1552         * inspector/front-end/TabbedPane.js:
1553         (WebInspector.TabbedPane):
1554  
1555 2013-02-13  Andrey Lushnikov  <lushnikov@chromium.org>
1556
1557         Web Inspector: fix js compilation warnings in TextPrompt
1558         https://bugs.webkit.org/show_bug.cgi?id=109685
1559
1560         Reviewed by Alexander Pavlov.
1561
1562         Mark last argument of _applySuggestion function as optional.
1563
1564         No new tests: no change in behaviour.
1565
1566         * inspector/front-end/TextPrompt.js:
1567
1568 2013-02-13  Pablo Flouret  <pablof@motorola.com>
1569
1570         Implement css-conditional's CSS.supports()
1571         https://bugs.webkit.org/show_bug.cgi?id=100324
1572
1573         Reviewed by Antti Koivisto.
1574
1575         http://dev.w3.org/csswg/css3-conditional/#the-css-interface
1576
1577         The supports() method provides the css @supports rule's corresponding
1578         dom api.
1579         The patch also adds the CSS interface on DOMWindow, which holds "useful
1580         CSS-related functions that do not belong elsewhere". This is where
1581         supports() lives.
1582
1583         Test: css3/supports-dom-api.html
1584
1585         * CMakeLists.txt:
1586         * DerivedSources.cpp:
1587         * DerivedSources.make:
1588         * DerivedSources.pri:
1589         * GNUmakefile.list.am:
1590         * Target.pri:
1591         * WebCore.exp.in:
1592         * WebCore.gypi:
1593         * WebCore.vcproj/WebCore.vcproj:
1594         * WebCore.xcodeproj/project.pbxproj:
1595         * bindings/gobject/GNUmakefile.am:
1596         * bindings/scripts/CodeGeneratorGObject.pm:
1597         (SkipFunction):
1598             Add DOMWindowCSS.* to the build systems.
1599
1600         * bindings/scripts/CodeGenerator.pm:
1601         (WK_lcfirst):
1602             Handle CSS prefixes correctly (s/cSS/css/).
1603
1604         * css/CSSGrammar.y.in:
1605         * css/CSSParser.cpp:
1606         (WebCore::CSSParser::CSSParser):
1607         (WebCore::CSSParser::parseSupportsCondition):
1608         (WebCore::CSSParser::detectAtToken):
1609         * css/CSSParser.h:
1610             webkit_supports_condition parses just the condition part of an
1611             @supports rule and evaluates it, outputting whether the condition
1612             is supported or not.
1613
1614         * css/CSSAllInOne.cpp:
1615         * css/DOMWindowCSS.cpp: Added.
1616         * css/DOMWindowCSS.h: Added.
1617         * css/DOMWindowCSS.idl: Added.
1618             The CSS interface object.
1619
1620         * page/DOMWindow.cpp:
1621         (WebCore::DOMWindow::css):
1622         * page/DOMWindow.h:
1623         * page/DOMWindow.idl:
1624             window.CSS
1625
1626 2013-02-13  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1627
1628         Web Inspector: Simplify SplitView to rely more on CSS
1629         https://bugs.webkit.org/show_bug.cgi?id=109426
1630
1631         Reviewed by Vsevolod Vlasov.
1632
1633         Simplified Javascript code by moving large part of the layout logic into CSS rules. The patch is larger than it
1634         should be because one of the clients (TimelinePanel) is breaking SplitView incapsulation by reparenting its
1635         resizer.
1636
1637         No new tests.
1638
1639         * inspector/front-end/SidebarView.js:
1640         (WebInspector.SidebarView):
1641         * inspector/front-end/SplitView.js:
1642         (WebInspector.SplitView):
1643         (WebInspector.SplitView.prototype._innerSetVertical):
1644         (WebInspector.SplitView.prototype.setSecondIsSidebar):
1645         (WebInspector.SplitView.prototype._showOnly):
1646         (WebInspector.SplitView.prototype._removeAllLayoutProperties):
1647         * inspector/front-end/TimelinePanel.js:
1648         * inspector/front-end/cssNamedFlows.css:
1649         (.css-named-flow-collections-view .split-view-sidebar):
1650         (.css-named-flow-collections-view .split-view-sidebar .sidebar-content):
1651         (.css-named-flow-collections-view .split-view-sidebar .selection):
1652         (.css-named-flow-collections-view .split-view-sidebar .named-flow-overflow::before, .css-named-flow-collections-view .region-empty:before, .css-named-flow-collections-view .region-fit::before, .css-named-flow-collections-view .region-overset::before):
1653         (.css-named-flow-collections-view .split-view-sidebar .named-flow-overflow::before):
1654         * inspector/front-end/splitView.css:
1655         (.split-view-contents.maximized):
1656         (.split-view-vertical .split-view-contents):
1657         (.split-view-vertical .split-view-contents-first):
1658         (.split-view-vertical .split-view-contents-first.maximized):
1659         (.split-view-vertical .split-view-contents-second):
1660         (.split-view-vertical .split-view-contents-second.maximized):
1661         (.split-view-horizontal .split-view-contents):
1662         (.split-view-horizontal .split-view-contents-first):
1663         (.split-view-horizontal .split-view-contents-first.maximized):
1664         (.split-view-horizontal .split-view-contents-second):
1665         (.split-view-horizontal .split-view-contents-second.maximized):
1666         (.split-view-vertical .split-view-sidebar.split-view-contents-first:not(.maximized)):
1667         (.split-view-vertical .split-view-sidebar.split-view-contents-second:not(.maximized)):
1668         (.split-view-horizontal .split-view-sidebar.split-view-contents-first:not(.maximized)):
1669         (.split-view-horizontal .split-view-sidebar.split-view-contents-second:not(.maximized)):
1670         (.split-view-vertical .split-view-resizer):
1671         (.split-view-horizontal .split-view-resizer):
1672         * inspector/front-end/timelinePanel.css:
1673         (.timeline.split-view-vertical .split-view-resizer):
1674         (#timeline-container .split-view-sidebar):
1675
1676 2013-02-13  Kentaro Hara  <haraken@chromium.org>
1677
1678         Unreviewed, rolling out r142730.
1679         http://trac.webkit.org/changeset/142730
1680         https://bugs.webkit.org/show_bug.cgi?id=109666
1681
1682         chromium browser tests are failing
1683
1684         * bindings/scripts/CodeGeneratorV8.pm:
1685         (GenerateNormalAttrGetter):
1686         (GenerateNormalAttrSetter):
1687         (GenerateSingleBatchedAttribute):
1688         (GenerateImplementation):
1689         * bindings/scripts/test/V8/V8TestInterface.cpp:
1690         (TestInterfaceV8Internal):
1691         (WebCore):
1692         * bindings/scripts/test/V8/V8TestObj.cpp:
1693         (WebCore):
1694
1695 2013-02-13  Tamas Czene  <tczene@inf.u-szeged.hu>
1696
1697         OpenCL implementation of Flood SVG filters.
1698         https://bugs.webkit.org/show_bug.cgi?id=109580
1699
1700         Reviewed by Zoltan Herczeg.
1701
1702         * Target.pri:
1703         * platform/graphics/filters/FEFlood.h:
1704         (FEFlood):
1705         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
1706         (WebCore):
1707         (WebCore::PROGRAM_STR):
1708         (WebCore::FilterContextOpenCL::compileFill):
1709         (WebCore::FilterContextOpenCL::fill):
1710         * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
1711         (WebCore::FilterContextOpenCL::FilterContextOpenCL):
1712         (FilterContextOpenCL):
1713         * platform/graphics/gpu/opencl/OpenCLFEFlood.cpp: Added.
1714         (WebCore):
1715         (WebCore::FEFlood::platformApplyOpenCL):
1716
1717 2013-02-13  Mike West  <mkwst@chromium.org>
1718
1719         location.href does not throw SECURITY_ERR when accessed across origins with JSC bindings
1720         https://bugs.webkit.org/show_bug.cgi?id=43891
1721
1722         Reviewed by Adam Barth.
1723
1724         Other browsers (IE, Firefox, and Opera) throw an exception when accessing
1725         properties of a Location object across origins, as the spec suggests[1].
1726         WebKit is currently the outlier.
1727
1728         This has a few negative effects: developers are forced to hack around
1729         access violations in two ways rather than having a single code path, and
1730         (more annoyingly) developers are unable to avoid generating the error
1731         message. See every ad on the internet for the effect on the console. :)
1732
1733         This patch adds a SECURITY_ERR exception to these access violations,
1734         which is the first step towards getting rid of the console spam. Getting
1735         rid of the message entirely will require a solution to
1736         http://wkbug.com/98050.
1737
1738         A fairly inconclusive thread[2] on webkit-dev popped up in 2010 and
1739         trailed off without reaching conclusion. A more recent thread reached
1740         agreement that this patch seems like a reasonable thing to do[3].
1741
1742         This is the JSC half of the patch. V8 is coming in http://wkbug.com/43892
1743
1744         [1]: http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#security-location
1745         [2]: https://lists.webkit.org/pipermail/webkit-dev/2010-August/013880.html
1746         [2]: https://lists.webkit.org/pipermail/webkit-dev/2012-February/023636.html
1747
1748         * bindings/js/JSLocationCustom.cpp:
1749         (WebCore::JSLocation::getOwnPropertySlotDelegate):
1750
1751 2013-02-13  Andrew Wilson  <atwilson@chromium.org>
1752
1753         Unreviewed Chromium gyp-file cleanup after glib backend removal.
1754         https://bugs.webkit.org/show_bug.cgi?id=109672
1755
1756         Removed references to GLib unicode backend:
1757
1758         * WebCore.gypi:
1759
1760 2013-02-12  Kentaro Hara  <haraken@chromium.org>
1761
1762         [V8] Generate wrapper methods for custom getters/setters
1763         https://bugs.webkit.org/show_bug.cgi?id=109666
1764
1765         Reviewed by Adam Barth.
1766
1767         Currently V8 directly calls back custom getters/setters written
1768         in custom binding files. This makes it impossible for code generators
1769         to hook custom getters/setters (e.g. Code generators cannot insert a code
1770         for FeatureObservation into custom getters/setters). We should generate
1771         wrapper methods for custom getters/setters.
1772
1773         In the future, I will insert TRACE_EVENT() macros into these wrapper methods
1774         to profile DOM getters/setters/methods.
1775
1776         * bindings/scripts/CodeGeneratorV8.pm:
1777         (GenerateNormalAttrGetter):
1778         (GenerateNormalAttrSetter):
1779         (GenerateSingleBatchedAttribute):
1780         (GenerateImplementation):
1781         * bindings/scripts/test/V8/V8TestInterface.cpp:
1782         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
1783         (TestInterfaceV8Internal):
1784         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
1785         (WebCore):
1786         * bindings/scripts/test/V8/V8TestObj.cpp:
1787         (WebCore::TestObjV8Internal::customAttrAttrGetter):
1788         (TestObjV8Internal):
1789         (WebCore::TestObjV8Internal::customAttrAttrSetter):
1790         (WebCore):
1791
1792 2013-02-13  Sheriff Bot  <webkit.review.bot@gmail.com>
1793
1794         Unreviewed, rolling out r142611.
1795         http://trac.webkit.org/changeset/142611
1796         https://bugs.webkit.org/show_bug.cgi?id=109668
1797
1798         Suggest box is not shown anymore when user types "window." in
1799         inspector console. (Requested by vsevik on #webkit).
1800
1801         * inspector/front-end/TextPrompt.js:
1802         (WebInspector.TextPrompt.prototype.complete):
1803
1804 2013-02-13  Kentaro Hara  <haraken@chromium.org>
1805
1806         [V8] There is no XXXConstructor that requires a custom getter
1807         https://bugs.webkit.org/show_bug.cgi?id=109667
1808
1809         Reviewed by Adam Barth.
1810
1811         Currently '[Custom] attribute XXXConstructor xxx' generates
1812         XXXAttrGetter(). However, there is no XXXConstructor with [Custom].
1813         In addition, it does make no sense to generate XXXAttrGetter() for such cases.
1814         We can remove the logic from CodeGeneratorV8.pm.
1815
1816         * bindings/scripts/CodeGeneratorV8.pm:
1817         (GenerateSingleBatchedAttribute):
1818
1819 2013-02-12  Hajime Morrita  <morrita@google.com>
1820
1821         [Internals] setShadowDOMEnabled() shouldn't be used except a few tests.
1822         https://bugs.webkit.org/show_bug.cgi?id=109642
1823
1824         Reviewed by Kent Tamura.
1825
1826         InternalSettings.setShadowDOMEnabled() shouldn't be called after
1827         any relevant DOM bindings are touched. However for fuzzers, it
1828         isn't trivial to regulate its behavior.
1829
1830         This change whitelists the URL of running test for prevent
1831         unintended API calls. This doesn't hurt the Internals usability
1832         since the API is called from just a couple of tests and the number
1833         isn't expected to grow.
1834
1835         Test: fast/dom/shadow/shadow-dom-enabled-flag-whitelist.html
1836
1837         * testing/InternalSettings.cpp:
1838         (WebCore::urlIsWhitelisted):
1839         (WebCore):
1840         (WebCore::InternalSettings::setShadowDOMEnabled):
1841
1842 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
1843
1844         Web Inspector: Introduce version controller to migrate settings versions.
1845         https://bugs.webkit.org/show_bug.cgi?id=109553
1846
1847         Reviewed by Yury Semikhatsky.
1848
1849         This patch introduces version controller that could be used to migrate inspector settings.
1850
1851         Test: inspector/version-controller.html
1852
1853         * inspector/front-end/Settings.js:
1854         (WebInspector.Settings):
1855         (WebInspector.VersionController):
1856         (WebInspector.VersionController.prototype.set _methodsToRunToUpdateVersion):
1857         (WebInspector.VersionController.prototype._updateVersionFrom0To1):
1858         * inspector/front-end/inspector.js:
1859
1860 2013-02-12  Martin Robinson  <mrobinson@igalia.com>
1861
1862         [GTK] Remove the GLib unicode backend
1863         https://bugs.webkit.org/show_bug.cgi?id=109627
1864
1865         Reviewed by Benjamin Poulain.
1866
1867         Remove references to the GLib unicode backend from WebCore.
1868
1869         * GNUmakefile.list.am: Update the source list.
1870         * platform/text/gtk/TextBreakIteratorGtk.cpp: Removed.
1871         * platform/text/gtk/TextCodecGtk.cpp: Removed.
1872         * platform/text/gtk/TextCodecGtk.h: Removed.
1873
1874 2013-02-12  Chris Fleizach  <cfleizach@apple.com>
1875
1876          AX: crash when accessing AccessibilityScrollbar after page has been unloaded
1877          https://bugs.webkit.org/show_bug.cgi?id=109524
1878
1879          Reviewed by Ryosuke Niwa.
1880
1881          AX clients can hold onto AccesibilityScrollbar references that reference parent
1882          AccessibilityScrollViews that have already gone away.
1883
1884          AccessibilityScrollView is not calling detachFromParent after it is removed, which
1885          leads to a crash. The fix is to clearChildren() when an object is deallocated.
1886
1887          I could not create a test because the crash only manifests over multiple page loads.
1888
1889          * accessibility/AccessibilityObject.cpp:
1890          (WebCore::AccessibilityObject::detach):
1891
1892 2013-02-12  Hayato Ito  <hayato@chromium.org>
1893
1894         Use FocusEvent.relatedTarget in {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator.
1895         https://bugs.webkit.org/show_bug.cgi?id=109650
1896
1897         Reviewed by Dimitri Glazkov.
1898
1899         Set FocusEvent.relatedTarget in its constructor so that each
1900         EventDispatchMediator can use FocusEvent.relatedTarget rather than
1901         its redundant m_{old,new}FocusedNode member variable.
1902
1903         I've also removed FIXME comments, mentioning bug 109261, since I
1904         can not reproduce the issue.
1905
1906         No new tests. No change in functionality.
1907
1908         * dom/FocusEvent.cpp:
1909         (WebCore::FocusEventDispatchMediator::create):
1910         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
1911         (WebCore::FocusEventDispatchMediator::dispatchEvent):
1912         (WebCore::BlurEventDispatchMediator::create):
1913         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
1914         (WebCore::BlurEventDispatchMediator::dispatchEvent):
1915         (WebCore::FocusInEventDispatchMediator::create):
1916         (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
1917         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
1918         (WebCore::FocusOutEventDispatchMediator::create):
1919         (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
1920         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
1921         * dom/FocusEvent.h:
1922         (FocusEventDispatchMediator):
1923         (BlurEventDispatchMediator):
1924         (FocusInEventDispatchMediator):
1925         (FocusOutEventDispatchMediator):
1926         * dom/Node.cpp:
1927         (WebCore::Node::dispatchFocusInEvent):
1928         (WebCore::Node::dispatchFocusOutEvent):
1929         (WebCore::Node::dispatchFocusEvent):
1930         (WebCore::Node::dispatchBlurEvent):
1931
1932 2013-02-12  Takashi Sakamoto  <tasak@google.com>
1933
1934         [Refactoring] Make SelectorChecker::mode a constructor parameter.
1935         https://bugs.webkit.org/show_bug.cgi?id=109653
1936
1937         Reviewed by Dimitri Glazkov.
1938
1939         No new tests, because just refactoring.
1940
1941         * css/SelectorChecker.cpp:
1942         (WebCore::SelectorChecker::SelectorChecker):
1943         Made mode a constructor parameter.
1944         * css/SelectorChecker.h:
1945         Removed setMode.
1946         (SelectorChecker):
1947         * css/StyleResolver.cpp:
1948         (WebCore::StyleResolver::ruleMatches):
1949         (WebCore::StyleResolver::checkRegionSelector):
1950         * dom/SelectorQuery.cpp:
1951         (WebCore::SelectorQuery::matches):
1952         (WebCore::SelectorQuery::queryAll):
1953         (WebCore::SelectorQuery::queryFirst):
1954         * html/shadow/ContentSelectorQuery.cpp:
1955         (WebCore::ContentSelectorChecker::ContentSelectorChecker):
1956
1957 2013-02-12  Andreas Kling  <akling@apple.com>
1958
1959         Remove Element::ensureAttributeData().
1960         <http://webkit.org/b/109643>
1961
1962         Reviewed by Anders Carlsson.
1963
1964         * dom/Element.h:
1965         * dom/Element.cpp:
1966         (WebCore::Element::classAttributeChanged):
1967         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
1968
1969             Use attributeData() instead of ensureAttributeData(), it's already guaranteed to exist in
1970             both these functions as they are called in response to attribute changes.
1971
1972         * svg/SVGElement.h:
1973         (WebCore::SVGElement::invalidateSVGAttributes):
1974
1975             Use mutableAttributeData() instead of ensureAttributeData() when invalidating animated
1976             SVG attributes. While I can't find any bugs caused by this, an element with property animations
1977             shouldn't share attribute data with other elements.
1978
1979 2013-02-12  Hayato Ito  <hayato@chromium.org>
1980
1981         Make {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator type safe.
1982         https://bugs.webkit.org/show_bug.cgi?id=109561
1983
1984         Reviewed by Dimitri Glazkov.
1985
1986         Use FocusEvent rather than Event in {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator.
1987
1988         No new tests. No change in functionality.
1989
1990         * dom/FocusEvent.cpp:
1991         (WebCore::FocusEventDispatchMediator::create):
1992         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
1993         (WebCore::BlurEventDispatchMediator::create):
1994         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
1995         (WebCore::FocusInEventDispatchMediator::create):
1996         (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
1997         (WebCore::FocusOutEventDispatchMediator::create):
1998         (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
1999         * dom/FocusEvent.h:
2000         (FocusEventDispatchMediator):
2001         (WebCore::FocusEventDispatchMediator::event):
2002         (BlurEventDispatchMediator):
2003         (WebCore::BlurEventDispatchMediator::event):
2004         (FocusInEventDispatchMediator):
2005         (WebCore::FocusInEventDispatchMediator::event):
2006         (FocusOutEventDispatchMediator):
2007         (WebCore::FocusOutEventDispatchMediator::event):
2008
2009 2013-02-12  Eric Seidel  <eric@webkit.org>
2010
2011         Fix HTMLToken::Attribute member naming and update callsites to use Vector-based String functions
2012         https://bugs.webkit.org/show_bug.cgi?id=109638
2013
2014         Reviewed by Adam Barth.
2015
2016         Darin Adler noted in:
2017         https://bugs.webkit.org/show_bug.cgi?id=109408#c4
2018         that HTMLToken::Attribute (then MarkupTokenBase::Attribute)
2019         was a struct, yet incorrectly used m_ for its public members.
2020
2021         This patch fixes the members to not have the m_, and since I was
2022         touching all callers, I also updated all callers to use modern
2023         Vector-based String creation/append functions instead of manually
2024         calling UChar*, size_t versions.
2025
2026         There should be no behavior change to this patch.  Where I saw
2027         performance/memory bugs, I noted them with FIXMEs to keep
2028         this change simple.
2029
2030         * html/HTMLViewSourceDocument.cpp:
2031         (WebCore::HTMLViewSourceDocument::processTagToken):
2032         * html/parser/AtomicHTMLToken.h:
2033         (WebCore::AtomicHTMLToken::publicIdentifier):
2034         (WebCore::AtomicHTMLToken::systemIdentifier):
2035         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
2036         (WebCore::AtomicHTMLToken::initializeAttributes):
2037         * html/parser/CompactHTMLToken.cpp:
2038         (WebCore::CompactHTMLToken::CompactHTMLToken):
2039         * html/parser/HTMLMetaCharsetParser.cpp:
2040         (WebCore::HTMLMetaCharsetParser::processMeta):
2041         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
2042         * html/parser/HTMLPreloadScanner.cpp:
2043         (WebCore::StartTagScanner::processAttributes):
2044         (WebCore::HTMLPreloadScanner::scan):
2045         (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
2046         (WebCore::HTMLPreloadScanner::processToken):
2047         * html/parser/HTMLToken.h:
2048         (Range):
2049         (Attribute):
2050         (WebCore::HTMLToken::clear):
2051         (WebCore::HTMLToken::startIndex):
2052         (WebCore::HTMLToken::endIndex):
2053         (WebCore::HTMLToken::end):
2054         (WebCore::HTMLToken::nameString):
2055         (WebCore::HTMLToken::addNewAttribute):
2056         (WebCore::HTMLToken::beginAttributeName):
2057         (WebCore::HTMLToken::endAttributeName):
2058         (WebCore::HTMLToken::beginAttributeValue):
2059         (WebCore::HTMLToken::endAttributeValue):
2060         (WebCore::HTMLToken::appendToAttributeName):
2061         (WebCore::HTMLToken::appendToAttributeValue):
2062         (WebCore::HTMLToken::eraseValueOfAttribute):
2063         * html/parser/HTMLTokenizer.cpp:
2064         (WebCore::AtomicHTMLToken::nameForAttribute):
2065         * html/parser/HTMLViewSourceParser.cpp:
2066         (WebCore::HTMLViewSourceParser::updateTokenizerState):
2067         * html/parser/XSSAuditor.cpp:
2068         (WebCore::findAttributeWithName):
2069         (WebCore::XSSAuditor::filterParamToken):
2070         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
2071         (WebCore::XSSAuditor::eraseAttributeIfInjected):
2072         (WebCore::XSSAuditor::decodedSnippetForAttribute):
2073
2074 2013-02-12  Ryosuke Niwa  <rniwa@webkit.org>
2075
2076         Build fix.
2077
2078         * editing/Editor.h:
2079         (WebCore::Editor::avoidIntersectionWithDeleteButtonController):
2080
2081 2013-02-12  Nate Chapin  <japhet@chromium.org>
2082
2083         REGRESSION: Reloading a local file doesn't pick up changes
2084         https://bugs.webkit.org/show_bug.cgi?id=109344
2085
2086         Reviewed by Alexey Proskuryakov.
2087
2088         Test: http/tests/cache/reload-main-resource.php
2089
2090         * loader/cache/CachedResource.cpp:
2091         (WebCore::CachedResource::load):
2092         * loader/cache/CachedResourceLoader.cpp:
2093         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
2094         (WebCore::CachedResourceLoader::cachePolicy): Don't use subresourceCachePolicy()
2095             for main resources.
2096         * loader/cache/CachedResourceLoader.h:
2097         (CachedResourceLoader):
2098
2099 2013-02-12  Ryosuke Niwa  <rniwa@webkit.org>
2100
2101         Turn avoidIntersectionWithNode into Editor member functions to encapsulate delete button controller
2102         https://bugs.webkit.org/show_bug.cgi?id=109549
2103
2104         Reviewed by Tony Chang.
2105
2106         Renamed avoidIntersectionWithNode to Editor::avoidIntersectionWithDeleteButtonController and added trivial
2107         implementations when delete button controllers are disabled (ENABLE_DELETION_UI is 0).
2108
2109         * editing/DeleteButtonController.cpp:
2110         * editing/EditCommand.cpp:
2111         (WebCore::EditCommand::EditCommand):
2112         * editing/Editor.cpp:
2113         (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Moved from htmlediting.cpp and renamed.
2114         The version that takes VisibleSelection has been updated to use updatePositionForNodeRemoval to share
2115         mode code with that function.
2116         (WebCore::Editor::rangeForPoint):
2117         * editing/Editor.h:
2118         (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Added; trivial implementations.
2119         * editing/htmlediting.cpp:
2120         * editing/htmlediting.h:
2121         * editing/markup.cpp:
2122         (WebCore::createMarkupInternal): Extracted from createMarkup.
2123         (WebCore::createMarkup):
2124
2125 2013-02-12  Joseph Pecoraro  <pecoraro@apple.com>
2126
2127         [iOS] Enable PAGE_VISIBILITY_API
2128         https://bugs.webkit.org/show_bug.cgi?id=109399
2129
2130         Reviewed by David Kilzer.
2131
2132         * Configurations/FeatureDefines.xcconfig:
2133
2134 2013-02-12  Andreas Kling  <akling@apple.com>
2135
2136         Move ElementAttributeData into Element.cpp/h
2137         <http://webkit.org/b/109610>
2138
2139         Reviewed by Anders Carlsson.
2140
2141         Removed ElementAttributeData.cpp/h and moved the class itself into Element headquarters.
2142         In the near future, Element should be the only client of this class, and thus it won't
2143         be necessary for other classes to know anything about it.
2144
2145         * dom/ElementAttributeData.cpp: Removed.
2146         * dom/ElementAttributeData.h: Removed.
2147         * CMakeLists.txt:
2148         * GNUmakefile.list.am:
2149         * Target.pri:
2150         * WebCore.gypi:
2151         * WebCore.xcodeproj/project.pbxproj:
2152         * dom/DOMAllInOne.cpp:
2153         * dom/DocumentSharedObjectPool.cpp:
2154         * dom/Element.cpp:
2155         * dom/Element.h:
2156         * workers/SharedWorker.cpp:
2157         * Modules/webdatabase/DatabaseManager.cpp: Add ExceptionCode.h since Element.h doesn't pull it in anymore.
2158
2159 2013-02-12  Simon Fraser  <simon.fraser@apple.com>
2160
2161         Crash when scrolling soon after page starts loading
2162         https://bugs.webkit.org/show_bug.cgi?id=109631
2163         <rdar://problem/13157533&13159627&13196727>
2164         
2165         Reviewed by Anders Carlsson.
2166         
2167         Make the scrolling tree more robust when the root state node,
2168         and/or scrolling node are null. This can happen if we try to
2169         handle a wheel event before we've done the first scrolling
2170         tree commit.
2171
2172         * page/scrolling/ScrollingStateTree.cpp:
2173         (WebCore::ScrollingStateTree::commit): Handle the case where
2174         m_rootStateNode is null. We'll still commit, but the state tree
2175         will have no state nodes.
2176         * page/scrolling/ScrollingTree.cpp:
2177         (WebCore::ScrollingTree::handleWheelEvent): Null-check m_rootNode.
2178         (WebCore::ScrollingTree::commitNewTreeState): Handle a null root node.
2179         (WebCore::ScrollingTree::updateTreeFromStateNode): If the rood state node
2180         is null, just clear the map and null out the root scrolling node.
2181         * page/scrolling/ScrollingTree.h: m_debugInfoLayer was unused.
2182         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2183         (WebCore::ScrollingCoordinatorMac::ensureRootStateNodeForFrameView): It may be possible
2184         to get here before we've registered the root scroll layer, in which case scrollLayerID()
2185         will be 0. Assert to see if this can ever happen.
2186         (WebCore::ScrollingCoordinatorMac::scrollingStateTreeAsText): Handle case of rootStateNode()
2187         being null.
2188
2189 2013-02-12  Raymond Toy  <rtoy@google.com>
2190
2191         Synchronize setting of panner node model and processing
2192         https://bugs.webkit.org/show_bug.cgi?id=109599
2193
2194         Reviewed by Chris Rogers.
2195
2196         No new tests.
2197
2198         * Modules/webaudio/PannerNode.cpp:
2199         (WebCore::PannerNode::process):
2200         (WebCore::PannerNode::setPanningModel):
2201         * Modules/webaudio/PannerNode.h:
2202
2203 2013-02-12  Dean Jackson  <dino@apple.com>
2204
2205         Add class name for snapshotted plugin based on dimensions
2206         https://bugs.webkit.org/show_bug.cgi?id=108369
2207
2208         Reviewed by Simon Fraser.
2209
2210         As the size of the plugin changes, the Shadow Root for the snapshot
2211         might want to toggle different interfaces. Expose "tiny", "small",
2212         "medium" and "large" classes on the Shadow. (The dimensions are
2213         currently chosen fairly arbitrarily).
2214
2215         Because we only know the dimensions after layout, we set up
2216         a post layout task to add the class. Luckily there already was
2217         a post layout task for plugins - I just updated it to handle
2218         both real and snapshotted plugins. This involved modifying
2219         the list of RenderEmbeddedObjects in FrameView to take generic
2220         RenderObjects, and decide which type they are when calling
2221         the update method.
2222
2223         * html/HTMLPlugInImageElement.cpp: Some new dimensions for the various size thresholds.
2224         (WebCore::classNameForShadowRootSize): New static function that returns a class name
2225             after examining the size of the object.
2226         (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Sets the class name for
2227             the shadow root. This is called in the post layout task.
2228         (WebCore::shouldPlugInShowLabelAutomatically): Use new size names.
2229         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Ditto.
2230         * html/HTMLPlugInImageElement.h:
2231         (HTMLPlugInImageElement): New method updateSnapshotInfo.
2232
2233         * page/FrameView.cpp:
2234         (WebCore::FrameView::addWidgetToUpdate): Change RenderEmbeddedObject* to RenderObject*.
2235         (WebCore::FrameView::removeWidgetToUpdate): Ditto
2236         (WebCore::FrameView::updateWidget): Branch based on EmbeddedObject vs SnapshottedPlugIn. Call
2237             plugin snapshot update if necessary.
2238         (WebCore::FrameView::updateWidgets): Handle both EmbeddedObject and SnapshottedPlugIn cases.
2239         * page/FrameView.h: Change RenderEmbeddedObject* to RenderObject* for post layout widget updates.
2240
2241         * rendering/RenderSnapshottedPlugIn.cpp:
2242         (WebCore::RenderSnapshottedPlugIn::layout): New virtual override. If size has changed, ask the
2243             FrameView to recalculate size after layout.
2244         * rendering/RenderSnapshottedPlugIn.h: New layout() method.
2245
2246 2013-02-12  Mike West  <mkwst@chromium.org>
2247
2248         Implement script MIME restrictions for X-Content-Type-Options: nosniff
2249         https://bugs.webkit.org/show_bug.cgi?id=71851
2250
2251         Reviewed by Adam Barth.
2252
2253         This patch adds support for 'X-Content-Type-Options: nosniff' when
2254         deciding whether or not to execute a given chunk of JavaScript. If the
2255         header is present, script will only execute if it matches a predefined
2256         set of MIME types[1] that are deemed "executable". Scripts served with
2257         types that don't match the list will not execute.
2258
2259         IE introduced this feature, and Gecko is working on an implementation[2]
2260         now. There's been some discussion on the WHATWG list about formalizing
2261         the specification for this feature[3], but nothing significant has been
2262         decided.
2263
2264         This implementation's list of acceptible MIME types differs from IE's:
2265         it matches the list of supported JavaScript MIME types defined in
2266         MIMETypeRegistry::initializeSupportedJavaScriptMIMETypes()[4]. In
2267         particular, the VBScript types are not accepted, and
2268         'text/javascript1.{1,2,3}' are accepted, along with 'text/livescript'.
2269
2270         This feature is locked tightly behind the ENABLE_NOSNIFF flag, which is
2271         currently only enabled on the Chromium port.
2272
2273         [1]: http://msdn.microsoft.com/en-us/library/gg622941(v=vs.85).aspx
2274         [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=471020
2275         [3]: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-November/037974.html
2276         [4]: http://trac.webkit.org/browser/trunk/Source/WebCore/platform/MIMETypeRegistry.cpp?rev=142086#L307
2277
2278         Tests: http/tests/security/contentTypeOptions/invalid-content-type-options-allowed.html
2279                http/tests/security/contentTypeOptions/nosniff-script-allowed.html
2280                http/tests/security/contentTypeOptions/nosniff-script-blocked.html
2281                http/tests/security/contentTypeOptions/nosniff-script-without-content-type-allowed.html
2282
2283         * dom/ScriptElement.cpp:
2284         (WebCore::ScriptElement::executeScript):
2285             Before executing script, ensure that it shouldn't be blocked due to
2286             its MIME type. If it is blocked, write an error message to the
2287             console.
2288         * loader/cache/CachedScript.cpp:
2289         (WebCore::CachedScript::mimeType):
2290             Make scripts' MIME type available outside the context of
2291             CachedScript in order to correctly populate error messages we write
2292             to the console in ScriptElement::executeScript
2293         (WebCore):
2294         (WebCore::CachedScript::mimeTypeAllowedByNosniff):
2295         * loader/cache/CachedScript.h:
2296         (CachedScript):
2297             A new method which checks the resource's HTTP headers to set the
2298             'nosniff' disposition, and compares the resource's MIME type against
2299             the list of allowed executable types. Returns true iff the script
2300             is allowed.
2301         * platform/network/HTTPParsers.cpp:
2302         (WebCore):
2303         (WebCore::parseContentTypeOptionsHeader):
2304         * platform/network/HTTPParsers.h:
2305             Adds a new enum which relates the sniffable status of the resource,
2306             and a method to parse the HTTP header.
2307
2308 2013-02-12  Adam Barth  <abarth@webkit.org>
2309
2310         Threaded HTML parser should pass the remaining fast/tokenizer tests
2311         https://bugs.webkit.org/show_bug.cgi?id=109607
2312
2313         Reviewed by Eric Seidel.
2314
2315         This patch fixes some edge cases involving document.write. Previously,
2316         we would drop input characters on the floor if the tokenizer wasn't
2317         able to consume them synchronously. In this patch, we send the unparsed
2318         characters to the background thread for consumption after rewinding the
2319         input stream.
2320
2321         * html/parser/BackgroundHTMLInputStream.cpp:
2322         (WebCore::BackgroundHTMLInputStream::rewindTo):
2323         * html/parser/BackgroundHTMLInputStream.h:
2324         (BackgroundHTMLInputStream):
2325         * html/parser/BackgroundHTMLParser.cpp:
2326         (WebCore::BackgroundHTMLParser::resumeFrom):
2327         * html/parser/BackgroundHTMLParser.h:
2328         (Checkpoint):
2329         * html/parser/HTMLDocumentParser.cpp:
2330         (WebCore::HTMLDocumentParser::canTakeNextToken):
2331         (WebCore::HTMLDocumentParser::didFailSpeculation):
2332         (WebCore::HTMLDocumentParser::pumpTokenizer):
2333         (WebCore::HTMLDocumentParser::finish):
2334         * html/parser/HTMLInputStream.h:
2335         (WebCore::HTMLInputStream::closeWithoutMarkingEndOfFile):
2336         (HTMLInputStream):
2337
2338 2013-02-12  Csaba Osztrogon√°c  <ossy@webkit.org>
2339
2340         Unreviewed buildfix for !ENABLE(INSPECTOR) platforms after r142654.
2341
2342         * inspector/InspectorInstrumentation.h:
2343         (WebCore::InspectorInstrumentation::scriptsEnabled):
2344
2345 2013-02-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2346
2347         Remove remaining traces of Web Intents
2348         https://bugs.webkit.org/show_bug.cgi?id=109586
2349
2350         Reviewed by Eric Seidel.
2351
2352         Remove remaining traces of Web Intents as the functionality was
2353         removed in r142549.
2354
2355         No new tests, no behavior change for layout tests.
2356
2357         * GNUmakefile.features.am.in:
2358         * html/HTMLTagNames.in:
2359
2360 2013-02-12  Robert Hogan  <robert@webkit.org>
2361
2362         REGRESSION(r136967): Combination of float and clear yields to bad layout
2363         https://bugs.webkit.org/show_bug.cgi?id=109476
2364
2365         Reviewed by Levi Weintraub.
2366
2367         Test: fast/block/margin-collapse/self-collapsing-block-with-float-children.html
2368
2369         The change made at http://trac.webkit.org/changeset/136967 only needs to worry about the first floated
2370         child of a self-collapsing block. The ones that follow are not affected by its margins.
2371
2372         * rendering/RenderBlockLineLayout.cpp:
2373         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
2374
2375 2013-02-12  Levi Weintraub  <leviw@chromium.org>
2376
2377         ASSERTION FAILED: !object || object->isBox(), UNKNOWN in WebCore::RenderListItem::positionListMarker
2378         https://bugs.webkit.org/show_bug.cgi?id=108699
2379
2380         Reviewed by Abhishek Arya.
2381
2382         RenderListItems performs special management of its children to maintain list markers. Splitting a flow
2383         through a list item results in assumptions made inside RenderListItem failing, so for now, avoid splitting
2384         flows when inside one.
2385
2386         Test: fast/multicol/span/list-multi-column-crash.html
2387
2388         * rendering/RenderBlock.cpp:
2389         (WebCore::RenderBlock::containingColumnsBlock):
2390
2391 2013-02-12  Roger Fong  <roger_fong@apple.com>
2392
2393         Unreviewed Windows build fix.
2394
2395         * testing/Internals.cpp:
2396         (WebCore::Internals::resetToConsistentState):
2397         (WebCore::Internals::Internals):
2398
2399 2013-02-12  Vivek Galatage  <vivek.vg@samsung.com>
2400
2401         Web Inspector: JavaScript execution disabled by browser/UA should be notified to the front-end
2402         https://bugs.webkit.org/show_bug.cgi?id=109402
2403
2404         Reviewed by Yury Semikhatsky.
2405
2406         Whenever the UA/Browser changes the Script Execution state of a page, it should notify the
2407         inspector front-end. Added the InspectorInstrumentation method didScriptExecutionStateChange
2408         to achieve this. Also the state change triggered by the inspector should be ignored to avoid
2409         infinite loop.
2410
2411         Test: inspector/script-execution-state-change-notification.html
2412
2413         * inspector/Inspector.json:
2414         * inspector/InspectorInstrumentation.cpp:
2415         (WebCore):
2416         (WebCore::InspectorInstrumentation::scriptsEnabledImpl):
2417         * inspector/InspectorInstrumentation.h:
2418         (InspectorInstrumentation):
2419         (WebCore::InspectorInstrumentation::scriptsEnabled):
2420         (WebCore):
2421         * inspector/InspectorPageAgent.cpp:
2422         (WebCore::InspectorPageAgent::InspectorPageAgent):
2423         (WebCore::InspectorPageAgent::setScriptExecutionDisabled):
2424         (WebCore::InspectorPageAgent::scriptsEnabled):
2425         (WebCore):
2426         * inspector/InspectorPageAgent.h:
2427         (InspectorPageAgent):
2428         * inspector/front-end/ResourceTreeModel.js:
2429         (WebInspector.PageDispatcher.prototype.javascriptDialogClosed):
2430         (WebInspector.PageDispatcher.prototype.scriptsEnabled):
2431         * page/Settings.cpp:
2432         (WebCore::Settings::setScriptEnabled):
2433
2434 2013-02-12  Antti Koivisto  <antti@apple.com>
2435
2436         Cache timer heap pointer to timers
2437         https://bugs.webkit.org/show_bug.cgi?id=109597
2438
2439         Reviewed by Andreas Kling.
2440
2441         Accessing timer heap through thread global storage is slow (~0.1% in PLT3). We can cache the heap pointer to
2442         each TimerBase. There are not huge numbers of timers around so memory is not an issue and many timers are heavily reused.
2443
2444         * platform/Timer.cpp:
2445         (WebCore::threadGlobalTimerHeap):
2446         (WebCore::TimerHeapReference::operator=):
2447         (WebCore::TimerHeapIterator::checkConsistency):
2448         (WebCore::TimerBase::TimerBase):
2449         (WebCore::TimerBase::checkHeapIndex):
2450         (WebCore::TimerBase::setNextFireTime):
2451         * platform/Timer.h:
2452         (WebCore::TimerBase::timerHeap):
2453         (TimerBase):
2454
2455 2013-02-12  Adam Barth  <abarth@webkit.org>
2456
2457         BackgroundHTMLParser::resumeFrom should take a struct
2458         https://bugs.webkit.org/show_bug.cgi?id=109598
2459
2460         Reviewed by Eric Seidel.
2461
2462         This patch is purely a syntatic change that paves the way for fixing
2463         the partial-entity document.write tests. To fix those tests, we'll need
2464         to pass more information to resumeFrom, but we're hitting the argument
2465         limits in Functional.h. Rather than adding yet more arguments, this
2466         patch moves to a single argument that's a struct.
2467
2468         * html/parser/BackgroundHTMLParser.cpp:
2469         (WebCore::BackgroundHTMLParser::resumeFrom):
2470         * html/parser/BackgroundHTMLParser.h:
2471         (Checkpoint):
2472         (BackgroundHTMLParser):
2473         * html/parser/HTMLDocumentParser.cpp:
2474         (WebCore::HTMLDocumentParser::didFailSpeculation):
2475
2476 2013-02-12  Elliott Sprehn  <esprehn@chromium.org>
2477
2478         rootRenderer in FrameView is really RenderView
2479         https://bugs.webkit.org/show_bug.cgi?id=109510
2480
2481         Reviewed by Eric Seidel.
2482
2483         The global function rootRenderer(FrameView*) is really just a way
2484         to get the RenderView from the Frame so replace it with a renderView()
2485         method and replace usage of the word "root" with renderView so it's
2486         obvious the root we're talking about is the renderView. This is an
2487         important distinction to make since we also have rootRenderer in the code
2488         for the documentElement()'s renderer and we also have a "layout root" which
2489         is entirely different.
2490
2491         No new tests, just refactoring.
2492
2493         * page/FrameView.cpp:
2494         (WebCore::FrameView::rootRenderer): Removed.
2495         (WebCore::FrameView::setFrameRect):
2496         (WebCore::FrameView::adjustViewSize):
2497         (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
2498         (WebCore::FrameView::updateCompositingLayersAfterLayout):
2499         (WebCore::FrameView::clearBackingStores):
2500         (WebCore::FrameView::restoreBackingStores):
2501         (WebCore::FrameView::usesCompositedScrolling):
2502         (WebCore::FrameView::layerForHorizontalScrollbar):
2503         (WebCore::FrameView::layerForVerticalScrollbar):
2504         (WebCore::FrameView::layerForScrollCorner):
2505         (WebCore::FrameView::tiledBacking):
2506         (WebCore::FrameView::scrollLayerID):
2507         (WebCore::FrameView::layerForOverhangAreas):
2508         (WebCore::FrameView::flushCompositingStateForThisFrame):
2509         (WebCore::FrameView::hasCompositedContent):
2510         (WebCore::FrameView::enterCompositingMode):
2511         (WebCore::FrameView::isSoftwareRenderable):
2512         (WebCore::FrameView::didMoveOnscreen):
2513         (WebCore::FrameView::willMoveOffscreen):
2514         (WebCore::FrameView::layout):
2515         (WebCore::FrameView::embeddedContentBox):
2516         (WebCore::FrameView::contentsInCompositedLayer):
2517         (WebCore::FrameView::scrollContentsFastPath):
2518         (WebCore::FrameView::scrollContentsSlowPath):
2519         (WebCore::FrameView::maintainScrollPositionAtAnchor):
2520         (WebCore::FrameView::scrollPositionChanged):
2521         (WebCore::FrameView::repaintFixedElementsAfterScrolling):
2522         (WebCore::FrameView::updateFixedElementsAfterScrolling):
2523         (WebCore::FrameView::visibleContentsResized):
2524         (WebCore::FrameView::scheduleRelayoutOfSubtree):
2525         (WebCore::FrameView::needsLayout):
2526         (WebCore::FrameView::setNeedsLayout):
2527         (WebCore::FrameView::performPostLayoutTasks):
2528         (WebCore::FrameView::updateControlTints):
2529         (WebCore::FrameView::paintContents):
2530         (WebCore::FrameView::forceLayoutForPagination):
2531         (WebCore::FrameView::adjustPageHeightDeprecated):
2532         (WebCore::FrameView::resetTrackedRepaints):
2533         (WebCore::FrameView::isVerticalDocument):
2534         (WebCore::FrameView::isFlippedDocument):
2535         * page/FrameView.h:
2536         (WebCore::FrameView::renderView): Added.
2537
2538 2013-02-12  Tomas Popela  <tpopela@redhat.com>
2539
2540         [GTK][Introspection] GObject bindings for DataTransferItemList - one add() method must be removed from .idl
2541         https://bugs.webkit.org/show_bug.cgi?id=109180
2542
2543         Reviewed by Xan Lopez.
2544
2545         When compiling WebKit with --enable-introspection and generating GObject bindings
2546         for DataTransferItemList we must disable one add() method, because GObject is
2547         based on C and C does not allow two functions with the same name.
2548
2549         No tests needed.
2550
2551         * bindings/scripts/CodeGeneratorGObject.pm:
2552
2553 2013-02-12  Uday Kiran  <udaykiran@motorola.com>
2554
2555         Background size width specified in viewport percentage units not working
2556         https://bugs.webkit.org/show_bug.cgi?id=109536
2557
2558         Reviewed by Antti Koivisto.
2559
2560         Corrected the check for viewport percentage unit while calculating
2561         background image width.
2562
2563         Test: fast/backgrounds/size/backgroundSize-viewportPercentage-width.html
2564
2565         * rendering/RenderBoxModelObject.cpp:
2566         (WebCore::RenderBoxModelObject::calculateFillTileSize):
2567
2568 2013-02-12  Abhishek Arya  <inferno@chromium.org>
2569
2570         Heap-use-after-free in WebCore::DeleteButtonController::enable
2571         https://bugs.webkit.org/show_bug.cgi?id=109447
2572
2573         Reviewed by Ryosuke Niwa.
2574
2575         RefPtr frame pointer since it can get deleted due to mutation events
2576         fired inside AppendNodeCommand::doUnapply.
2577
2578         No new tests. Testcase is hard to minimize due to recursive
2579         calls with DOMNodeRemovedFromDocument mutation event.
2580
2581         * editing/CompositeEditCommand.cpp:
2582         (WebCore::EditCommandComposition::unapply):
2583         (WebCore::EditCommandComposition::reapply):
2584
2585 2013-02-12  Eric Seidel  <eric@webkit.org>
2586
2587         Remove HTMLTokenTypes header (and split out AtomicHTMLToken.h from HTMLToken.h)
2588         https://bugs.webkit.org/show_bug.cgi?id=109525
2589
2590         Reviewed by Adam Barth.
2591
2592         We no longer need a separate HTMLTokenTypes class now that NEW_XML is gone.
2593         However, to remove HTMLTokenTypes, I had to split AtomicHTMLToken.h from
2594         HTMLToken.h (to fix a circular dependancy).
2595
2596         * GNUmakefile.list.am:
2597         * Target.pri:
2598         * WebCore.gypi:
2599         * WebCore.vcproj/WebCore.vcproj:
2600         * WebCore.vcxproj/WebCore.vcxproj:
2601         * WebCore.vcxproj/WebCore.vcxproj.filters:
2602         * WebCore.xcodeproj/project.pbxproj:
2603         * html/HTMLViewSourceDocument.cpp:
2604         (WebCore::HTMLViewSourceDocument::addSource):
2605         * html/parser/AtomicHTMLToken.h: Added.
2606         (WebCore):
2607         (AtomicHTMLToken):
2608         (WebCore::AtomicHTMLToken::create):
2609         (WebCore::AtomicHTMLToken::forceQuirks):
2610         (WebCore::AtomicHTMLToken::type):
2611         (WebCore::AtomicHTMLToken::name):
2612         (WebCore::AtomicHTMLToken::setName):
2613         (WebCore::AtomicHTMLToken::selfClosing):
2614         (WebCore::AtomicHTMLToken::getAttributeItem):
2615         (WebCore::AtomicHTMLToken::attributes):
2616         (WebCore::AtomicHTMLToken::characters):
2617         (WebCore::AtomicHTMLToken::charactersLength):
2618         (WebCore::AtomicHTMLToken::isAll8BitData):
2619         (WebCore::AtomicHTMLToken::comment):
2620         (WebCore::AtomicHTMLToken::publicIdentifier):
2621         (WebCore::AtomicHTMLToken::systemIdentifier):
2622         (WebCore::AtomicHTMLToken::clearExternalCharacters):
2623         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
2624         (WebCore::AtomicHTMLToken::initializeAttributes):
2625         * html/parser/BackgroundHTMLParser.cpp:
2626         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
2627         * html/parser/CompactHTMLToken.cpp:
2628         (WebCore::CompactHTMLToken::CompactHTMLToken):
2629         * html/parser/CompactHTMLToken.h:
2630         (WebCore::CompactHTMLToken::type):
2631         * html/parser/HTMLConstructionSite.cpp:
2632         (WebCore::HTMLConstructionSite::insertDoctype):
2633         (WebCore::HTMLConstructionSite::insertComment):
2634         (WebCore::HTMLConstructionSite::insertCommentOnDocument):
2635         (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
2636         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
2637         (WebCore::HTMLConstructionSite::insertForeignElement):
2638         * html/parser/HTMLDocumentParser.cpp:
2639         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
2640         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
2641         * html/parser/HTMLDocumentParser.h:
2642         * html/parser/HTMLMetaCharsetParser.cpp:
2643         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
2644         * html/parser/HTMLPreloadScanner.cpp:
2645         (WebCore::isStartTag):
2646         (WebCore::isStartOrEndTag):
2647         (WebCore::HTMLPreloadScanner::processToken):
2648         * html/parser/HTMLSourceTracker.cpp:
2649         (WebCore::HTMLSourceTracker::start):
2650         (WebCore::HTMLSourceTracker::sourceForToken):
2651         * html/parser/HTMLStackItem.h:
2652         (WebCore::HTMLStackItem::HTMLStackItem):
2653         * html/parser/HTMLToken.h:
2654         (WebCore::HTMLToken::clear):
2655         (WebCore::HTMLToken::isUninitialized):
2656         (WebCore::HTMLToken::type):
2657         (WebCore::HTMLToken::makeEndOfFile):
2658         (WebCore::HTMLToken::data):
2659         (WebCore::HTMLToken::name):
2660         (WebCore::HTMLToken::appendToName):
2661         (WebCore::HTMLToken::forceQuirks):
2662         (WebCore::HTMLToken::setForceQuirks):
2663         (WebCore::HTMLToken::beginDOCTYPE):
2664         (WebCore::HTMLToken::publicIdentifier):
2665         (WebCore::HTMLToken::systemIdentifier):
2666         (WebCore::HTMLToken::setPublicIdentifierToEmptyString):
2667         (WebCore::HTMLToken::setSystemIdentifierToEmptyString):
2668         (WebCore::HTMLToken::appendToPublicIdentifier):
2669         (WebCore::HTMLToken::appendToSystemIdentifier):
2670         (WebCore::HTMLToken::selfClosing):
2671         (WebCore::HTMLToken::setSelfClosing):
2672         (WebCore::HTMLToken::beginStartTag):
2673         (WebCore::HTMLToken::beginEndTag):
2674         (WebCore::HTMLToken::addNewAttribute):
2675         (WebCore::HTMLToken::appendToAttributeName):
2676         (WebCore::HTMLToken::appendToAttributeValue):
2677         (WebCore::HTMLToken::attributes):
2678         (WebCore::HTMLToken::eraseValueOfAttribute):
2679         (WebCore::HTMLToken::ensureIsCharacterToken):
2680         (WebCore::HTMLToken::characters):
2681         (WebCore::HTMLToken::appendToCharacter):
2682         (WebCore::HTMLToken::comment):
2683         (WebCore::HTMLToken::beginComment):
2684         (WebCore::HTMLToken::appendToComment):
2685         (WebCore::HTMLToken::eraseCharacters):
2686         (HTMLToken):
2687         * html/parser/HTMLTokenTypes.h: Removed.
2688         * html/parser/HTMLTokenizer.cpp:
2689         (WebCore::AtomicHTMLToken::usesName):
2690         (WebCore::AtomicHTMLToken::usesAttributes):
2691         (WebCore::HTMLTokenizer::flushBufferedEndTag):
2692         (WebCore::HTMLTokenizer::nextToken):
2693         * html/parser/HTMLTokenizer.h:
2694         (WebCore::HTMLTokenizer::saveEndTagNameIfNeeded):
2695         (WebCore::HTMLTokenizer::haveBufferedCharacterToken):
2696         * html/parser/HTMLTreeBuilder.cpp:
2697         (WebCore::HTMLTreeBuilder::processToken):
2698         (WebCore::HTMLTreeBuilder::processDoctypeToken):
2699         (WebCore::HTMLTreeBuilder::processFakeStartTag):
2700         (WebCore::HTMLTreeBuilder::processFakeEndTag):
2701         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
2702         (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
2703         (WebCore):
2704         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
2705         (WebCore::HTMLTreeBuilder::processStartTagForInTable):
2706         (WebCore::HTMLTreeBuilder::processStartTag):
2707         (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
2708         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
2709         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
2710         (WebCore::HTMLTreeBuilder::processEndTagForInRow):
2711         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
2712         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
2713         (WebCore::HTMLTreeBuilder::processEndTagForInTable):
2714         (WebCore::HTMLTreeBuilder::processEndTag):
2715         (WebCore::HTMLTreeBuilder::processComment):
2716         (WebCore::HTMLTreeBuilder::processCharacter):
2717         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
2718         (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
2719         (WebCore::HTMLTreeBuilder::defaultForInHead):
2720         (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
2721         (WebCore::HTMLTreeBuilder::defaultForAfterHead):
2722         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
2723         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
2724         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
2725         (WebCore::HTMLTreeBuilder::processScriptStartTag):
2726         (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
2727         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
2728         * html/parser/HTMLViewSourceParser.cpp:
2729         (WebCore::HTMLViewSourceParser::updateTokenizerState):
2730         * html/parser/TextDocumentParser.cpp:
2731         (WebCore::TextDocumentParser::insertFakePreElement):
2732         * html/parser/XSSAuditor.cpp:
2733         (WebCore::XSSAuditor::filterToken):
2734         (WebCore::XSSAuditor::filterScriptToken):
2735         (WebCore::XSSAuditor::filterObjectToken):
2736         (WebCore::XSSAuditor::filterParamToken):
2737         (WebCore::XSSAuditor::filterEmbedToken):
2738         (WebCore::XSSAuditor::filterAppletToken):
2739         (WebCore::XSSAuditor::filterIframeToken):
2740         (WebCore::XSSAuditor::filterMetaToken):
2741         (WebCore::XSSAuditor::filterBaseToken):
2742         (WebCore::XSSAuditor::filterFormToken):
2743
2744 2013-02-12  Pablo Flouret  <pablof@motorola.com>
2745
2746         Handle error recovery in @supports
2747         https://bugs.webkit.org/show_bug.cgi?id=103934
2748
2749         Reviewed by Antti Koivisto.
2750
2751         Tests 021, 024, 031, and 033 in
2752         http://hg.csswg.org/test/file/5f94e4b03ed9/contributors/opera/submitted/css3-conditional
2753         fail because there's no explicit error recovery in @support's grammar.
2754         Opera and Firefox pass the tests.
2755
2756         No new tests, modified css3/supports{,-cssom}.html
2757
2758         * css/CSSGrammar.y.in:
2759         * css/CSSParser.cpp:
2760         (WebCore::CSSParser::createSupportsRule):
2761         (WebCore::CSSParser::markSupportsRuleHeaderEnd):
2762         (WebCore::CSSParser::popSupportsRuleData):
2763         * css/CSSParser.h:
2764
2765 2013-02-12  Eric Carlson  <eric.carlson@apple.com>
2766
2767         [Mac] guard against NULL languages array
2768         https://bugs.webkit.org/show_bug.cgi?id=109595
2769
2770         Reviewed by Dean Jackson.
2771
2772         No new tests, existing tests won't crash if this is correct.
2773
2774         * page/CaptionUserPreferencesMac.mm:
2775         (WebCore::CaptionUserPreferencesMac::preferredLanguages):
2776
2777 2013-02-12  Emil A Eklund  <eae@chromium.org>
2778
2779         TransformState::move should not round offset to int
2780         https://bugs.webkit.org/show_bug.cgi?id=108266
2781
2782         Reviewed by Simon Fraser.
2783         
2784         Currently TransformState::move rounds the offset to the nearest
2785         integer values, this results in operations using TransformState
2786         to compute a position to misreport the location, specifically
2787         Element:getBoundingClientRect and repaint rects. Sizes are
2788         handled correctly and do not have the same problem.
2789
2790         Tests: fast/sub-pixel/boundingclientrect-subpixel-margin.html
2791                fast/sub-pixel/clip-rect-box-consistent-rounding.html
2792
2793         * page/FrameView.cpp:
2794         (WebCore::FrameView::convertFromRenderer):
2795         Change to use pixel snapping instead of enclosing box. All other
2796         code paths use pixelSnappedIntRect to align the rects to device
2797         pixels however this used enclosingIntRect (indirectly through
2798         the FloatQuad::enclosingBoundingBox call).
2799         Without the rounding in TransformState this causes repaint rects
2800         for elements on subpixel bounds to be too large by up to one
2801         pixel on each axis. For normal repaints this isn't really a
2802         problem but in scrollContentsSlowPath it can result in moving
2803         too large a rect.
2804
2805         * platform/graphics/transforms/TransformState.cpp:
2806         (WebCore::TransformState::translateTransform):
2807         (WebCore::TransformState::translateMappedCoordinates):
2808         Change to take a LayoutSize instead of an IntSize.
2809
2810         (WebCore::TransformState::move):
2811         (WebCore::TransformState::applyAccumulatedOffset):
2812         * platform/graphics/transforms/TransformState.h:
2813         Remove rounding logic and use original, more precise, value.
2814
2815         * rendering/RenderGeometryMap.cpp:
2816         (WebCore::RenderGeometryMap::mapToContainer):
2817         Remove rounding logic and use original, more precise, value.
2818
2819 2013-02-12  Jessie Berlin  <jberlin@apple.com>
2820
2821         Rollout r142618, it broke all the Mac builds.
2822
2823         * inspector/HeapGraphSerializer.cpp:
2824         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
2825         (WebCore::HeapGraphSerializer::pushUpdate):
2826         (WebCore::HeapGraphSerializer::reportNode):
2827         (WebCore::HeapGraphSerializer::toNodeId):
2828         (WebCore::HeapGraphSerializer::addRootNode):
2829         * inspector/HeapGraphSerializer.h:
2830         (WebCore):
2831         (HeapGraphSerializer):
2832         * inspector/InspectorMemoryAgent.cpp:
2833         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
2834
2835 2013-02-12  Rafael Weinstein  <rafaelw@chromium.org>
2836
2837         [HTMLTemplateElement] <template> inside of <head> may not create <body> if EOF is hit
2838         https://bugs.webkit.org/show_bug.cgi?id=109338
2839
2840         Reviewed by Adam Barth.
2841
2842         This patch adds the logic to clear the stack of open elements back to the first <template> when EOF
2843         is hit. This allows a <body> to be generated if the initial <template> was opened inside of <head>.
2844
2845         Tests added to html5lib.
2846
2847         * html/parser/HTMLTreeBuilder.cpp:
2848         (WebCore):
2849         (WebCore::HTMLTreeBuilder::popAllTemplates):
2850         (WebCore::HTMLTreeBuilder::processEndTag):
2851         (WebCore::HTMLTreeBuilder::processEndOfFile):
2852         * html/parser/HTMLTreeBuilder.h:
2853         (HTMLTreeBuilder):
2854
2855 2013-02-12  Dominic Mazzoni  <dmazzoni@google.com>
2856
2857         ASSERTION FAILED: i < size(), UNKNOWN in WebCore::AccessibilityMenuListPopup::didUpdateActiveOption
2858         https://bugs.webkit.org/show_bug.cgi?id=109452
2859
2860         Reviewed by Chris Fleizach.
2861
2862         Send the accessibility childrenChanged notification in
2863         HTMLSelectElement::setRecalcListItems instead of in childrenChanged
2864         so that all possible codepaths are caught.
2865
2866         Test: accessibility/insert-selected-option-into-select-causes-crash.html
2867
2868         * html/HTMLSelectElement.cpp:
2869         (WebCore::HTMLSelectElement::childrenChanged):
2870         (WebCore::HTMLSelectElement::setRecalcListItems):
2871
2872 2013-02-12  Peter Rybin  <prybin@chromium.org>
2873
2874         Web Inspector: for event listener provide handler function value in protocol and in UI
2875         https://bugs.webkit.org/show_bug.cgi?id=109284
2876
2877         Reviewed by Yury Semikhatsky.
2878
2879         The feature implies that we include a real handler function value into event listener description.
2880         Protocol description, inspector DOM agent (with V8 and JSC backends) and front-end is patched accordingly.
2881
2882         * bindings/js/ScriptEventListener.cpp:
2883         (WebCore::eventListenerHandler):
2884         (WebCore):
2885         (WebCore::eventListenerHandlerScriptState):
2886         * bindings/js/ScriptEventListener.h:
2887         (WebCore):
2888         * bindings/v8/ScriptEventListener.cpp:
2889         (WebCore::eventListenerHandler):
2890         (WebCore):
2891         (WebCore::eventListenerHandlerScriptState):
2892         * bindings/v8/ScriptEventListener.h:
2893         (WebCore):
2894         * inspector/Inspector.json:
2895         * inspector/InspectorDOMAgent.cpp:
2896         (WebCore::InspectorDOMAgent::getEventListenersForNode):
2897         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2898         * inspector/InspectorDOMAgent.h:
2899         (InspectorDOMAgent):
2900         * inspector/front-end/DOMAgent.js:
2901         (WebInspector.DOMNode.prototype.eventListeners):
2902         * inspector/front-end/EventListenersSidebarPane.js:
2903         (WebInspector.EventListenersSidebarPane.prototype.update):
2904         (.):
2905
2906 2013-02-12  Yury Semikhatsky  <yurys@chromium.org>
2907
2908         Web Inspector: add initial implementation of native memory graph to Timeline
2909         https://bugs.webkit.org/show_bug.cgi?id=109578
2910
2911         Reviewed by Alexander Pavlov.
2912
2913         This change adds inital implementation of native memory graph UI. The graph
2914         will be shown in the same place as DOM counters graph on the Timeline panel.
2915
2916         Added NativeMemoryGraph.js that reuses parts of DOM counters graph
2917         implementation. MemoryStatistics.js was refactor to allow sharing
2918         more code between DOM counters and native memory graph.
2919
2920         * WebCore.gypi:
2921         * WebCore.vcproj/WebCore.vcproj:
2922         * inspector/compile-front-end.py:
2923         * inspector/front-end/MemoryStatistics.js:
2924         (WebInspector.MemoryStatistics):
2925         (WebInspector.MemoryStatistics.prototype._createCurrentValuesBar):
2926         (WebInspector.MemoryStatistics.prototype._createCounterUIList):
2927         (WebInspector.MemoryStatistics.prototype._createCounterUIList.getNodeCount):
2928         (WebInspector.MemoryStatistics.prototype._createCounterUIList.getListenerCount):
2929         (WebInspector.MemoryStatistics.prototype._canvasHeight):
2930         (WebInspector.MemoryStatistics.prototype._updateSize):
2931         (WebInspector.MemoryStatistics.prototype._highlightCurrentPositionOnGraphs):
2932         (WebInspector.MemoryStatistics.prototype._drawMarker):
2933         * inspector/front-end/NativeMemoryGraph.js: Added.
2934         (WebInspector.NativeMemoryGraph):
2935         (WebInspector.NativeMemoryCounterUI):
2936         (WebInspector.NativeMemoryCounterUI.prototype._hslToString):
2937         (WebInspector.NativeMemoryCounterUI.prototype.updateCurrentValue):
2938         (WebInspector.NativeMemoryCounterUI.prototype.clearCurrentValueAndMarker):
2939         (WebInspector.NativeMemoryGraph.prototype._createCurrentValuesBar):
2940         (WebInspector.NativeMemoryGraph.prototype._createCounterUIList.getCounterValue):
2941         (WebInspector.NativeMemoryGraph.prototype._createCounterUIList):
2942         (WebInspector.NativeMemoryGraph.prototype._canvasHeight):
2943         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
2944         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
2945         (WebInspector.NativeMemoryGraph.prototype._draw):
2946         (WebInspector.NativeMemoryGraph.prototype._clearCurrentValueAndMarker):
2947         (WebInspector.NativeMemoryGraph.prototype._updateCurrentValue):
2948         (WebInspector.NativeMemoryGraph.prototype._restoreImageUnderMarker):
2949         (WebInspector.NativeMemoryGraph.prototype._saveImageUnderMarker):
2950         (WebInspector.NativeMemoryGraph.prototype._drawMarker):
2951         (WebInspector.NativeMemoryGraph.prototype._maxCounterValue):
2952         (WebInspector.NativeMemoryGraph.prototype._resetTotalValues):
2953         (WebInspector.NativeMemoryGraph.prototype.valueGetter):
2954         (WebInspector.NativeMemoryGraph.prototype._drawGraph):
2955         (WebInspector.NativeMemoryGraph.prototype._discardImageUnderMarker):
2956         * inspector/front-end/TimelinePanel.js:
2957         * inspector/front-end/WebKit.qrc:
2958         * inspector/front-end/timelinePanel.css:
2959         (#memory-graphs-canvas-container.dom-counters .resources-dividers):
2960         (.memory-category-value):
2961
2962 2013-02-12  Andrey Lushnikov  <lushnikov@chromium.org>
2963
2964         Web Inspector: refactor some reusable functionality from BraceHighlighter
2965         https://bugs.webkit.org/show_bug.cgi?id=109574
2966
2967         Reviewed by Pavel Feldman.
2968
2969         New test: inspector/editor/text-editor-brace-highlighter.html
2970
2971         Extract functionality which, for given line and cursor position, will
2972         return position for a brace that should be highlighted. Add a layout
2973         test to verify brace highlighter funcionality.
2974
2975         * inspector/front-end/DefaultTextEditor.js:
2976         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.activeBraceColumnForCursorPosition):
2977         (WebInspector.TextEditorMainPanel.BraceHighlightController.prototype.handleSelectionChange):
2978         * inspector/front-end/TextUtils.js:
2979         (WebInspector.TextUtils.isOpeningBraceChar):
2980         (WebInspector.TextUtils.isClosingBraceChar):
2981         (WebInspector.TextUtils.isBraceChar):
2982
2983 2013-02-12  Ilya Tikhonovsky  <loislo@chromium.org>
2984
2985         Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
2986         https://bugs.webkit.org/show_bug.cgi?id=109554
2987
2988         In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
2989         can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
2990
2991         Drive by fix: I introduced a client interface for the HeapGraphSerializer.
2992         It helps me to do the tests for the serializer.
2993
2994         Reviewed by Yury Semikhatsky.
2995
2996         It is covered by newly added tests in TestWebKitAPI.
2997
2998         * inspector/HeapGraphSerializer.cpp:
2999         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
3000         (WebCore::HeapGraphSerializer::pushUpdate):
3001         (WebCore::HeapGraphSerializer::reportNode):
3002         (WebCore::HeapGraphSerializer::toNodeId):
3003         (WebCore::HeapGraphSerializer::addRootNode):
3004         * inspector/HeapGraphSerializer.h:
3005         (HeapGraphSerializerClient):
3006         (WebCore::HeapGraphSerializerClient::~HeapGraphSerializerClient):
3007         (HeapGraphSerializer):
3008         * inspector/InspectorMemoryAgent.cpp:
3009         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
3010
3011 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
3012
3013         Web Inspector: Introduce version controller to migrate settings versions.
3014         https://bugs.webkit.org/show_bug.cgi?id=109553
3015
3016         Reviewed by Yury Semikhatsky.
3017
3018         This patch introduces version controller that could be used to migrate inspector settings.
3019
3020         Test: inspector/version-controller.html
3021
3022         * inspector/front-end/Settings.js:
3023         (WebInspector.Settings):
3024         (WebInspector.VersionController):
3025         (WebInspector.VersionController.prototype.set _methodsToRunToUpdateVersion):
3026         (WebInspector.VersionController.prototype._updateVersionFrom0To1):
3027         * inspector/front-end/inspector.js:
3028
3029 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
3030
3031         Web Inspector: File system should produce more verbose error messages and recover from errors
3032         https://bugs.webkit.org/show_bug.cgi?id=109571
3033
3034         Reviewed by Alexander Pavlov.
3035
3036         Error handler prints original file system call params now.
3037         Added callbacks to error handler to recover from errors.
3038
3039         * inspector/front-end/FileSystemProjectDelegate.js:
3040         (WebInspector.FileSystemProjectDelegate.prototype.contentCallback):
3041         (WebInspector.FileSystemProjectDelegate.prototype.searchInFileContent):
3042         (WebInspector.FileSystemUtils.errorMessage):
3043         (.fileSystemLoaded):
3044         (.fileEntryLoaded):
3045         (.errorHandler):
3046         (WebInspector.FileSystemUtils.requestFileContent):
3047         (WebInspector.FileSystemUtils.setFileContent):
3048         (WebInspector.FileSystemUtils._readDirectory):
3049         (.innerCallback):
3050         (WebInspector.FileSystemUtils._requestEntries):
3051
3052 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
3053
3054         Web Inspector: Get rid of unnecessary complexity in FileSystemUtil: remove _getDirectory() method.
3055         https://bugs.webkit.org/show_bug.cgi?id=109567
3056
3057         Reviewed by Alexander Pavlov.
3058
3059         The code in this method was redundant as the same result could be achieved by using File System API directly.
3060
3061         * inspector/front-end/FileSystemProjectDelegate.js:
3062
3063 2013-02-12  Alexander Pavlov  <apavlov@chromium.org>
3064
3065         Web Inspector: [SuggestBox] SuggestBox not hidden when prefix is empty and there is preceding input
3066         https://bugs.webkit.org/show_bug.cgi?id=109568
3067
3068         Reviewed by Vsevolod Vlasov.
3069
3070         The suggestbox would get hidden in the case of empty input, yet it should get hidden
3071         in the case of empty user-entered prefix (which is a wider notion.)
3072
3073         * inspector/front-end/TextPrompt.js:
3074         (WebInspector.TextPrompt.prototype.complete):
3075
3076 2013-02-12  Andrey Lushnikov  <lushnikov@chromium.org>
3077
3078         Web Inspector: separate SuggestBox from TextPrompt
3079         https://bugs.webkit.org/show_bug.cgi?id=109430
3080
3081         Reviewed by Alexander Pavlov.
3082
3083         Create WebInspector.SuggestBoxDelegate interface and
3084         refactor TextPrompt to use this interface. Separate SuggestBox into
3085         WebInspector.SuggestBox namespace and put it into its own file.
3086
3087         No new tests: no change in behaviour.
3088
3089         * WebCore.gypi:
3090         * WebCore.vcproj/WebCore.vcproj:
3091         * inspector/compile-front-end.py:
3092         * inspector/front-end/SuggestBox.js: Added.
3093         (WebInspector.SuggestBoxDelegate):
3094         (WebInspector.SuggestBoxDelegate.prototype.applySuggestion):
3095         (WebInspector.SuggestBoxDelegate.prototype.acceptSuggestion):
3096         (WebInspector.SuggestBoxDelegate.prototype.userEnteredText):
3097         (WebInspector.SuggestBox):
3098         (WebInspector.SuggestBox.prototype.get visible):
3099         (WebInspector.SuggestBox.prototype.get hasSelection):
3100         (WebInspector.SuggestBox.prototype._onscrollresize):
3101         (WebInspector.SuggestBox.prototype._updateBoxPositionWithExistingAnchor):
3102         (WebInspector.SuggestBox.prototype._updateBoxPosition):
3103         (WebInspector.SuggestBox.prototype._onboxmousedown):
3104         (WebInspector.SuggestBox.prototype.hide):
3105         (WebInspector.SuggestBox.prototype.removeFromElement):
3106         (WebInspector.SuggestBox.prototype._applySuggestion):
3107         (WebInspector.SuggestBox.prototype.acceptSuggestion):
3108         (WebInspector.SuggestBox.prototype._selectClosest):
3109         (WebInspector.SuggestBox.prototype.updateSuggestions):
3110         (WebInspector.SuggestBox.prototype._onItemMouseDown):
3111         (WebInspector.SuggestBox.prototype._createItemElement):
3112         (WebInspector.SuggestBox.prototype._updateItems):
3113         (WebInspector.SuggestBox.prototype._selectItem):
3114         (WebInspector.SuggestBox.prototype._canShowBox):
3115         (WebInspector.SuggestBox.prototype._rememberRowCountPerViewport):
3116         (WebInspector.SuggestBox.prototype._completionsReady):
3117         (WebInspector.SuggestBox.prototype.upKeyPressed):
3118         (WebInspector.SuggestBox.prototype.downKeyPressed):
3119         (WebInspector.SuggestBox.prototype.pageUpKeyPressed):
3120         (WebInspector.SuggestBox.prototype.pageDownKeyPressed):
3121         (WebInspector.SuggestBox.prototype.enterKeyPressed):
3122         (WebInspector.SuggestBox.prototype.tabKeyPressed):
3123         * inspector/front-end/TextPrompt.js:
3124         (WebInspector.TextPrompt.prototype.userEnteredText):
3125         (WebInspector.TextPrompt.prototype._attachInternal):
3126         (WebInspector.TextPrompt.prototype._completionsReady):
3127         (WebInspector.TextPrompt.prototype.applySuggestion):
3128         (WebInspector.TextPrompt.prototype._applySuggestion):
3129         (WebInspector.TextPrompt.prototype.enterKeyPressed):
3130         (WebInspector.TextPrompt.prototype.upKeyPressed):
3131         (WebInspector.TextPrompt.prototype.downKeyPressed):
3132         (WebInspector.TextPrompt.prototype.pageUpKeyPressed):
3133         (WebInspector.TextPrompt.prototype.pageDownKeyPressed):
3134         * inspector/front-end/WebKit.qrc:
3135         * inspector/front-end/inspector.html:
3136
3137 2013-02-12  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
3138
3139         [TexMap] Apply frames-per-second debug counter to WK1.
3140         https://bugs.webkit.org/show_bug.cgi?id=109540
3141
3142         Reviewed by Noam Rosenthal.
3143
3144         Adds basysKom copyright info to TextureMapperFPSCounter header.
3145
3146         * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
3147         * platform/graphics/texmap/TextureMapperFPSCounter.h:
3148
3149 2013-02-12  Sheriff Bot  <webkit.review.bot@gmail.com>
3150
3151         Unreviewed, rolling out r142531.
3152         http://trac.webkit.org/changeset/142531
3153         https://bugs.webkit.org/show_bug.cgi?id=109569
3154
3155         Causes html5lib/run-template layout test to crash. (Requested
3156         by atwilson_ on #webkit).
3157
3158         * html/parser/HTMLTreeBuilder.cpp:
3159         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
3160         (WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup):
3161         (WebCore::HTMLTreeBuilder::processEndOfFile):
3162         * html/parser/HTMLTreeBuilder.h:
3163         (HTMLTreeBuilder):
3164
3165 2013-02-12  Zan Dobersek  <zdobersek@igalia.com>
3166
3167         [GTK] Enable CSS image-set support in development builds
3168         https://bugs.webkit.org/show_bug.cgi?id=109475
3169
3170         Reviewed by Martin Robinson.
3171
3172         No new tests - majority of the related tests now passes.
3173
3174         * GNUmakefile.features.am.in: Add the feature define for the CSS image-set feature
3175         with the define value defaulting to 0. The value gets overridden with 1 in development
3176         builds, meaning the feature is enabled under that configuration.
3177
3178 2013-02-12  Zan Dobersek  <zdobersek@igalia.com>
3179
3180         [GTK] Enable DOM4 events constructors in development builds
3181         https://bugs.webkit.org/show_bug.cgi?id=109471
3182
3183         Reviewed by Martin Robinson.
3184
3185         No new tests - the related tests now pass.
3186
3187         * GNUmakefile.features.am.in: Add the feature define for the DOM4 events
3188         constructors feature, its value defaulting to 0. This value is overridden
3189         with 1 in development builds, effectively enabling the feature.
3190
3191 2013-02-12  Zan Dobersek  <zdobersek@igalia.com>
3192
3193         Unreviewed build fix for the GTK port after r142595.
3194         Adding the TextureMapperFPSCounter files to the list of build targets
3195         in case of using the OpenGL texture mapper.
3196
3197         * GNUmakefile.list.am:
3198
3199 2013-02-12  Andrey Kosyakov  <caseq@chromium.org>
3200
3201         Web Inspector: fix closure compiler warnings in extension server and API
3202         https://bugs.webkit.org/show_bug.cgi?id=109563
3203
3204         Reviewed by Vsevolod Vlasov.
3205
3206         * inspector/front-end/ExtensionAPI.js: drive-by: make sure we fail if extensionServer is not defined in outer scope.
3207         * inspector/front-end/ExtensionServer.js:
3208         (WebInspector.ExtensionServer.prototype.):
3209         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
3210         * inspector/front-end/externs.js: add extensionServer
3211
3212 2013-02-12  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3213
3214         Unreviewed. Fix !ENABLE(INSPECTOR) builds after r142575
3215
3216         * inspector/InspectorInstrumentation.h:
3217         (WebCore::InspectorInstrumentation::willDispatchEvent):
3218
3219 2013-02-12  Andrey Lushnikov  <lushnikov@chromium.org>
3220
3221         Web Inspector: move showWhitespace option into experiments
3222         https://bugs.webkit.org/show_bug.cgi?id=109552
3223
3224         Reviewed by Vsevolod Vlasov.
3225
3226         Remove "show whitespace" setting and add it to experiments.
3227
3228         No new tests: fixed an existing test to verify changes.
3229
3230         * English.lproj/localizedStrings.js:
3231         * inspector/front-end/DefaultTextEditor.js:
3232         (WebInspector.TextEditorMainPanel):
3233         (WebInspector.TextEditorMainPanel.prototype.wasShown):
3234         (WebInspector.TextEditorMainPanel.prototype.willHide):
3235         * inspector/front-end/Settings.js:
3236         (WebInspector.ExperimentsSettings):
3237         * inspector/front-end/SettingsScreen.js:
3238         (WebInspector.GenericSettingsTab):
3239
3240 2013-02-12  Tamas Czene  <tczene@inf.u-szeged.hu>
3241
3242         Add error checking into OpenCL version of SVG filters.
3243         https://bugs.webkit.org/show_bug.cgi?id=107444
3244
3245         Reviewed by Zoltan Herczeg.
3246
3247         In case of an error the program runs through all the remaining filters by doing nothing. 
3248         After that deletes the results of every filter and starts software rendering.
3249
3250         * platform/graphics/filters/FilterEffect.cpp:
3251         (WebCore):
3252         (WebCore::FilterEffect::applyAll): At software rendering this is a simple inline methode, but at OpenCL rendering it releases OpenCL things. If we have an error remove filter's results and start software rendering.
3253         (WebCore::FilterEffect::clearResultsRecursive):
3254         (WebCore::FilterEffect::openCLImageToImageBuffer):
3255         (WebCore::FilterEffect::createOpenCLImageResult):
3256         (WebCore::FilterEffect::transformResultColorSpace):
3257         * platform/graphics/filters/FilterEffect.h:
3258         (FilterEffect):
3259         (WebCore::FilterEffect::applyAll):
3260         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
3261         (WebCore::FilterContextOpenCL::isFailed):
3262         (WebCore):
3263         (WebCore::FilterContextOpenCL::freeResources):
3264         (WebCore::FilterContextOpenCL::destroyContext):
3265         (WebCore::FilterContextOpenCL::compileTransformColorSpaceProgram):
3266         (WebCore::FilterContextOpenCL::openCLTransformColorSpace):
3267         (WebCore::FilterContextOpenCL::compileProgram):
3268         (WebCore::FilterContextOpenCL::freeResource):
3269         * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
3270         (WebCore::FilterContextOpenCL::FilterContextOpenCL):
3271         (WebCore::FilterContextOpenCL::setInError):
3272         (WebCore::FilterContextOpenCL::inError):
3273         (FilterContextOpenCL):
3274         (WebCore::FilterContextOpenCL::RunKernel::RunKernel):
3275         (WebCore::FilterContextOpenCL::RunKernel::addArgument):
3276         (WebCore::FilterContextOpenCL::RunKernel::run):
3277         (RunKernel):
3278         * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp:
3279         (WebCore::FilterContextOpenCL::compileFEColorMatrix):
3280         (WebCore::FEColorMatrix::platformApplyOpenCL):
3281         * platform/graphics/gpu/opencl/OpenCLFETurbulence.cpp:
3282         (WebCore::FilterContextOpenCL::compileFETurbulence):
3283         (WebCore::FETurbulence::platformApplyOpenCL):
3284         * rendering/svg/RenderSVGResourceFilter.cpp:
3285         (WebCore::RenderSVGResourceFilter::postApplyResource):
3286
3287 2013-02-12  Huang Dongsung  <luxtella@company100.net>
3288
3289         [TexMap] Apply frames-per-second debug counter to WK1.
3290         https://bugs.webkit.org/show_bug.cgi?id=109540
3291
3292         Reviewed by Noam Rosenthal.
3293
3294         r142524 implemented frames-per-second debug counter on WK2. This patch
3295         applies frames-per-second debug counter to WK1 also.
3296
3297         Visual debugging feature, no need for new tests.
3298
3299         * CMakeLists.txt:
3300         * GNUmakefile.list.am:
3301         * Target.pri:
3302         * platform/graphics/texmap/TextureMapper.h:
3303         * platform/graphics/texmap/TextureMapperFPSCounter.cpp: Added.
3304         (WebCore):
3305         (WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
3306         (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
3307         * platform/graphics/texmap/TextureMapperFPSCounter.h: Added.
3308         (WebCore):
3309         (TextureMapperFPSCounter):
3310         * platform/graphics/texmap/TextureMapperGL.cpp:
3311         (WebCore):
3312         (WebCore::TextureMapperGL::drawNumber):
3313           Rename from drawRepaintCounter to drawNumber.
3314         * platform/graphics/texmap/TextureMapperGL.h:
3315         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
3316         (WebCore::TextureMapperImageBuffer::drawNumber):
3317         * platform/graphics/texmap/TextureMapperImageBuffer.h:
3318         (TextureMapperImageBuffer):
3319         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
3320         (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
3321         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
3322         (WebCore::CoordinatedBackingStore::drawRepaintCounter):
3323         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
3324           Move frames-per-second debug counter code to TextureMapperFPSCounter.
3325         (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
3326         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
3327         (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
3328         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
3329
3330 2013-02-11  Yury Semikhatsky  <yurys@chromium.org>
3331
3332         Web Inspector: stack trace is cut at native bind if inspector is closed
3333         https://bugs.webkit.org/show_bug.cgi?id=109427
3334
3335         Reviewed by Pavel Feldman.
3336
3337         Only top frame is collected instead of full stack trace when inspector
3338         front-end is closed to avoid expensive operations when exceptions are
3339         thrown.
3340
3341         Test: http/tests/inspector-enabled/console-exception-while-no-inspector.html
3342
3343         * inspector/InspectorConsoleAgent.cpp:
3344         (WebCore::InspectorConsoleAgent::addMessageToConsole):
3345
3346 2013-02-12  Kent Tamura  <tkent@chromium.org>
3347
3348         INPUT_MULTIPLE_FIELDS_UI: Mouse click not on sub-fields in multiple fields input  should not move focus
3349         https://bugs.webkit.org/show_bug.cgi?id=109544
3350
3351         Reviewed by Kentaro Hara.
3352
3353         This is similar to Bug 108914, "Should not move focus if the element
3354         already has focus." We fixed a focus() case in Bug 108914. However we
3355         still have the problem in a case of focusing by mouse click.
3356
3357         The fix for Bug 108914 intercepted focus() function to change the
3358         behavior. However focus-by-click doesn't call focus(), but calls
3359         FocusController::setFocusedNode. To fix this problem, we introduce
3360         oldFocusedNode argument to handleFocusEvent, and
3361         BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent restores the
3362         focus to oldFocusedNode if oldFocusedNode is one of sub-fields.
3363         handleFocusEvent is called whenever the focused node is changed.
3364
3365         We don't need InputType::willCancelFocus any more because the new code
3366         in handleFocusEvent covers it.
3367
3368         Tests: Update fast/forms/time-multiple-fields/time-multiple-fields-focus.html.
3369
3370         * html/HTMLTextFormControlElement.h:
3371         (WebCore::HTMLTextFormControlElement::handleFocusEvent):
3372         Add oldFocusedNode argument.
3373         * html/HTMLTextFormControlElement.cpp:
3374         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
3375         Pass oldFocusedNode to handleFocusEvent.
3376
3377         * html/HTMLInputElement.h:
3378         (HTMLInputElement):
3379          - Add oldFocusedNode argument to handleFocusEvent.
3380          - Remove focus() override.
3381         * html/HTMLInputElement.cpp: Remove focus() override.
3382         (WebCore::HTMLInputElement::handleFocusEvent):
3383         Pass oldFocusedNode to InputType::handleFocusEvent.
3384         * html/InputType.cpp: Remove willCancelFocus.
3385         (WebCore::InputType::handleFocusEvent):
3386         Add oldFocusedNode argument.
3387         * html/InputType.h:
3388         (InputType): Ditto.
3389         * html/PasswordInputType.cpp:
3390         (WebCore::PasswordInputType::handleFocusEvent): Ditto.
3391         * html/PasswordInputType.h:
3392         (PasswordInputType): Ditto.
3393
3394         * html/BaseMultipleFieldsDateAndTimeInputType.h:
3395         (BaseMultipleFieldsDateAndTimeInputType):
3396         Remove willCancelFocus, and add oldFocusedNode argument to handleFocusEvent.
3397         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
3398         (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent):
3399         Pass oldFocusedNode to DateTimeEditElement::focusByOwner if the
3400         direction is FocusDirectionNone.
3401
3402         * html/shadow/DateTimeEditElement.h:
3403         (DateTimeEditElement): Add oldFocusedNode argument to focusByOwner.
3404         * html/shadow/DateTimeEditElement.cpp:
3405         (WebCore::DateTimeEditElement::focusByOwner):
3406         If oldFocusedNode is one of sub-fields, focus on it again.
3407
3408 2013-02-12  Takashi Sakamoto  <tasak@google.com>
3409
3410         [Refactoring] Make m_selectorChecker in StyleResolver an on-stack object.
3411         https://bugs.webkit.org/show_bug.cgi?id=108595
3412
3413         Reviewed by Eric Seidel.
3414
3415         StyleResolver uses SelectorChecker's mode to change its resolving mode.
3416         However it is a state of StyleResolver. StyleResolver should have the
3417         mode and make SelectorChecker instance on a stack while required.
3418
3419         No new tests, just refactoring.
3420
3421         * css/SelectorChecker.cpp:
3422         (WebCore::SelectorChecker::fastCheckRightmostSelector):
3423         (WebCore::SelectorChecker::fastCheck):
3424         (WebCore::SelectorChecker::commonPseudoClassSelectorMatches):
3425         (WebCore::SelectorChecker::matchesFocusPseudoClass):
3426         Changed to static class function, because these methods never use
3427         "this".
3428         (WebCore):
3429         * css/SelectorChecker.h:
3430         (SelectorChecker):
3431         * css/StyleResolver.cpp:
3432         (WebCore::StyleResolver::StyleResolver):
3433         (WebCore::StyleResolver::collectMatchingRules):
3434         Now, matchesFocusPseudoClass is not a static method of
3435         SelectorChecker, so replaced "m_selectorChecker." with
3436         "SelectorChecker::".
3437         (WebCore::StyleResolver::sortAndTransferMatchedRules):
3438         (WebCore::StyleResolver::collectMatchingRulesForList):
3439         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
3440         (WebCore::StyleResolver::matchUARules):
3441         (WebCore::StyleResolver::adjustRenderStyle):
3442         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3443         Use m_mode instead of m_selectorChecker.mode().
3444         Also use document()->inQuirksMode() instead of
3445         m_selectoChecker.strictParsing().
3446         (WebCore::StyleResolver::ruleMatche