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