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