It is invalid when both numberOfInputChannels and numberOfOutputChannels to be zero...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-25  Li Yin  <li.yin@intel.com>
2
3         It is invalid when both numberOfInputChannels and numberOfOutputChannels to be zero in JavaScriptAudioNode.
4         https://bugs.webkit.org/show_bug.cgi?id=91364
5
6         Reviewed by Kenneth Russell.
7
8         Spec: http://www.w3.org/TR/webaudio/#JavaScriptAudioNode-section
9         It is invalid for both numberOfInputChannels and numberOfOutputChannels to be zero.
10
11         Test: webaudio/javascriptaudionode.html
12
13         * Modules/webaudio/JavaScriptAudioNode.cpp:
14         (WebCore::JavaScriptAudioNode::create):
15
16 2012-07-24  Shawn Singh  <shawnsingh@chromium.org>
17
18         [chromium] Refactor CCLayerTreeHostCommon: move root layer special case initialization into internal code.
19         https://bugs.webkit.org/show_bug.cgi?id=88953
20
21         Reviewed by Adrienne Walker.
22
23         This is part 1 of trying to reduce the root layer special
24         case. This tries to reduce the special-ness of the root layer from
25         the perspective of outside code.
26
27         After this patch, code that uses calcDrawTransforms() no longer
28         needs to initialize the root layer's surface, and no longer needs
29         to manually append the root layer to the renderSurfaceLayerList.
30
31         Unit tests were also updated (much cleaner!) to account for this change.
32
33         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
34         (WebCore::CCLayerTreeHost::updateLayers):
35         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
36         (WebCore):
37         (WebCore::setupRootLayerAndSurfaceForRecursion):
38         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
39         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
40         (CCLayerTreeHostCommon):
41         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
42         (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
43
44 2012-07-25  Taiju Tsuiki  <tzik@chromium.org>
45
46         FileSystem should provide a way to delete filesystem.
47         https://bugs.webkit.org/show_bug.cgi?id=91861
48
49         Reviewed by Adam Barth.
50
51         We will add a test when we wire-up the feature to Inspector.
52
53         * Modules/filesystem/LocalFileSystem.cpp: Add deleteFileSystem
54         (WebCore::deleteFileSystem):
55         (WebCore):
56         (WebCore::LocalFileSystem::deleteFileSystem):
57         * Modules/filesystem/LocalFileSystem.h:
58         (LocalFileSystem):
59         * platform/AsyncFileSystem.cpp: Add deleteFileSystem
60         (WebCore):
61         (WebCore::AsyncFileSystem::deleteFileSystem):
62         * platform/AsyncFileSystem.h:
63         (AsyncFileSystem):
64         * platform/blackberry/AsyncFileSystemBlackBerry.cpp: Add deleteFileSystem
65         (WebCore::AsyncFileSystem::deleteFileSystem):
66         (WebCore):
67         * platform/gtk/AsyncFileSystemGtk.cpp: Add deleteFileSystem
68         (WebCore::AsyncFileSystem::deleteFileSystem):
69         (WebCore):
70
71 2012-07-25  Andrey Adaikin  <aandrey@chromium.org>
72
73         Web Inspector: Add more jsdocs to InjectedScriptSource.js
74         https://bugs.webkit.org/show_bug.cgi?id=92255
75
76         Reviewed by Pavel Feldman.
77
78         * inspector/InjectedScriptSource.js:
79
80 2012-07-24  Dana Jansens  <danakj@chromium.org>
81
82         [chromium] Turn the debug HUD into a layer so that it can be drawn as a WebCompositorQuad
83         https://bugs.webkit.org/show_bug.cgi?id=92182
84
85         Reviewed by Adrienne Walker.
86
87         By changing the HUD into a quad, we are able to create a HUD and pass
88         it to the host compositor, allowing the HUD to be used for renderers
89         under Ubercompositor.
90
91         This also removes the special drawing code for the HUD from
92         LayerRendererChromium, allowing us to move finishDrawingFrame
93         into LayerRendererChromium as a private method and remove it
94         from the CCRenderer interface.
95
96         Finally, we can remove the CCFontAtlas transport code from CCProxy
97         and its implementations as the atlas can be synced to impl thread
98         through the usual layer commit mechanism.
99
100         The debug HUD is not covered by tests.
101
102         * WebCore.gypi:
103         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.cpp: Added.
104         (WebCore):
105         (WebCore::HeadsUpDisplayLayerChromium::create):
106         (WebCore::HeadsUpDisplayLayerChromium::HeadsUpDisplayLayerChromium):
107         (WebCore::HeadsUpDisplayLayerChromium::~HeadsUpDisplayLayerChromium):
108         (WebCore::HeadsUpDisplayLayerChromium::createCCLayerImpl):
109         * platform/graphics/chromium/HeadsUpDisplayLayerChromium.h: Added.
110         (WebCore):
111         (HeadsUpDisplayLayerChromium):
112         * platform/graphics/chromium/LayerRendererChromium.cpp:
113         (WebCore::LayerRendererChromium::drawFrame):
114         (WebCore::LayerRendererChromium::cleanupSharedObjects):
115         * platform/graphics/chromium/LayerRendererChromium.h:
116         (LayerRendererChromium):
117         * platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
118         (WebCore::CCDebugRectHistory::savePropertyChangedRects):
119         * platform/graphics/chromium/cc/CCDebugRectHistory.h:
120         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp.
121         (WebCore):
122         (WebCore::CCHeadsUpDisplayLayerImpl::CCHeadsUpDisplayLayerImpl):
123         (WebCore::CCHeadsUpDisplayLayerImpl::~CCHeadsUpDisplayLayerImpl):
124         (WebCore::CCHeadsUpDisplayLayerImpl::willDraw):
125         (WebCore::CCHeadsUpDisplayLayerImpl::appendQuads):
126         (WebCore::CCHeadsUpDisplayLayerImpl::didDraw):
127         (WebCore::CCHeadsUpDisplayLayerImpl::didLoseContext):
128         (WebCore::CCHeadsUpDisplayLayerImpl::drawHudContents):
129         (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounter):
130         (WebCore::CCHeadsUpDisplayLayerImpl::drawFPSCounterText):
131         (WebCore::CCHeadsUpDisplayLayerImpl::drawDebugRects):
132         * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h.
133         (WebCore):
134         (CCHeadsUpDisplayLayerImpl):
135         (WebCore::CCHeadsUpDisplayLayerImpl::create):
136         * platform/graphics/chromium/cc/CCLayerImpl.h:
137         (WebCore::CCLayerImpl::layerIsAlwaysDamaged):
138         This flag is used to mark the HUD as always damaged, so that it is
139         continually drawn on the impl thread. It is also used as a hint by
140         the CCDebugRectHistory class to not include the layer in the display
141         of damage, since always damaged is not interesting damage.
142         (CCLayerImpl):
143         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
144         (WebCore::CCLayerTreeHost::create):
145         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
146         (WebCore::CCLayerTreeHost::initialize):
147         (WebCore::CCLayerTreeHost::willCommit):
148         (WebCore::CCLayerTreeHost::didCommit):
149         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
150         (CCLayerTreeSettings):
151         (WebCore::CCLayerTreeSettings::showDebugInfo):
152         (WebCore::CCLayerTreeSettings::showDebugRects):
153         (CCLayerTreeHost):
154         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
155         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
156         (WebCore::CCLayerTreeHostImpl::drawLayers):
157         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
158         (WebCore):
159         (CCLayerTreeHostImpl):
160         * platform/graphics/chromium/cc/CCProxy.h:
161         (CCProxy):
162         * platform/graphics/chromium/cc/CCRenderer.h:
163         (CCRenderer):
164         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
165         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
166         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
167         * platform/graphics/chromium/cc/CCThreadProxy.h:
168         (CCThreadProxy):
169
170 2012-07-25  'Pavel Feldman'  <pfeldman@chromium.org>
171
172         Web Inspector: follow up to r123612, fixing CSS value suggest.
173
174         Not reviewed, minor JS fix.
175
176         * inspector/front-end/CSSCompletions.js:
177         (WebInspector.CSSCompletions):
178         * inspector/front-end/StylesSidebarPane.js:
179         (WebInspector.StylePropertyTreeElement.prototype):
180
181 2012-07-25  Michael Saboff  <msaboff@apple.com>
182
183         Unreviewed build fix after r123624.
184
185         * inspector/InspectorPageAgent.cpp:
186         (WebCore::InspectorPageAgent::clearGeolocationOverride):
187         Changed ASSERT_UNUSED() to UNUSED_PARAM().
188
189 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
190
191         Web inspector auto-completes "optimizequality" but then complains
192         https://bugs.webkit.org/show_bug.cgi?id=92262
193
194         Reviewed by Timothy Hatcher.
195
196         Fixed optimizeSpeed, optimizeLegibility, geometricPrecision.
197
198         * inspector/front-end/CSSKeywordCompletions.js:
199
200 2012-07-25  Beth Dakin  <bdakin@apple.com>
201
202         https://bugs.webkit.org/show_bug.cgi?id=89114
203         REGRESSION (r112919): Setting scrollTop after setting display from none to block 
204         fails
205         -and corresponding-
206         <rdar://problem/11656050>
207
208         Reviewed by Simon Fraser.
209
210         ScrollAnimatorMac::immediateScrollTo() and ScrollAnimatorMac::immediateScrollBy() 
211         both have an optimization in place so that they do not call 
212         notifyPositionChanged() if the new scroll offset matches the ScrollAnimator's 
213         cached m_currentPosX and m_currentPosY. So revision 112919 caused troubled with 
214         this optimization because it allowed RenderLayers to restore a scrollOffset from 
215         the Element if there is one cached there. This caused the RenderLayer to have a 
216         scrollOffset that is improperly out-of-synch with the ScrollAnimator's 
217         currentPosition (which will just be 0,0 since it is being re-created like the 
218         RenderLayer). This fix makes sure they are in synch by calling 
219         setCurrentPosition() on the ScrollAnimator when the cached position is non-zero.
220         * rendering/RenderLayer.cpp:
221         (WebCore::RenderLayer::RenderLayer):
222
223 2012-07-25  Andreas Kling  <kling@webkit.org>
224
225         Make ElementAttributeData a variable-sized object to reduce memory use.
226         <http://webkit.org/b/88240>
227
228         Reviewed by Ryosuke Niwa.
229
230         Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
231         it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
232         For elements that never have their attribute list mutated (the vast majority), this saves a lot of
233         memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
234
235         Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
236         that nothing tries to mutate an element with a raw attribute array.
237
238         When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
239         a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
240
241         This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
242         That is a ~35% reduction in DOM attribute memory use.
243
244         Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
245         adding of "class" attributes. For more static pages, savings are even greater.
246
247         Also did away with ElementAttributeData::removeAttribute(name) and do separate index lookup where
248         needed. Not a big deal but avoids double lookup of attributes when removing them.
249
250         * dom/Element.cpp:
251         (WebCore::Element::detachAttribute):
252         (WebCore::Element::removeAttribute):
253         (WebCore::Element::attributes):
254         (WebCore::Element::setAttributeInternal):
255         (WebCore::Element::parserSetAttributes):
256         (WebCore::Element::hasEquivalentAttributes):
257         (WebCore::Element::setAttributeNode):
258         (WebCore::Element::removeAttributeNode):
259         (WebCore::Element::getAttributeNode):
260         (WebCore::Element::getAttributeNodeNS):
261         (WebCore::Element::hasAttribute):
262         (WebCore::Element::hasAttributeNS):
263         (WebCore::Element::cloneAttributesFromElement):
264
265             Sprinkle const on ElementAttributeData* pointers.
266             Switch to using mutableAttributeData() in code paths that modify attributes.
267
268         (WebCore::Element::normalizeAttributes):
269
270             Cleaner iteration over attributes, I removed ElementAttributeData::attributeVector() since that
271             was just incurring a bunch of extra Vector copying. Since ElementAttributeData already exposes
272             length() and attributeItem(index), use those to iterate directly over the attributes.
273
274         (WebCore::Element::createMutableAttributeData):
275
276             Added, converts existing ElementAttributeData to a mutable object. Otherwise creates a new
277             ElementAttributeData (mutable and empty.)
278
279         * dom/Element.h:
280         (WebCore::Element::attributeData):
281         (WebCore::Element::updatedAttributeData):
282         (WebCore::Element::ensureAttributeData):
283         (WebCore::Element::ensureUpdatedAttributeData):
284
285             Made all of these return "const ElementAttributeData*" to ensure at compile-time that nothing
286             attempts to modify an ElementAttributeData that may be immutable.
287
288             ensureUpdatedAttributeData() is still const, despite possibly calling mutableAttributeData().
289             The goal of having methods be const is to prevent conversion from one ElementAttributeData
290             object to another, so that pointers remain intact and no unnecessary work gets done.
291
292         (WebCore::Element::mutableAttributeData):
293
294             Added, returns a guaranteed mutable ElementAttributeData* pointer.
295
296         * dom/ElementAttributeData.cpp:
297         (WebCore::ElementAttributeData::createImmutable):
298
299             Creates a new ElementAttributeData tailored to fit the provided Vector<Attribute>.
300
301         (WebCore::ElementAttributeData::ElementAttributeData):
302
303             Moved constructors out-of-line, getting too complex for header files.
304
305             ElementAttributeData(const Vector<Attribute>&) creates an immutable ElementAttributeData
306             containing the provided attributes in an array tacked onto the end of the object.
307
308         (WebCore::ElementAttributeData::~ElementAttributeData):
309
310             Free the attribute vector if mutable.
311             For immutable objects, manually invoke destructor on each Attribute object,
312             since these won't be destroyed automatically by ~ElementAttributeData.
313
314         (WebCore::ElementAttributeData::attrIfExists):
315
316         (WebCore::ElementAttributeData::ensureAttr):
317         (WebCore::ElementAttributeData::setAttr):
318         (WebCore::ElementAttributeData::removeAttr):
319
320             Make these const, as they should always have been- they don't affect the ElementAttributeData,
321             only the global DOM Attr <-> ElementAttributeData mappings.
322
323         (WebCore::ElementAttributeData::ensureInlineStyle):
324         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
325
326             Sprinkle ASSERT(isMutable()). This doesn't mean that all Elements with inline styles automatically
327             have mutable attribute data. There's still inlineStyle() for that, which may return null.
328             These are only for use where you need a valid StylePropertySet*, even if there is no inline style
329             attribute, e.g in editing code that wants to add style.
330
331         (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
332         (WebCore::ElementAttributeData::destroyInlineStyle):
333
334             Make these const. While destroyInlineStyle() doesn't sound very const-y, immutable objects that
335             contain a style attribute will have a valid inlineStyle() with that style data. This is just
336             an interface for ~StyledElement to destroy the style object.
337             It'd be nice to do that in ~ElementAttributeData(), but we need a StyledElement* pointer to
338             clean up properly and we don't store one in this class.
339
340         (WebCore::ElementAttributeData::addAttribute):
341         (WebCore::ElementAttributeData::removeAttribute):
342         (WebCore::ElementAttributeData::clearAttributes):
343         (WebCore::ElementAttributeData::replaceAttribute):
344
345             Sprinkle ASSERT(isMutable()).
346             Always go straight for m_mutableAttributeVector since we know that's the storage being used.
347
348         (WebCore::ElementAttributeData::isEquivalent):
349         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
350         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
351         (WebCore::ElementAttributeData::removeAttribute):
352         (WebCore::ElementAttributeData::getAttributeItem):
353         (WebCore::ElementAttributeData::getAttributeItemIndex):
354
355             Use length() and attributeItem(index) to iterate over the attributes.
356
357         (WebCore::ElementAttributeData::cloneDataFrom):
358
359             Sprinkle ASSERT(isMutable()). Added a FIXME that cloning elements could create immutable
360             attribute data. I'm not sure this optimization is worthwhile, as cloning elements is already
361             a semi-rare occurrence.
362
363             Updated code to handle both immutable and mutable source objects. This could 
364
365         (WebCore::ElementAttributeData::getAttributeNode):
366
367             Const correctness.
368
369         * dom/ElementAttributeData.h:
370         (ElementAttributeData):
371
372             Turn attribute storage into what's effectively union { OwnPtr<Vector<Attribute>>; Attribute[]; }
373             The new m_isMutable bit determines which union member should be used for access.
374
375         (WebCore::ElementAttributeData::create):
376         (WebCore::ElementAttributeData::createImmutable):
377
378             Added createImmutable(const Vector<Attribute>&) as a complement to create().
379
380         (WebCore::ElementAttributeData::setClass):
381         (WebCore::ElementAttributeData::setIdForStyleResolution):
382         (WebCore::ElementAttributeData::inlineStyle):
383         (WebCore::ElementAttributeData::setAttributeStyle):
384
385             Make these const, and their data member counterparts 'mutable'.
386             An immutable ElementAttributeData object still has m_classNames, m_idForStyleResolution,
387             m_inlineStyleDecl and m_attributeStyle.
388
389         (WebCore::ElementAttributeData::reportMemoryUsage):
390
391             Updated for isMutable().
392
393         (WebCore::ElementAttributeData::makeMutable):
394
395             Returns a mutable clone of itself.
396
397         (WebCore::ElementAttributeData::isEmpty):
398         (WebCore::ElementAttributeData::length):
399         (WebCore::ElementAttributeData::attributeItem):
400
401             Check isMutable() to know how to access attribute storage.
402
403         * dom/StyledElement.cpp:
404         (WebCore::StyledElement::style):
405         (WebCore::StyledElement::setInlineStyleProperty):
406
407             Simplify by using StyledElement::ensureInlineStyle().
408
409         (WebCore::StyledElement::classAttributeChanged):
410
411             Use mutableAttributeData() if the attribute is being removed completely.
412             In other cases, tiptoe around without causing the attribute data to go mutable.
413
414         (WebCore::StyledElement::removeInlineStyleProperty):
415
416             Use mutableAttributeData() if/when actually removing something.
417
418         (WebCore::StyledElement::addSubresourceAttributeURLs):
419
420             Const correctness.
421
422         * dom/StyledElement.h:
423         (WebCore::StyledElement::ensureInlineStyle):
424
425             This now implies conversion to mutable attribute data. Used by codepaths that add/remove
426             properties, so conversion is inevitable.
427
428         * html/parser/HTMLConstructionSite.cpp:
429         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
430         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
431         * svg/properties/SVGAnimatedPropertyMacros.h:
432         (WebCore::SVGSynchronizableAnimatedProperty::synchronize):
433
434             Use mutableAttributeData() as appropriate.
435
436         * xml/parser/XMLDocumentParserQt.cpp:
437         (WebCore::XMLDocumentParser::XMLDocumentParser):
438
439             Const correctness.
440
441 2012-07-25  Andrew Wilson  <atwilson@chromium.org>
442
443         Unreviewed, rolling out r123560.
444         http://trac.webkit.org/changeset/123560
445         https://bugs.webkit.org/show_bug.cgi?id=90321
446
447         Breaks chromium valgrind tests.
448
449         * html/FTPDirectoryDocument.cpp:
450         (WebCore::FTPDirectoryDocumentParser::append):
451         * html/parser/HTMLEntityParser.cpp:
452         (WebCore::HTMLEntityParser::consumeNamedEntity):
453         * html/parser/HTMLParserIdioms.cpp:
454         (WebCore::stripLeadingAndTrailingHTMLSpaces):
455         * html/parser/HTMLSourceTracker.cpp:
456         (WebCore::HTMLSourceTracker::sourceForToken):
457         * loader/cache/CachedScript.cpp:
458         (WebCore::CachedScript::script):
459         * platform/text/SegmentedString.cpp:
460         (WebCore::SegmentedString::SegmentedString):
461         (WebCore::SegmentedString::operator=):
462         (WebCore::SegmentedString::clear):
463         (WebCore::SegmentedString::append):
464         (WebCore::SegmentedString::prepend):
465         (WebCore::SegmentedString::advanceSubstring):
466         (WebCore::SegmentedString::advance):
467         (WebCore::SegmentedString::advanceSlowCase):
468         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase):
469         * platform/text/SegmentedString.h:
470         (WebCore::SegmentedSubstring::SegmentedSubstring):
471         (WebCore::SegmentedSubstring::clear):
472         (WebCore::SegmentedSubstring::appendTo):
473         (SegmentedSubstring):
474         (WebCore::SegmentedString::SegmentedString):
475         (WebCore::SegmentedString::push):
476         (WebCore::SegmentedString::isEmpty):
477         (WebCore::SegmentedString::lookAhead):
478         (WebCore::SegmentedString::lookAheadIgnoringCase):
479         (WebCore::SegmentedString::advance):
480         (WebCore::SegmentedString::advanceAndASSERT):
481         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
482         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
483         (SegmentedString):
484         (WebCore::SegmentedString::advancePastNonNewline):
485         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
486         (WebCore::SegmentedString::operator*):
487         (WebCore::SegmentedString::operator->):
488         (WebCore::SegmentedString::current):
489         (WebCore::SegmentedString::equalsLiterally):
490         (WebCore::SegmentedString::equalsIgnoringCase):
491         (WebCore::SegmentedString::lookAheadInline):
492         (WebCore::SegmentedString::lookAheadSlowCase):
493         * xml/parser/CharacterReferenceParserInlineMethods.h:
494         (WebCore::consumeCharacterReference):
495         * xml/parser/MarkupTokenizerBase.h:
496         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
497         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek):
498         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
499
500 2012-07-25  Konrad Piascik  <kpiascik@rim.com>
501
502         Web Inspector: Geolocation override
503         https://bugs.webkit.org/show_bug.cgi?id=89365
504
505         Reviewed by Pavel Feldman.
506
507         Re-added the m_page member variable for GeolocationController since
508         it's now being used by InspectorInstrumentaiton.
509
510         Added a way to override the GeolocationPosition and GeolocationError
511         using Web Inspector. Curretnly only PositionError can be set.
512
513         This will be hidden behind the experiments flag for now.
514
515         Tests: inspector/geolocation-error.html
516                inspector/geolocation-success.html
517                inspector/geolocation-watchPosition.html
518
519         * English.lproj/localizedStrings.js:
520         * Modules/geolocation/GeolocationController.cpp:
521         (WebCore::GeolocationController::GeolocationController):
522         (WebCore::GeolocationController::positionChanged):
523         * Modules/geolocation/GeolocationController.h:
524         (GeolocationController):
525         * inspector/Inspector.json:
526         * inspector/InspectorInstrumentation.cpp:
527         (WebCore):
528         (WebCore::InspectorInstrumentation::overrideGeolocationPositionImpl):
529         * inspector/InspectorInstrumentation.h:
530         (WebCore):
531         (InspectorInstrumentation):
532         (WebCore::InspectorInstrumentation::overrideGeolocationPosition):
533         * inspector/InspectorPageAgent.cpp:
534         (WebCore::InspectorPageAgent::InspectorPageAgent):
535         (WebCore::InspectorPageAgent::setGeolocationOverride):
536         (WebCore):
537         (WebCore::InspectorPageAgent::clearGeolocationOverride):
538         (WebCore::InspectorPageAgent::canOverrideGeolocation):
539         (WebCore::InspectorPageAgent::overrideGeolocationPosition):
540         * inspector/InspectorPageAgent.h:
541         * inspector/front-end/Settings.js:
542         * inspector/front-end/SettingsScreen.js:
543         (WebInspector.UserAgentSettingsTab):
544         (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
545         (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked):
546         (WebInspector.UserAgentSettingsTab.prototype._applyGeolocationUserInput):
547         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition.set if):
548         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition):
549         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement.createInput):
550         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement):
551         * inspector/front-end/UserAgentSupport.js:
552         (WebInspector.UserAgentSupport.GeolocationPosition):
553         (WebInspector.UserAgentSupport.GeolocationPosition.prototype.toSetting):
554         (WebInspector.UserAgentSupport.GeolocationPosition.parseSetting):
555         (WebInspector.UserAgentSupport.GeolocationPosition.parseUserInput):
556         (WebInspector.UserAgentSupport.GeolocationPosition.clearGeolocationOverride):
557         * inspector/front-end/inspector.js:
558         (WebInspector.doLoadedDone):
559
560 2012-07-25  Shawn Singh  <shawnsingh@chromium.org>
561
562         [chromium] Build fix for clang builds after r123628
563         https://bugs.webkit.org/show_bug.cgi?id=92266
564
565         Reviewed by Adrienne Walker.
566
567         An un-used variable was causing build failures for clang builds
568         after the refactoring in r123628.  It is correct to simply remove
569         this value.
570
571         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
572         (WebCore::calculateDrawTransformsInternal):
573
574 2012-07-25  Hans Wennborg  <hans@chromium.org>
575
576         Speech JavaScript API: extract function from SpeechRecognitionResult::emma()
577         https://bugs.webkit.org/show_bug.cgi?id=92232
578
579         Reviewed by Adam Barth.
580
581         Extract code for creating emma-qualified names to a helper function.
582
583         Just a refactoring; covered by the existing test.
584
585         * Modules/speech/SpeechRecognitionResult.cpp:
586         (WebCore::emmaQualifiedName):
587         (WebCore):
588         (WebCore::SpeechRecognitionResult::emma):
589
590 2012-07-25  Adrienne Walker  <enne@google.com>
591
592         [chromium] Unify compositor quadTransform/drawTransform/originTransform
593         https://bugs.webkit.org/show_bug.cgi?id=91417
594
595         Reviewed by Kenneth Russell.
596
597         drawTransform used to operate on centered layer rects. To unify quad
598         transforms, draw transforms, and origin transforms, make draw
599         transforms operate on content rects with the origin in the top left.
600
601         This essentially eliminates the need for surface origin transforms,
602         which will be eliminated in a future patch.
603
604         Also, remove the unused CCLayerImpl::getDrawRect function.
605
606         No-op refactoring. Tested by existing tests.
607
608         * platform/graphics/chromium/LayerRendererChromium.cpp:
609         (WebCore::LayerRendererChromium::drawRenderPassQuad):
610         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
611         (WebCore::RenderSurfaceChromium::drawableContentRect):
612         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
613         (WebCore::CCDamageTracker::extendDamageForLayer):
614         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
615         (WebCore::CCLayerImpl::createSharedQuadState):
616         * platform/graphics/chromium/cc/CCLayerImpl.h:
617         (CCLayerImpl):
618         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
619         (WebCore::CCLayerSorter::LayerShape::LayerShape):
620         (WebCore::CCLayerSorter::createGraphNodes):
621         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
622         (WebCore::calculateVisibleContentRect):
623         (WebCore::calculateDrawTransformsInternal):
624         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
625         (WebCore::::markOccludedBehindLayer):
626         (WebCore::::occluded):
627         (WebCore::::unoccludedContentRect):
628         * platform/graphics/chromium/cc/CCRenderPass.cpp:
629         (WebCore::CCRenderPass::appendQuadsToFillScreen):
630         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
631         (WebCore::CCRenderSurface::drawableContentRect):
632
633 2012-07-25  Tommy Widenflycht  <tommyw@google.com>
634
635         MediaStream API: Update MediaStreamTrack to match the specification
636         https://bugs.webkit.org/show_bug.cgi?id=90180
637
638         Reviewed by Adam Barth.
639
640         MediaStreamTracks are now required to show the status of the underlying source,
641         and trigger events when that status changes.
642
643         Test: fast/mediastream/MediaStreamTrack.html
644
645         * GNUmakefile.list.am:
646         * Modules/mediastream/MediaStream.cpp:
647         (WebCore::MediaStream::MediaStream):
648         (WebCore::MediaStream::addTrack):
649         * Modules/mediastream/MediaStreamTrack.cpp:
650         (WebCore::MediaStreamTrack::create):
651         (WebCore::MediaStreamTrack::MediaStreamTrack):
652         (WebCore::MediaStreamTrack::~MediaStreamTrack):
653         (WebCore::MediaStreamTrack::setEnabled):
654         (WebCore::MediaStreamTrack::readyState):
655         (WebCore):
656         (WebCore::MediaStreamTrack::sourceChangedState):
657         (WebCore::MediaStreamTrack::stop):
658         (WebCore::MediaStreamTrack::interfaceName):
659         (WebCore::MediaStreamTrack::scriptExecutionContext):
660         (WebCore::MediaStreamTrack::eventTargetData):
661         (WebCore::MediaStreamTrack::ensureEventTargetData):
662         * Modules/mediastream/MediaStreamTrack.h:
663         * Modules/mediastream/MediaStreamTrack.idl:
664         * WebCore.gypi:
665         * dom/EventNames.h:
666         (WebCore):
667         * dom/EventTargetFactory.in:
668         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
669         * platform/chromium/support/WebMediaStreamSource.cpp:
670         (WebKit::WebMediaStreamSource::setReadyState):
671         (WebKit):
672         (WebKit::WebMediaStreamSource::readyState):
673         * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h.
674         (WebCore):
675         (WebCore::MediaStreamSource::create):
676         (WebCore::MediaStreamSource::MediaStreamSource):
677         (WebCore::MediaStreamSource::setReadyState):
678         (WebCore::MediaStreamSource::addObserver):
679         (WebCore::MediaStreamSource::removeObserver):
680         * platform/mediastream/MediaStreamSource.h:
681         (Observer):
682         (WebCore::MediaStreamSource::Observer::~Observer):
683         (MediaStreamSource):
684         (WebCore::MediaStreamSource::readyState):
685         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
686         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
687         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
688
689 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
690
691         Incorrect rounding in ceiledLayoutUnit and roundedLayoutUnit.
692         https://bugs.webkit.org/show_bug.cgi?id=91061
693
694         Reviewed by Adam Barth.
695
696         The two functions are currently both returning the flooredLayoutUnit when subpixel
697         layout is enabled. This patch changes them to return the correct fractional rounded
698         value.
699
700         * platform/FractionalLayoutUnit.h:
701         (WebCore::FractionalLayoutUnit::fromFloatCeil):
702         (FractionalLayoutUnit):
703         (WebCore::FractionalLayoutUnit::fromFloatRound):
704         * rendering/LayoutTypes.h:
705         (WebCore::roundedLayoutUnit):
706         (WebCore::ceiledLayoutUnit):
707         * rendering/RenderBlock.cpp:
708         (WebCore::updatePreferredWidth):
709
710 2012-07-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
711
712         Add *explicit* keyword to constructors in WebCore/platform
713         https://bugs.webkit.org/show_bug.cgi?id=92238
714
715         Reviewed by Kentaro Hara.
716
717         As a step to let *explicit* keyword add to constructors which have a parameter,
718         *explicit* keyword is added to Source/WebCore/platform in order to avoid implicit
719         type conversion.
720
721         Some files in platform directory can't use explicit keyword because of build breaks.
722
723         No new tests. Covered by existing tests.
724
725         * platform/AutodrainedPool.h:
726         (AutodrainedPool):
727         * platform/ContentType.h:
728         (ContentType):
729         * platform/ContextMenu.h:
730         (ContextMenu):
731         * platform/ContextMenuItem.h:
732         (ContextMenuItem):
733         * platform/Cursor.h:
734         (WebCore::SharedCursor::SharedCursor):
735         (Cursor):
736         * platform/KURL.h:
737         (WebCore::KURL::KURL):
738         (KURL):
739         * platform/KURLGooglePrivate.h:
740         (KURLGooglePrivate):
741         * platform/PODRedBlackTree.h:
742         (WebCore::PODRedBlackTree::PODRedBlackTree):
743         * platform/Pasteboard.h:
744         (Pasteboard):
745         * platform/PlatformEvent.h:
746         (WebCore::PlatformEvent::PlatformEvent):
747         * platform/PlatformKeyboardEvent.h:
748         (PlatformKeyboardEvent):
749         * platform/PlatformMouseEvent.h:
750         (PlatformMouseEvent):
751         * platform/PlatformPasteboard.h:
752         (PlatformPasteboard):
753         * platform/PlatformTouchEvent.h:
754         (PlatformTouchEvent):
755         * platform/PlatformWheelEvent.h:
756         (PlatformWheelEvent):
757         * platform/RunLoop.h:
758         (TimerBase):
759         * platform/ScrollAnimator.h:
760         (ScrollAnimator):
761         * platform/ScrollAnimatorNone.h:
762         (ScrollAnimatorNone):
763         * platform/SharedBuffer.h:
764         (SharedBuffer):
765         * platform/WheelFlingPlatformGestureCurve.h:
766         (WheelFlingPlatformGestureCurve):
767         * platform/Widget.h:
768         (Widget):
769
770 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
771
772         NodesFromRect and area-based hit-testing can not handle CSS transforms.
773         https://bugs.webkit.org/show_bug.cgi?id=85792
774
775         Reviewed by Eric Seidel.
776
777         To support the combination of CSS transforms and rect based hit testing,
778         we need to test against the transformed rect, instead of the original rect.
779
780         This patch makes HitTestPoint store the exact transformed FloatPoint and 
781         FloatQuad, and modifies the intersection methods so that they will use a 
782         new FloatQuad based intersection when transforms requires it.
783
784         Tests: fast/dom/nodesFromRect/nodesFromRect-rotate.html
785                fast/dom/nodesFromRect/nodesFromRect-scale.html
786
787         * platform/graphics/FloatQuad.cpp:
788         (WebCore::determinant):
789         (WebCore::rightMostCornerToVector):
790         (WebCore::FloatQuad::intersectsRect):
791         (WebCore::FloatQuad::isCounterclockwise):
792         * platform/graphics/FloatQuad.h:
793         (FloatQuad):
794         * rendering/HitTestResult.cpp:
795         (WebCore::HitTestPoint::HitTestPoint):
796         (WebCore::HitTestPoint::operator=):
797         (WebCore::HitTestPoint::move):
798         (WebCore::HitTestPoint::intersectsRect):
799         (WebCore::HitTestPoint::intersects):
800         * rendering/HitTestResult.h:
801         (HitTestPoint):
802         (WebCore::HitTestPoint::isRectilinear):
803         (WebCore::HitTestPoint::transformedPoint):
804         (WebCore::HitTestPoint::transformedRect):
805         * rendering/HitTestingTransformState.cpp:
806         (WebCore::HitTestingTransformState::flattenWithTransform):
807         (WebCore::HitTestingTransformState::mappedArea):
808         (WebCore::HitTestingTransformState::boundsOfMappedArea):
809         * rendering/HitTestingTransformState.h:
810         (WebCore::HitTestingTransformState::create):
811         (WebCore::HitTestingTransformState::HitTestingTransformState):
812         * rendering/RenderFlowThread.cpp:
813         (WebCore::RenderFlowThread::hitTestRegion):
814         * rendering/RenderLayer.cpp:
815         (WebCore::RenderLayer::hitTest):
816         (WebCore::RenderLayer::createLocalTransformState):
817         (WebCore::RenderLayer::hitTestLayer):
818         (WebCore::RenderLayer::hitTestChildLayerColumns):
819         * rendering/RenderLayer.h:
820         * rendering/svg/RenderSVGText.cpp:
821         (WebCore::RenderSVGText::nodeAtFloatPoint):
822
823 2012-07-25  Kwang Yul Seo  <skyul@company100.net>
824
825         Add HTMLStackItem.h to project files
826         https://bugs.webkit.org/show_bug.cgi?id=92221
827
828         Reviewed by Adam Barth.
829
830         Added HTMLStackItem.h introduced in r123399 to project files.
831
832         Project file changes only, no change in behavior thus no new tests.
833
834         * GNUmakefile.list.am:
835         * WebCore.gypi:
836         * WebCore.vcproj/WebCore.vcproj:
837         * WebCore.xcodeproj/project.pbxproj:
838
839 2012-07-25  Sheriff Bot  <webkit.review.bot@gmail.com>
840
841         Unreviewed, rolling out r123606.
842         http://trac.webkit.org/changeset/123606
843         https://bugs.webkit.org/show_bug.cgi?id=92247
844
845         broke Windows build of Chromium (Requested by tomhudson on
846         #webkit).
847
848         * Resources/colorSuggestionPicker.css: Removed.
849         * Resources/colorSuggestionPicker.js: Removed.
850         * WebCore.gyp/WebCore.gyp:
851
852 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
853
854         Web Inspector: disabling property should remove "overriden" decoration from overriden UA shorthand.
855         https://bugs.webkit.org/show_bug.cgi?id=92253
856
857         Reviewed by Vsevolod Vlasov.
858
859         Bug fix with a test and more compilation markup.
860
861         Test: inspector/styles/styles-disable-then-enable-overriden-ua.html
862
863         * inspector/front-end/StylesSidebarPane.js:
864         (WebInspector.StylePropertiesSection.prototype.update):
865         (WebInspector.StylePropertyTreeElement):
866         (WebInspector.StylePropertyTreeElement.prototype):
867
868 2012-07-25  Vsevolod Vlasov  <vsevik@chromium.org>
869
870         Web Inspector: Improve ObjectPropertiesSection UI by adding a tooltip for the value.
871         https://bugs.webkit.org/show_bug.cgi?id=92225
872
873         Reviewed by Pavel Feldman.
874
875         Added tooltip with property value description on the property's valueElement.
876
877         * inspector/front-end/ObjectPropertiesSection.js:
878         (WebInspector.ObjectPropertyTreeElement.prototype.update):
879
880 2012-07-25  Pavel Feldman  <pfeldman@chromium.org>
881
882         https://bugs.webkit.org/show_bug.cgi?id=91931
883
884         Reviewed by Vsevolod Vlasov.
885
886         - Synthetic shorthand values are now only returned for source-less styles
887         - CSSAgents reports longhands along with the property names in getSupportedCSSProperties
888         - StylesSidebarPane now has two paths: for source-enabled styles and for CSSOM-based ones (UA styles)
889         - CSSStyleModel uses style metainfo as a source of shorthand / longhand relationship now
890
891         Test: inspector/styles/styles-overriden-properties.html
892
893         * inspector/Inspector.json:
894         * inspector/InspectorCSSAgent.cpp:
895         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
896         * inspector/InspectorCSSAgent.h:
897         (InspectorCSSAgent):
898         * inspector/InspectorStyleSheet.cpp:
899         (WebCore::InspectorStyle::styleWithProperties):
900         * inspector/front-end/CSSCompletions.js:
901         (WebInspector.CSSCompletions):
902         (WebInspector.CSSCompletions.requestCSSNameCompletions):
903         (WebInspector.CSSCompletions.prototype._closest):
904         (WebInspector.CSSCompletions.prototype.longhands):
905         (WebInspector.CSSCompletions.prototype.shorthands):
906         * inspector/front-end/CSSStyleModel.js:
907         (WebInspector.CSSStyleDeclaration):
908         (WebInspector.CSSStyleDeclaration.prototype.longhandProperties):
909         (WebInspector.CSSStyleDeclaration.prototype.shorthandValue):
910         (WebInspector.CSSStyleDeclaration.prototype.newBlankProperty):
911         (WebInspector.CSSProperty):
912         (WebInspector.CSSProperty.parsePayload):
913         * inspector/front-end/SourceCSSTokenizer.js:
914         (WebInspector.SourceCSSTokenizer):
915         * inspector/front-end/SourceCSSTokenizer.re2js:
916         * inspector/front-end/StylesSidebarPane.js:
917         (WebInspector.StylePropertiesSection.prototype.isPropertyOverloaded):
918         (WebInspector.StylePropertiesSection.prototype.update):
919         (WebInspector.StylePropertiesSection.prototype.onpopulate):
920         (WebInspector.StylePropertyTreeElement.prototype):
921
922 2012-07-25  Keishi Hattori  <keishi@webkit.org>
923
924         Implement ColorSuggestionPicker page popup
925         https://bugs.webkit.org/show_bug.cgi?id=92109
926
927         Reviewed by Kent Tamura.
928
929         Implements ColorSuggestionPicker page popup. This will be used in
930         certain ports as the datalist UI for <input type=color>.
931
932         No new tests because there is no way to open the popup yet.
933
934         * Resources/colorSuggestionPicker.css: Added.
935         (body):
936         (#main):
937         (.color-swatch):
938         (.color-swatch:hover):
939         (.color-swatch-container):
940         (.other-color):
941         * Resources/colorSuggestionPicker.js: Added.
942         (getScrollbarWidth):When there are more than 20 colors we need to
943         increase the window width to accommodate the scroll bar.
944         (createElement):
945         (handleMessage):
946         (initialize):
947         (handleArgumentsTimeout):
948         (validateArguments):
949         (submitValue): Calls setValueAndClosePopup with a numValue of 0.
950         (handleCancel): Calls setValueAndClosePopup with a numValue of -1.
951         (chooseOtherColor): Calls setValueAndClosePopup with a numValue of -2.
952         (ColorPicker):
953         (ColorPicker.prototype._layout): Lays out the color swatches in a 5x4
954         grid.
955         (ColorPicker.prototype._handleSwatchClick):
956         * WebCore.gyp/WebCore.gyp:
957
958 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
959
960         Fix arithmetic composite filter for auto-vectorization
961         https://bugs.webkit.org/show_bug.cgi?id=92123
962
963         Reviewed by Nikolas Zimmermann.
964
965         Since only clamping of the result prevents GCC from auto-vectorizing the inner loop, this patch 
966         adds a faster version of the inner loop to handle cases where clamping is unnecessary, 
967
968         * platform/graphics/filters/FEComposite.cpp:
969         (WebCore::computeArithmeticPixelsUnclamped):
970         (WebCore::arithmeticSoftware):
971
972 2012-07-25  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
973
974         Fix blend filter for autovectorizing
975         https://bugs.webkit.org/show_bug.cgi?id=91398
976
977         Reviewed by Nikolas Zimmermann.
978
979         Get rid of wrapper classes, and use functions directly as template argument.
980
981         * platform/graphics/filters/FEBlend.cpp:
982         (WebCore::feBlendNormal):
983         (WebCore::feBlendMultiply):
984         (WebCore::feBlendScreen):
985         (WebCore::feBlendDarken):
986         (WebCore::feBlendLighten):
987         (WebCore::feBlendUnknown):
988         (WebCore::platformApply):
989         (WebCore::FEBlend::platformApplyGeneric):
990
991 2012-07-25  Keishi Hattori  <keishi@webkit.org>
992
993         Add methods to ColorChooserClient so the color chooser can show suggestions
994         https://bugs.webkit.org/show_bug.cgi?id=92114
995
996         Reviewed by Kent Tamura.
997
998         Added methods to ColorChooserClient so the color chooser can ask the
999         client for suggestions and current color.
1000
1001         No new tests. The methods are not used yet.
1002
1003         * html/ColorInputType.cpp:
1004         (WebCore::ColorInputType::currentColor): Returns what color the color
1005         chooser should display.
1006         (WebCore):
1007         (WebCore::ColorInputType::shouldShowSuggestions): Returns if the UI for
1008         suggestions should be shown.
1009         (WebCore::ColorInputType::suggestions): Returns a list of colors to be
1010         suggested to the user.
1011         * html/ColorInputType.h:
1012         (ColorInputType):
1013         * html/HTMLInputElement.h:
1014         (HTMLInputElement): Made dataList() public.
1015         * platform/ColorChooserClient.h:
1016         (ColorChooserClient):
1017
1018 2012-07-25  Kentaro Hara  <haraken@chromium.org>
1019
1020         Replace int with long in test IDL files
1021         https://bugs.webkit.org/show_bug.cgi?id=92181
1022
1023         Reviewed by Adam Barth.
1024
1025         int is not a valid type in WebIDL. It should be long.
1026         We should replace int with long in bindings/scripts/test/*.idl.
1027         This is a follow-up patch for r123550.
1028
1029         Test: bindings/scripts/test/TestObj.idl
1030
1031         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1032         (WebDOMTestObj::readOnlyLongAttr):
1033         (WebDOMTestObj::Attr):
1034         (WebDOMTestObj::setAttr):
1035         (WebDOMTestObj::voidMethodWithArgs):
1036         (WebDOMTestObj::Method):
1037         (WebDOMTestObj::MethodWithArgs):
1038         (WebDOMTestObj::objMethodWithArgs):
1039         * bindings/scripts/test/CPP/WebDOMTestObj.h:
1040         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1041         (webkit_dom_test_obj_set_property):
1042         (webkit_dom_test_obj_get_property):
1043         (webkit_dom_test_obj_class_init):
1044         (webkit_dom_test_obj_void_method_with_args):
1045         (webkit_dom_test_obj_method):
1046         (webkit_dom_test_obj_method_with_args):
1047         (webkit_dom_test_obj_obj_method_with_args):
1048         (webkit_dom_test_obj_get_read_only_long_attr):
1049         (webkit_dom_test_obj_get_attr):
1050         (webkit_dom_test_obj_set_attr):
1051         (webkit_dom_test_obj_get_strawberry):
1052         (webkit_dom_test_obj_set_strawberry):
1053         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1054         * bindings/scripts/test/JS/JSTestObj.cpp:
1055         (WebCore):
1056         (WebCore::jsTestObjReadOnlyLongAttr):
1057         (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
1058         (WebCore::jsTestObjAttr):
1059         (WebCore::setJSTestObjAttr):
1060         (WebCore::setJSTestObjStrawberry):
1061         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1062         (WebCore::jsTestObjPrototypeFunctionMethod):
1063         (WebCore::jsTestObjPrototypeFunctionMethodWithArgs):
1064         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1065         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
1066         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1067         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
1068         * bindings/scripts/test/JS/JSTestObj.h:
1069         (WebCore):
1070         * bindings/scripts/test/ObjC/DOMTestObj.h:
1071         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1072         (-[DOMTestObj readOnlyLongAttr]):
1073         (-[DOMTestObj Attr]):
1074         (-[DOMTestObj setAttr:]):
1075         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]):
1076         (-[DOMTestObj Method]):
1077         (-[DOMTestObj MethodWithArgs:strArg:objArg:]):
1078         (-[DOMTestObj objMethodWithArgs:strArg:objArg:]):
1079         (-[DOMTestObj customMethodWithArgs:strArg:objArg:]):
1080         * bindings/scripts/test/TestObj.idl:
1081         * bindings/scripts/test/V8/V8TestObj.cpp:
1082         (WebCore::TestObjV8Internal::readOnlyLongAttrAttrGetter):
1083         (WebCore::TestObjV8Internal::staticReadOnlyLongAttrAttrGetter):
1084         (WebCore::TestObjV8Internal::AttrAttrGetter):
1085         (WebCore::TestObjV8Internal::AttrAttrSetter):
1086         (WebCore::TestObjV8Internal::strawberryAttrSetter):
1087         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
1088         (WebCore::TestObjV8Internal::MethodCallback):
1089         (WebCore::TestObjV8Internal::MethodWithArgsCallback):
1090         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
1091         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
1092         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
1093         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
1094         (WebCore):
1095         (WebCore::ConfigureV8TestObjTemplate):
1096
1097 2012-07-25  Shinya Kawanaka  <shinyak@chromium.org>
1098
1099         A validation bubble should not be modifiable.
1100         https://bugs.webkit.org/show_bug.cgi?id=92217
1101
1102         Reviewed by Kent Tamura.
1103
1104         A user can set -webkit-user-modify: read-write to validation message elements.
1105         This might cause a undesired crash like Bug 65738. They should be unmodifiable.
1106
1107         Test: fast/forms/validation-user-modify.html
1108
1109         * css/html.css:
1110         Added -webkit-user-modify: read-only !important; for these elements so that they won't be
1111         changed by a user.
1112         (::-webkit-validation-bubble):
1113         (::-webkit-validation-bubble-message):
1114         (::-webkit-validation-bubble-text-block):
1115         (::-webkit-validation-bubble-heading):
1116         (::-webkit-validation-bubble-arrow):
1117         (::-webkit-validation-bubble-arrow-clipper):
1118
1119 2012-07-25  Zeno Albisser  <zeno@webkit.org>
1120
1121         [Qt][WK2] Disable CopyToTexture for GraphicsSurfaceMac.
1122         https://bugs.webkit.org/show_bug.cgi?id=92159
1123
1124         Disable CopyToTexture feature for GraphicsSurface on Mac.
1125         While this is actually working, it is currently used for Tiles
1126         that are single buffered, and therefore requires a call to glFlush.
1127         This call blocks the GPU for about 40ms which would make smooth animations impossible.
1128
1129         Reviewed by Noam Rosenthal.
1130
1131         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1132         (WebCore::GraphicsSurface::platformCreate):
1133         (WebCore::GraphicsSurface::platformImport):
1134
1135 2012-07-25  Kenichi Ishibashi  <bashi@chromium.org>
1136
1137         [Chromium] Fix up includes in HarfBuzzNGFace.h
1138         https://bugs.webkit.org/show_bug.cgi?id=92127
1139
1140         Reviewed by Hajime Morita.
1141
1142         Move constructors of FontPlatformData from headers to corresponding cpp files
1143         so that we can use forward declaration for HarfBuzzNGFace instead of including HarfBuzzNGFace.h.
1144         This way we can include hb.h in HarfBuzzNGFace.h.
1145
1146         No new tests. No changes in behavior.
1147
1148         * platform/graphics/FontPlatformData.cpp:
1149         (WebCore::FontPlatformData::FontPlatformData): Moved from header file.
1150         (WebCore):
1151         * platform/graphics/FontPlatformData.h:
1152         (WebCore):
1153         (FontPlatformData): Moved to cpp file.
1154         * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Include HarfBuzzNGFace.h
1155         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
1156         (WebCore::FontPlatformData::FontPlatformData): Moved from header file.
1157         (WebCore):
1158         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
1159         (WebCore):
1160         (FontPlatformData): Moved to cpp file.
1161         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h: Include hb.h.
1162
1163 2012-07-24  Benjamin Poulain  <bpoulain@apple.com> && Joseph Pecoraro  <pecoraro@apple.com>
1164
1165         QualifiedName's HashSet should be big enough to hold at least all the static names
1166         https://bugs.webkit.org/show_bug.cgi?id=91891
1167
1168         Reviewed by Darin Adler.
1169
1170         QualifiedName's table has a standard size of 64 buckets. When initializing WebKit,
1171         we create 850 static QualifiedName for the standard names (HTMLNames, SVGNames etc).
1172
1173         The small base size forces us to grow and rehash the table several time on startup.
1174
1175         This patch solves the issue by defining the initial table size to the minimum size that
1176         can hold all the static QualifiedName.
1177
1178         * dom/QualifiedName.cpp:
1179         (QualifiedNameHashTraits):
1180         * dom/make_names.pl:
1181         (printNamesHeaderFile):
1182
1183 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
1184
1185         Remove anonymous namespace and make functions static.
1186         https://bugs.webkit.org/show_bug.cgi?id=92214
1187
1188         Reviewed by Adam Barth.
1189
1190         Mark functions as static instead of enclosing them in anonymous namespaces.
1191         One exception to this rule is when a function is passed as a template argument.
1192         In this case, the function must have an external linkage.
1193
1194         No functional change. Covered by existing tests.
1195
1196         * html/parser/HTMLConstructionSite.cpp:
1197         (WebCore::hasImpliedEndTag):
1198         (WebCore::causesFosterParenting):
1199         (WebCore::isAllWhitespace):
1200         * html/parser/HTMLDocumentParser.cpp:
1201         (WebCore):
1202         (WebCore::tokenizerStateForContextElement):
1203         * html/parser/HTMLElementStack.cpp:
1204         (WebCore::isNumberedHeaderElement):
1205         (WebCore::isRootNode):
1206         (WebCore):
1207         * html/parser/HTMLEntityParser.cpp:
1208         (WebCore::isAlphaNumeric):
1209         * html/parser/HTMLEntitySearch.cpp:
1210         (WebCore::halfway):
1211         * html/parser/HTMLPreloadScanner.cpp:
1212         (WebCore):
1213         * html/parser/HTMLTokenizer.cpp:
1214         (WebCore::toLowerCase):
1215         (WebCore::vectorEqualsString):
1216         (WebCore::isEndTagBufferingState):
1217         * html/parser/HTMLTreeBuilder.cpp:
1218         (WebCore):
1219         (WebCore::uninitializedPositionValue1):
1220         (WebCore::isAllWhitespace):
1221         (WebCore::isAllWhitespaceOrReplacementCharacters):
1222         (WebCore::isNumberedHeaderTag):
1223         (WebCore::isCaptionColOrColgroupTag):
1224         (WebCore::isTableCellContextTag):
1225         (WebCore::isTableBodyContextTag):
1226         (WebCore::isSpecialNode):
1227         (WebCore::isNonAnchorNonNobrFormattingTag):
1228         (WebCore::isNonAnchorFormattingTag):
1229         (WebCore::isFormattingTag):
1230         (WebCore::closestFormAncestor):
1231         (WebCore::mapLoweredLocalNameToName):
1232         (WebCore::adjustSVGTagNameCase):
1233         (WebCore::adjustAttributes):
1234         (WebCore::adjustSVGAttributes):
1235         (WebCore::adjustMathMLAttributes):
1236         (WebCore::addNamesWithPrefix):
1237         (WebCore::adjustForeignAttributes):
1238
1239 2012-07-24  Vsevolod Vlasov  <vsevik@chromium.org>
1240
1241         Unreviewed r123494 follow-up: fixed inspector undock icon.
1242
1243         * inspector/front-end/Images/statusbarButtonGlyphs.png:
1244
1245 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
1246
1247         Read tag names and attributes from the saved tokens where possible.
1248         https://bugs.webkit.org/show_bug.cgi?id=92079
1249
1250         Reviewed by Adam Barth.
1251
1252         Read tag names and attributes from the saved tokens, not from the DOM.
1253         Also added convenient methods such as hasLocalName, hasTagName, localName,
1254         isElementNode and isDocumentFragmentNode to HTMLStackItem class.
1255
1256         No new tests, covered by existing tests.
1257
1258         * html/parser/HTMLConstructionSite.cpp:
1259         (WebCore::HTMLNames::hasImpliedEndTag):
1260         (WebCore::HTMLNames::causesFosterParenting):
1261         (WebCore::HTMLConstructionSite::generateImpliedEndTagsWithExclusion):
1262         (WebCore::HTMLConstructionSite::generateImpliedEndTags):
1263         (WebCore::HTMLConstructionSite::shouldFosterParent):
1264         * html/parser/HTMLConstructionSite.h:
1265         (WebCore::HTMLConstructionSite::currentStackItem):
1266         * html/parser/HTMLElementStack.cpp:
1267         (WebCore::HTMLNames::isNumberedHeaderElement):
1268         (WebCore::HTMLNames::isRootNode):
1269         (WebCore::HTMLNames::isScopeMarker):
1270         (WebCore::HTMLNames::isListItemScopeMarker):
1271         (WebCore::HTMLNames::isTableScopeMarker):
1272         (WebCore::HTMLNames::isTableBodyScopeMarker):
1273         (WebCore::HTMLNames::isTableRowScopeMarker):
1274         (WebCore::HTMLNames::isForeignContentScopeMarker):
1275         (WebCore::HTMLNames::isButtonScopeMarker):
1276         (WebCore::HTMLNames::isSelectScopeMarker):
1277         (WebCore::HTMLElementStack::ElementRecord::replaceElement):
1278         (WebCore::HTMLElementStack::popUntilNumberedHeaderElementPopped):
1279         (WebCore::HTMLElementStack::popUntilTableScopeMarker):
1280         (WebCore::HTMLElementStack::popUntilTableBodyScopeMarker):
1281         (WebCore::HTMLElementStack::popUntilTableRowScopeMarker):
1282         (WebCore::HTMLElementStack::isMathMLTextIntegrationPoint):
1283         (WebCore::HTMLElementStack::isHTMLIntegrationPoint):
1284         (WebCore::HTMLElementStack::popUntilForeignContentScopeMarker):
1285         (WebCore::HTMLElementStack::pushRootNode):
1286         (WebCore::HTMLElementStack::oneBelowTop):
1287         (WebCore::HTMLElementStack::topmost):
1288         (WebCore):
1289         (WebCore::inScopeCommon):
1290         (WebCore::HTMLElementStack::hasNumberedHeaderElementInScope):
1291         (WebCore::HTMLElementStack::inScope):
1292         * html/parser/HTMLElementStack.h:
1293         (WebCore::HTMLElementStack::topStackItem):
1294         (HTMLElementStack):
1295         (WebCore::isInHTMLNamespace):
1296         * html/parser/HTMLStackItem.h:
1297         (WebCore::HTMLStackItem::isDocumentFragmentNode):
1298         (WebCore::HTMLStackItem::isElementNode):
1299         (HTMLStackItem):
1300         (WebCore::HTMLStackItem::hasLocalName):
1301         (WebCore::HTMLStackItem::hasTagName):
1302         (WebCore::HTMLStackItem::HTMLStackItem):
1303         * html/parser/HTMLTreeBuilder.cpp:
1304         (WebCore):
1305         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
1306         (WebCore::HTMLTreeBuilder::processFakeEndTag):
1307         (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
1308         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1309         (WebCore::HTMLTreeBuilder::processStartTag):
1310         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
1311         (WebCore::HTMLTreeBuilder::furthestBlockForFormattingElement):
1312         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1313         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
1314         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
1315         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
1316         (WebCore::HTMLTreeBuilder::processCaptionEndTagForInCaption):
1317         (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
1318         (WebCore::HTMLTreeBuilder::processEndTag):
1319         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
1320         (WebCore::HTMLTreeBuilder::processEndOfFile):
1321         (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
1322         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
1323         * html/parser/HTMLTreeBuilder.h:
1324
1325 2012-07-24  Hironori Bono  <hbono@chromium.org>
1326
1327         Avoid moving child objects multiple times when vertical scrollbar are shown at the left side.
1328         https://bugs.webkit.org/show_bug.cgi?id=91756
1329
1330         Reviewed by Tony Chang.
1331
1332         My r123067 moves the top-left origin of an RTL element right when its vertical
1333         scrollbar is shown at its left side. (That is, r123067 moves all child objects
1334         in the RTL element right.) This change also increases RenderBox::clientLeft()
1335         at the same time, i.e. it also moves child objects right. Furthermore, my r109512
1336         moves positioned objects in an RTL element right at the same time. This makes
1337         WebKit move objects in an RTL element up to three times by the scrollbar width.
1338         (Moving an absolute object right increases the scrollWidth value and it causes
1339         this bug.) This change removes unnecessary code that moves objects right in my
1340         r109512 and RenderBox::clientLeft().
1341
1342         Test: scrollbars/rtl/div-absolute.html
1343               fast/block/float/026.html
1344               fast/block/float/028.html
1345               fast/overflow/unreachable-overflow-rtl-bug.html
1346
1347         * dom/Element.cpp:
1348         (WebCore::Element::clientLeft): Increase clientLeft value by the width of a vertical scrollbar as written in the CSSOM specification.
1349         * rendering/RenderBlock.cpp:
1350         (WebCore::RenderBlock::addOverflowFromPositionedObjects): Removed unnecessary code.
1351         (WebCore::RenderBlock::determineLogicalLeftPositionForChild): Removed unnecessary code.
1352         * rendering/RenderBox.h:
1353         (WebCore::RenderBox::clientLeft): Removed unnecessary code.
1354
1355 2012-07-24  Dan Bernstein  <mitz@apple.com>
1356
1357         RenderBlock::positionForPoint can fail when the block or its children have a vertical writing mode
1358         https://bugs.webkit.org/show_bug.cgi?id=92202
1359
1360         Reviewed by Beth Dakin.
1361
1362         Test: fast/writing-mode/positionForPoint.html
1363
1364         * rendering/RenderBlock.cpp:
1365         (WebCore::RenderBlock::positionForPoint): Fixed two issues, each of which are covered by
1366         one of the sub-tests in the new regression test: (1) changed to compare children’s logical
1367         bounds against pointInLogicalContents, i.e. compare childern’s horizontal bounds to the
1368         point’s horizontal component; and (2) changed to use logicalTopForChild and
1369         logicalHeightForChild, which account for this block’s writing mode, instead of logicalTop
1370         and logicalBottom, which are based on the child’s writing mode.
1371
1372 2012-07-24  MORITA Hajime  <morrita@google.com>
1373
1374         https://bugs.webkit.org/show_bug.cgi?id=89179
1375         Rendering LI having Shadow DOM seems weird
1376
1377         Reviewed by Dimitri Glazkov.
1378
1379         This incorrect rendering happend because HTMLLIElement::attach()
1380         wasn't aware of composed shadow subtree. This change makes it
1381         aware of that using ComposedShadowTreeParentWalker.
1382
1383         Test: fast/dom/shadow/shadow-and-list-elements.html
1384
1385         * html/HTMLLIElement.cpp:
1386         (WebCore::HTMLLIElement::attach):
1387
1388 2012-07-24  Alec Flett  <alecflett@chromium.org>
1389
1390         IndexedDB: fix #include dependencies so IDBRequest isn't an include root
1391         https://bugs.webkit.org/show_bug.cgi?id=92167
1392
1393         Reviewed by Tony Chang.
1394
1395         Remove implicit dependencies due to using IDBRequest.h, and fix all
1396         places that break as a result.
1397
1398         * Modules/indexeddb/IDBCallbacks.h:
1399         (WebCore):
1400         * Modules/indexeddb/IDBObjectStore.cpp:
1401         * Modules/indexeddb/IDBRequest.h:
1402         * inspector/InspectorIndexedDBAgent.cpp:
1403
1404 2012-07-24  Keishi Hattori  <keishi@webkit.org>
1405
1406         Move PagePopupClient helper functions so they can be shared
1407         https://bugs.webkit.org/show_bug.cgi?id=92096
1408
1409         Reviewed by Kent Tamura.
1410
1411         Move PagePopupClient helper functions to a separate file,
1412         so they can be shared with new PagePopupClients.
1413
1414         No new tests. Covered by fast/forms/date/calendar-picker-appearance.html
1415
1416         * WebCore.gypi: Added PagePopupClient.cpp
1417         * html/shadow/CalendarPickerElement.cpp:
1418         (WebCore::CalendarPickerElement::writeDocument): Modified to use PagePopupClient.
1419         * page/PagePopupClient.cpp: Added.
1420         (WebCore):
1421         (WebCore::PagePopupClient::addJavaScriptString):
1422         (WebCore::PagePopupClient::addProperty):
1423         * page/PagePopupClient.h:
1424         (WebCore::PagePopupClient::addString):
1425
1426 2012-07-24  Jer Noble  <jer.noble@apple.com>
1427
1428         setting playbackRate on a MediaController doesn't change the playbackRate for slaved media
1429         https://bugs.webkit.org/show_bug.cgi?id=92035
1430
1431         Reviewed by Darin Adler.
1432
1433         Allow updatePlaybackRate() to change the MediaPlayer rate when the media element has a 
1434         current media controller.
1435
1436         Test: media/media-controller-playbackrate.html
1437
1438         * html/HTMLMediaElement.cpp:
1439         (WebCore::HTMLMediaElement::updatePlaybackRate):
1440
1441 2012-07-24  Hayato Ito  <hayato@chromium.org>
1442
1443         Rename FocusScope to FocusNavigationScope.
1444         https://bugs.webkit.org/show_bug.cgi?id=92062
1445
1446         Reviewed by Dimitri Glazkov.
1447
1448         FocusNavagationScope is better name than FocusScope since the
1449         class is only used for controlling focus navigation.
1450
1451         No new tests - no functional changes.
1452
1453         * page/FocusController.cpp:
1454         (WebCore::FocusNavigationScope::FocusNavigationScope):
1455         (WebCore::FocusNavigationScope::rootNode):
1456         (WebCore::FocusNavigationScope::owner):
1457         (WebCore::FocusNavigationScope::focusNavigationScopeOf):
1458         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
1459         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByIFrame):
1460         (WebCore::FocusController::findFocusableNodeDecendingDownIntoFrameDocument):
1461         (WebCore::FocusController::advanceFocusInDocumentOrder):
1462         (WebCore::FocusController::findFocusableNodeAcrossFocusScope):
1463         (WebCore::FocusController::findFocusableNodeRecursively):
1464         (WebCore::FocusController::findFocusableNode):
1465         (WebCore::FocusController::nextFocusableNode):
1466         (WebCore::FocusController::previousFocusableNode):
1467         * page/FocusController.h:
1468         (FocusNavigationScope):
1469         (FocusController):
1470
1471 2012-07-24  Michael Saboff  <msaboff@apple.com>
1472
1473         Convert HTML parser to handle 8-bit resources without converting to UChar*
1474         https://bugs.webkit.org/show_bug.cgi?id=90321
1475
1476         Reviewed by Geoffrey Garen.
1477
1478         No new tests, no new functionality therefore covered by existing tests.
1479
1480         Changed the parsing of HTML to handle 8-bit strings without converting the 
1481         whole string to 16-bits.  Primary change was to use the appropriate 
1482         character pointer type (LChar* or UChar*) depending on the source string.
1483         This access is abstracted in SegmentedSubstring by getCurrentChar{8,16} and
1484         incrementAndGetCurrentChar{8,16} methods.  In SegmentedString, the advance()
1485         and advanceAndUpdateLineNumber() methods have been refactored into a
1486         state machine managed pair of function pointers.  The possible functions
1487         have not only the 8 and 16 bitness factored out, they also have the 
1488         "exclude line numbers" logic factored out for advanceAndUpdateLineNumber().
1489         This provides a net speed-up even with the 8/16 bit testing.
1490         Other changes involve using String methods to access and compare with the
1491         source data.
1492
1493         * html/FTPDirectoryDocument.cpp:
1494         (WebCore::FTPDirectoryDocumentParser::append): Changed to use currentChar()
1495         instead of SegmentedString '*' operator.
1496         * html/parser/HTMLEntityParser.cpp: Changed to use currentChar() instead of
1497         SegmentedString '*' operator.
1498         * html/parser/HTMLParserIdioms.cpp:
1499         (WebCore::stripLeadingAndTrailingHTMLSpaces): Added 8-bit fast path.
1500         * html/parser/HTMLSourceTracker.cpp:
1501         (WebCore::HTMLSourceTracker::sourceForToken): Changed to use currentChar() instead of
1502         SegmentedString '*' operator.
1503         * loader/cache/CachedScript.cpp:
1504         (WebCore::CachedScript::script): Updated to use new String::dataSize() method.
1505         * platform/text/SegmentedString.cpp:
1506         (WebCore::SegmentedString::SegmentedString):
1507         (WebCore::SegmentedString::operator=):
1508         (WebCore::SegmentedString::clear):
1509         (WebCore::SegmentedString::append):
1510         (WebCore::SegmentedString::prepend):
1511         (WebCore::SegmentedString::advanceSubstring):
1512         (WebCore::SegmentedString::advance): Changed to be a wrapper that invokes current 
1513         advance function.
1514         (WebCore::SegmentedString::advance8): Fast path advance function for 8 bit data.
1515         (WebCore::SegmentedString::advance16): Fast path advance function for 16 bit data.
1516         (WebCore::SegmentedString::advanceAndUpdateLineNumber8IncludeLineNumbers): Fast
1517         path advanceAndUpdateLineNumber for 8 bit data when we need to update the line number.
1518         (WebCore::SegmentedString::advanceAndUpdateLineNumber16IncludeLineNumbers): Fast
1519         path advanceAndUpdateLineNumber for 16 bit data when we need to update the line number.
1520         (WebCore::SegmentedString::advanceSlowCase): Slow case advance function for both
1521         8 and 16 bit advance.
1522         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase): Slow case
1523         advanceAndUpdateLineNumber function for both 8 and 16 bit data.
1524         (WebCore::SegmentedString::advanceEmpty): Advance function when input has been exhausted.
1525         * platform/text/SegmentedString.h:
1526         (WebCore::SegmentedSubstring::SegmentedSubstring):
1527         (WebCore::SegmentedSubstring::clear):
1528         (SegmentedSubstring):
1529         (WebCore::SegmentedSubstring::is8Bit): New getter.
1530         (WebCore::SegmentedSubstring::appendTo):
1531         (WebCore::SegmentedSubstring::getCurrentChar8): New getter for the 8 bit case.
1532         (WebCore::SegmentedSubstring::getCurrentChar16): New getter for the 16 bit case.
1533         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar8): New wrapper functions
1534         that pre-increments the 8 bit pointer and returns the next character.
1535         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar16): New wrapper functions
1536         that pre-increments the 16 bit pointer and returns the next character.
1537         (WebCore::SegmentedSubstring::currentSubString):
1538         (WebCore::SegmentedSubstring::getCurrentChar):
1539         (WebCore::SegmentedSubstring::incrementAndGetCurrentChar):
1540         (WebCore::SegmentedString::SegmentedString):
1541         (WebCore::SegmentedString::push):
1542         (WebCore::SegmentedString::isEmpty):
1543         (WebCore::SegmentedString::lookAhead):
1544         (WebCore::SegmentedString::lookAheadIgnoringCase):
1545         (WebCore::SegmentedString::advance):
1546         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
1547         (WebCore::SegmentedString::advanceAndASSERT):
1548         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
1549         (WebCore::SegmentedString::advancePastNonNewline):
1550         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
1551         (WebCore::SegmentedString::currentChar):
1552         (WebCore::SegmentedString::setSlowCase): Set advance function pointers to slow case
1553         functions.
1554         (WebCore::SegmentedString::decrementAndCheckLength): Decrement substring length and
1555         change to slow case functions when only one character left.
1556         (WebCore::SegmentedString::setAdvanceFunctionPointers): Select appropriate advance
1557         functions based on current substring.
1558         (WebCore::SegmentedString::lookAheadInline): Changed to use String::startsWith().
1559         (WebCore::SegmentedString::lookAheadSlowCase):
1560         * xml/parser/CharacterReferenceParserInlineMethods.h:
1561         (WebCore::consumeCharacterReference): Changed to use currentChar() instead of
1562         SegmentedString '*' operator.
1563         * xml/parser/MarkupTokenizerBase.h:
1564         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
1565         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek): Changed to use
1566         currentChar() instead of SegmentedString '*' operator.
1567         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
1568
1569 2012-07-24  Kenneth Russell  <kbr@google.com>
1570
1571         [chromium] Hint garbage collector to run if page uses Canvas contexts
1572         https://bugs.webkit.org/show_bug.cgi?id=76225
1573
1574         Reviewed by Kentaro Hara.
1575
1576         Upon creating a canvas context, set a hint in the current isolate
1577         indicating that a full GC should be done upon the next page
1578         navigation.
1579
1580         This improves Chrome's robustness on some WebGL stress tests which
1581         simulate real-world behavior by repeatedly navigating among
1582         several samples. More general measures are being investigated, but
1583         this change makes V8 behave the same as JSC on these stress tests.
1584         JSC doesn't currently use generational garbage collection, so it
1585         has more opportunities to discover unreferenced canvas contexts.
1586
1587         Test: fast/canvas/webgl/context-creation-and-destruction.html
1588
1589         * bindings/v8/V8Binding.cpp:
1590         (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
1591             Initialize per-isolate low memory hint.
1592         * bindings/v8/V8Binding.h:
1593         (V8BindingPerIsolateData):
1594         (WebCore::V8BindingPerIsolateData::setLowMemoryNotificationHint):
1595             Set a per-isolate hint to signal a low memory condition upon the next page navigation.
1596         (WebCore::V8BindingPerIsolateData::clearLowMemoryNotificationHint):
1597             Clear the previously set hint.
1598         (WebCore::V8BindingPerIsolateData::isLowMemoryNotificationHint):
1599             Get the previously set hint.
1600         * bindings/v8/V8Proxy.cpp:
1601         (WebCore::V8Proxy::hintForGCIfNecessary):
1602             If necessary, send V8 a hint that it should GC.
1603         (WebCore):
1604         (WebCore::V8Proxy::clearForClose):
1605         (WebCore::V8Proxy::clearForNavigation):
1606             Call hintForGCIfNecessary.
1607         * bindings/v8/V8Proxy.h:
1608         (V8Proxy):
1609         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1610         (WebCore::V8HTMLCanvasElement::getContextCallback):
1611             Set a hint that we should GC upon the next page navigation.
1612
1613 2012-07-24  Dave Tu  <dtu@chromium.org>
1614
1615         [chromium] Add time spent painting to GPU benchmarking renderingStats() API.
1616         https://bugs.webkit.org/show_bug.cgi?id=90019
1617
1618         Reviewed by Adrienne Walker.
1619
1620         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
1621         (WebCore::BitmapCanvasLayerTextureUpdater::prepareToUpdate):
1622         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
1623         (BitmapCanvasLayerTextureUpdater):
1624         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
1625         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect):
1626         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
1627         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect):
1628         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
1629         (Texture):
1630         (BitmapSkPictureCanvasLayerTextureUpdater):
1631         * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
1632         (WebCore::CanvasLayerTextureUpdater::paintContents):
1633         * platform/graphics/chromium/CanvasLayerTextureUpdater.h:
1634         (CanvasLayerTextureUpdater):
1635         * platform/graphics/chromium/ContentLayerChromium.cpp:
1636         (WebCore::ContentLayerChromium::update):
1637         * platform/graphics/chromium/ContentLayerChromium.h:
1638         (ContentLayerChromium):
1639         * platform/graphics/chromium/ImageLayerChromium.cpp:
1640         (WebCore::ImageLayerChromium::update):
1641         * platform/graphics/chromium/ImageLayerChromium.h:
1642         (ImageLayerChromium):
1643         * platform/graphics/chromium/LayerChromium.h:
1644         (WebCore):
1645         (WebCore::LayerChromium::update):
1646         * platform/graphics/chromium/LayerTextureUpdater.h:
1647         (WebCore):
1648         (WebCore::LayerTextureUpdater::Texture::prepareRect):
1649         (WebCore::LayerTextureUpdater::prepareToUpdate):
1650         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
1651         (WebCore::ScrollbarLayerChromium::updatePart):
1652         (WebCore::ScrollbarLayerChromium::update):
1653         * platform/graphics/chromium/ScrollbarLayerChromium.h:
1654         (ScrollbarLayerChromium):
1655         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
1656         (WebCore::SkPictureCanvasLayerTextureUpdater::prepareToUpdate):
1657         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
1658         (SkPictureCanvasLayerTextureUpdater):
1659         * platform/graphics/chromium/TiledLayerChromium.cpp:
1660         (WebCore::TiledLayerChromium::updateTiles):
1661         (WebCore::TiledLayerChromium::updateContentRect):
1662         * platform/graphics/chromium/TiledLayerChromium.h:
1663         (TiledLayerChromium):
1664         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1665         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
1666         (WebCore::CCLayerTreeHost::updateAnimations):
1667         (WebCore::CCLayerTreeHost::renderingStats):
1668         (WebCore::CCLayerTreeHost::paintMasksForRenderSurface):
1669         (WebCore::CCLayerTreeHost::paintLayerContents):
1670         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1671         (WebCore):
1672         (CCLayerTreeHost):
1673         * platform/graphics/chromium/cc/CCRenderingStats.h:
1674         (CCRenderingStats):
1675         (WebCore::CCRenderingStats::CCRenderingStats):
1676
1677 2012-07-24  Jian Li  <jianli@chromium.org>
1678
1679         [V8] Correct WebIDL type should be used in the testing IDL file 
1680         https://bugs.webkit.org/show_bug.cgi?id=92168
1681
1682         Reviewed by Kentaro Hara.
1683
1684         Updated bindings test.
1685
1686         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1687         (webkit_dom_test_obj_strict_function):
1688         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1689         * bindings/scripts/test/JS/JSTestObj.cpp:
1690         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
1691         * bindings/scripts/test/TestObj.idl:
1692         * bindings/scripts/test/V8/V8TestObj.cpp:
1693         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
1694         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
1695         (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
1696         (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
1697         (WebCore::TestObjV8Internal::strictFunctionCallback):
1698
1699 2012-07-24  Kent Tamura  <tkent@chromium.org>
1700
1701         Unreviewed, rolling out r123191.
1702         http://trac.webkit.org/changeset/123191
1703         https://bugs.webkit.org/show_bug.cgi?id=91804
1704
1705         It might cause another performance regression.
1706         http://code.google.com/p/chromium/issues/detail?id=138410
1707
1708         * html/FormController.cpp:
1709         (FormKeyGenerator):
1710         (WebCore::createKey):
1711         (WebCore::FormKeyGenerator::formKey):
1712         (WebCore::FormKeyGenerator::willDeleteForm):
1713
1714 2012-07-24  Vineet Chaudhary  <rgf748@motorola.com>
1715
1716         [JSBinding] Merging jsUnsignedLongArrayToVector() to toNativeArray() using traits.
1717         https://bugs.webkit.org/show_bug.cgi?id=90381
1718
1719         Reviewed by Kentaro Hara.
1720
1721         We can remove jsUnsignedLongArrayToVector() implementaion
1722         merging it to current and toNativeArray() traits.
1723
1724         Tests: TestObj.idl
1725         There should be no behavoiral changes as just refactoring.
1726
1727         * Modules/vibration/NavigatorVibration.idl: Use sequence<T> as method param than T[]
1728         * bindings/js/JSDOMBinding.cpp: Moved toJSSequence() to header file.
1729         * bindings/js/JSDOMBinding.h:
1730         (WebCore::toJSSequence): Moved toJSSequence() to header file.
1731         (WebCore::jsArray): Renamed Traits to JSValueTraits
1732         (WebCore::toNativeArray): Using traits.
1733         * bindings/js/JSDictionary.cpp:
1734         (WebCore::JSDictionary::convertValue):
1735         * bindings/js/JSMessagePortCustom.cpp:
1736         (WebCore::fillMessagePortArray):
1737         * bindings/scripts/CodeGeneratorJS.pm: Removed unsigned long[] specific binding code.
1738         (AddIncludesForType):
1739         (GenerateParametersCheckExpression):
1740         (JSValueToNative):
1741         (NativeToJSValue):
1742         * bindings/scripts/CodeGeneratorV8.pm:
1743         (GenerateParametersCheckExpression): Added check sequence<T> check for overloaded methods.
1744         * bindings/scripts/test/JS/JSTestObj.cpp: Rebased binding test.
1745         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
1746         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
1747         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
1748         * bindings/scripts/test/JS/JSTestObj.h: Rebased binding test.
1749         * bindings/scripts/test/TestObj.idl: Added test for sequence<T> as method parameter.
1750         * bindings/scripts/test/V8/V8TestObj.cpp: Rebased binding test.
1751         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
1752         (TestObjV8Internal):
1753         (WebCore::TestObjV8Internal::overloadedMethodCallback):
1754
1755 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
1756
1757         Remove an invalid assertion introduced in r123536. Unreviewed.
1758
1759         * xml/parser/MarkupTokenBase.h:
1760         (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
1761
1762 2012-07-24  Sheriff Bot  <webkit.review.bot@gmail.com>
1763
1764         Unreviewed, rolling out r123504.
1765         http://trac.webkit.org/changeset/123504
1766         https://bugs.webkit.org/show_bug.cgi?id=92169
1767
1768         broke a bunch of text-related tests in chromium mac debug
1769         (Requested by zhenyao on #webkit).
1770
1771         * platform/text/cf/StringCF.cpp:
1772         (WTF::String::createCFString):
1773         * platform/text/cf/StringImplCF.cpp:
1774         (WTF::StringImpl::createCFString):
1775
1776 2012-07-24  Kwang Yul Seo  <skyul@company100.net>
1777
1778         Ensure Noah's ark without reading the DOM tree.
1779         https://bugs.webkit.org/show_bug.cgi?id=92065
1780
1781         Reviewed by Adam Barth.
1782
1783         Technically we shouldn't read attributes back from the DOM. If JavaScript changes
1784         the attributes values, we could get a slightly wrong output here.
1785
1786         Read attributes from tokens saved in the active formatting element list.
1787
1788         No new tests, covered by existing tests.
1789
1790         * html/parser/HTMLFormattingElementList.cpp:
1791         (WebCore::attributeCount):
1792         (WebCore::HTMLFormattingElementList::append):
1793         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
1794         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
1795         * html/parser/HTMLFormattingElementList.h:
1796         (HTMLFormattingElementList):
1797         * html/parser/HTMLStackItem.h:
1798         (WebCore::HTMLStackItem::localName):
1799         (HTMLStackItem):
1800
1801 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
1802
1803         Clear the external characters pointer of an AtomicHTMLToken before the raw token is cleared.
1804         https://bugs.webkit.org/show_bug.cgi?id=92056
1805
1806         Reviewed by Adam Barth.
1807
1808         AtomicHTMLToken keeps a pointer to the HTMLToken's buffer instead of copying the
1809         characters for performance. Clear the external characters pointer before the raw token
1810         is cleared to make sure that we won't have a dangling pointer.
1811
1812         No new tests - no functional changes.
1813
1814         * html/parser/HTMLTreeBuilder.cpp:
1815         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
1816         * xml/parser/MarkupTokenBase.h:
1817         (WebCore::AtomicMarkupTokenBase::clearExternalCharacters):
1818         (AtomicMarkupTokenBase):
1819
1820 2012-07-24  Jian Li  <jianli@chromium.org>
1821
1822         Add per-context setting for html notifications
1823         https://bugs.webkit.org/show_bug.cgi?id=91295
1824
1825         Reviewed by Adam Barth.
1826
1827         Added a new per-context setting to control the enabling of html notifications.
1828         For chromium port, we're going to disable html notifications for web
1829         pages, but still keep it enabled for extensions.
1830
1831         Also enhance V8 code generator to support V8EnabledPerContext attribute
1832         for methods.
1833
1834         Updated the binding tests.
1835
1836         * Modules/notifications/NotificationCenter.cpp:
1837         (WebCore::NotificationCenter::document): Expose document for being used by installPerContextProperties.
1838         (WebCore):
1839         * Modules/notifications/NotificationCenter.h:
1840         (NotificationCenter):
1841         * Modules/notifications/NotificationCenter.idl: Add V8EnabledPerContext attribute.
1842         * bindings/scripts/CodeGeneratorV8.pm: V8EnabledPerContext now supports methods.
1843         (GenerateHeader):
1844         (IsStandardFunction):
1845         (GenerateNonStandardFunction):
1846         (GenerateImplementation):
1847         (GenerateToV8Converters):
1848         (GetContextEnableFunction):
1849         * bindings/scripts/test/TestObj.idl: Add test case for V8EnabledPerContext methods.
1850         * bindings/scripts/test/V8/V8TestObj.cpp: Update test result.
1851         (WebCore::TestObjV8Internal::enabledAtContextMethod1Callback):
1852         (TestObjV8Internal):
1853         (WebCore::TestObjV8Internal::enabledAtContextMethod2Callback):
1854         (WebCore::V8TestObj::installPerContextProperties):
1855         (WebCore::V8TestObj::wrapSlow):
1856         * dom/ContextFeatures.cpp: Add a new per-context feature.
1857         (WebCore::ContextFeatures::htmlNotificationsEnabled):
1858         (WebCore):
1859         * dom/ContextFeatures.h: Add a new per-context feature.
1860
1861 2012-07-24  Sheriff Bot  <webkit.review.bot@gmail.com>
1862
1863         Unreviewed, rolling out r123499.
1864         http://trac.webkit.org/changeset/123499
1865         https://bugs.webkit.org/show_bug.cgi?id=92161
1866
1867         Android fails to compile (Requested by zhenyao on #webkit).
1868
1869         * GNUmakefile.list.am:
1870         * Modules/mediastream/MediaStream.cpp:
1871         (WebCore::MediaStream::MediaStream):
1872         (WebCore::MediaStream::addTrack):
1873         * Modules/mediastream/MediaStreamTrack.cpp:
1874         (WebCore::MediaStreamTrack::create):
1875         (WebCore::MediaStreamTrack::MediaStreamTrack):
1876         (WebCore::MediaStreamTrack::~MediaStreamTrack):
1877         (WebCore::MediaStreamTrack::setEnabled):
1878         * Modules/mediastream/MediaStreamTrack.h:
1879         (MediaStreamTrack):
1880         * Modules/mediastream/MediaStreamTrack.idl:
1881         * WebCore.gypi:
1882         * dom/EventNames.h:
1883         (WebCore):
1884         * dom/EventTargetFactory.in:
1885         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
1886         (WebKit):
1887         (WebKit::WebMediaStreamDescriptor::sources):
1888         * platform/chromium/support/WebMediaStreamSource.cpp:
1889         * platform/mediastream/MediaStreamSource.cpp: Removed.
1890         * platform/mediastream/MediaStreamSource.h:
1891         (WebCore::MediaStreamSource::create):
1892         (WebCore::MediaStreamSource::muted):
1893         (WebCore::MediaStreamSource::setMuted):
1894         (WebCore::MediaStreamSource::MediaStreamSource):
1895         (MediaStreamSource):
1896         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
1897         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
1898         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
1899
1900 2012-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
1901
1902         Crash in RenderTableSection::layoutRows
1903         https://bugs.webkit.org/show_bug.cgi?id=92145
1904
1905         Reviewed by Abhishek Arya.
1906
1907         The crash came from the insertChildNode logic being confused and choosing the wrong
1908         renderer for insertion. This is because after r123159, table anonymous wrappers can
1909         be created as 'inline-table' and wouldn't pass the isAnonymousBlock() check.
1910
1911         This change also aligns the ancestor iteration with RenderBlock::addChildToAnonymousColumnBlocks.
1912
1913         Test: fast/table/crash-table-section-layoutRows.html
1914
1915         * rendering/RenderObjectChildList.cpp:
1916         (WebCore::RenderObjectChildList::insertChildNode):
1917         Changed the code to always get the right child. There is no justification to not
1918         walking up to the |owner|'s direct child in all cases.
1919
1920 2012-07-24  Tony Chang  <tony@chromium.org>
1921
1922         Make RenderBlock::paintChildren virtual so sub classes can change the paint order
1923         https://bugs.webkit.org/show_bug.cgi?id=92042
1924
1925         Reviewed by Ojan Vafai.
1926
1927         The flexbox spec says that the order property should change the paint order of flex children.
1928         To make that possible, make paintChildren virtual so RenderFlexibleBox can override it.
1929
1930         No new tests, this is just a refactoring.
1931
1932         * rendering/RenderBlock.cpp:
1933         (WebCore::RenderBlock::paintContents): Move some code out of paintChildren into paintContents.
1934         (WebCore::RenderBlock::paintChildren): Make virtual and just have it be a simple for loop.
1935         (WebCore::RenderBlock::paintChild): Move code out of paintChildren so subclasses can reuse.
1936         * rendering/RenderBlock.h:
1937         (RenderBlock): Make paintChildren virtual and protected so sub classes can call paintChild.
1938
1939 2012-07-24  Anna Cavender  <annacc@chromium.org>
1940
1941         Create SourceBuffer and SourceBufferList objects
1942         https://bugs.webkit.org/show_bug.cgi?id=91771
1943
1944         Reviewed by Eric Carlson.
1945
1946         SourceBuffer and SourceBufferList objects are needed in order to
1947         implement the new object-oriented MediaSource API:
1948         http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
1949
1950         No new tests - will be able to test after landing BUGWK91775
1951
1952         Adding new files to build files:
1953         * CMakeLists.txt:
1954         * DerivedSources.cpp:
1955         * DerivedSources.make:
1956         * DerivedSources.pri:
1957         * GNUmakefile.am:
1958         * GNUmakefile.list.am:
1959         * Target.pri:
1960         * WebCore.gyp/WebCore.gyp:
1961         * WebCore.gypi:
1962         * WebCore.vcproj/WebCore.vcproj:
1963         * WebCore.vcproj/WebCoreCommon.vsprops:
1964         * WebCore.vcproj/copyForwardingHeaders.cmd:
1965         * WebCore.xcodeproj/project.pbxproj:
1966
1967         New objects:
1968         * Modules/mediasource/SourceBuffer.cpp: Added.
1969         * Modules/mediasource/SourceBuffer.h: Added.
1970         * Modules/mediasource/SourceBuffer.idl: Added.
1971         * Modules/mediasource/SourceBufferList.cpp: Added.
1972         * Modules/mediasource/SourceBufferList.h: Added.
1973         * Modules/mediasource/SourceBufferList.idl: Added.
1974
1975         New events:
1976         * dom/EventNames.h:
1977         (WebCore):
1978         * dom/EventTarget.h:
1979         (WebCore):
1980         * dom/EventTargetFactory.in:
1981
1982         Object constructors:
1983         * page/DOMWindow.idl:
1984
1985 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
1986
1987         Store the full year in GregorianDateTime
1988         https://bugs.webkit.org/show_bug.cgi?id=92067
1989
1990         Reviewed by Geoffrey Garen.
1991
1992         Use the full year instead of the offset from year 1900 
1993         for the year member variable of GregorianDateTime.
1994
1995         * bridge/qt/qt_runtime.cpp:
1996         (JSC::Bindings::convertValueToQVariant):
1997         (JSC::Bindings::convertQVariantToValue):
1998         * bridge/qt/qt_runtime_qt4.cpp:
1999         (JSC::Bindings::convertValueToQVariant):
2000         (JSC::Bindings::convertQVariantToValue):
2001
2002 2012-07-24  Benjamin Poulain  <bpoulain@apple.com>
2003
2004         Do not perform 8 to 16bits characters conversion when converting a WTFString to NSString/CFString
2005         https://bugs.webkit.org/show_bug.cgi?id=90720
2006
2007         Reviewed by Geoffrey Garen.
2008
2009         In most String to CFString conversion, we should be able to use the "NoCopy" constructor and have
2010         a relatively cheap conversion from WTF::String to CFString.
2011
2012         When the String is 8 bits, it was converted to 16 bits by getData16SlowCase() because of the call
2013         to String::characters().
2014
2015         This patch adds a path for creating a CFString from a 8bits string using CFStringCreateWithBytes.
2016
2017         This is covered by existing tests.
2018
2019         * platform/text/cf/StringCF.cpp:
2020         (WTF::String::createCFString): CFSTR() create static CFString, it is unecessary to retain it.
2021         * platform/text/cf/StringImplCF.cpp:
2022         (WTF::StringImpl::createCFString): The logic to avoid the StringWrapperCFAllocator has also been simplified.
2023         The allocator creation is now closer to where it is useful.
2024
2025 2012-07-24  Kentaro Hara  <haraken@chromium.org>
2026
2027         [V8] String wrappers should be marked Independent
2028         https://bugs.webkit.org/show_bug.cgi?id=91251
2029
2030         Reviewed by Adam Barth.
2031
2032         Currently V8 String wrappers are not marked Independent.
2033         By marking them Independent, they can be reclaimed by the scavenger GC.
2034         Although I couldn't find a case where this change reduces memory usage,
2035         this change would be important for upcoming changes in string conversion
2036         between V8 and WebKit (https://bugs.webkit.org/show_bug.cgi?id=91850).
2037
2038         'm_lastStringImpl = 0' in StringCache::remove() is important.
2039         Look at the following code:
2040
2041             static void cachedStringCallback(v8::Persistent<v8::Value> wrapper, void* parameter)
2042             {
2043                 ...;
2044                 stringCache()->remove(stringImpl);
2045                 wrapper.Dispose();
2046             }
2047
2048             void StringCache::remove(StringImpl* stringImpl)
2049             {
2050                 ...
2051                 if (m_lastStringImpl.get() == stringImpl)
2052                     m_lastStringImpl = 0;
2053             }
2054
2055             v8::Local<v8::String> v8ExternalString(StringImpl* stringImpl, v8::Isolate* isolate)
2056             {
2057                 if (m_lastStringImpl.get() == stringImpl) {
2058                     return v8::Local<v8::String>::New(m_lastV8String); // m_lastV8String points to a wrapper object that was accessed most recently.
2059                 }
2060                 return v8ExternalStringSlow(stringImpl, isolate);
2061             }
2062
2063         Without 'm_lastStringImpl = 0', already disposed m_lastV8String can be used
2064         in v8ExternalString(). This was a cause of the crashes of r122614.
2065
2066         Tests: At the initial commit of this patch (r122614),
2067                the following tests had been broken due to missing 'm_lastStringImpl = 0'.
2068                fast/workers/worker-location.html
2069                Dromaeo/cssquery-jquery.html
2070                Dromaeo/jslib-event-jquery.html
2071                Dromaeo/jslib-style-jquery.html
2072                Dromaeo/jslib-style-prototype.html
2073
2074         * bindings/v8/V8Binding.cpp:
2075         (WebCore::StringCache::remove):
2076         (WebCore::StringCache::v8ExternalStringSlow):
2077
2078 2012-07-24  Tommy Widenflycht  <tommyw@google.com>
2079
2080         MediaStream API: Update MediaStreamTrack to match the specification
2081         https://bugs.webkit.org/show_bug.cgi?id=90180
2082
2083         Reviewed by Adam Barth.
2084
2085         MediaStreamTracks are now required to show the status of the underlying source,
2086         and trigger events when that status changes.
2087
2088         Test: fast/mediastream/MediaStreamTrack.html
2089
2090         * GNUmakefile.list.am:
2091         * Modules/mediastream/MediaStream.cpp:
2092         (WebCore::MediaStream::MediaStream):
2093         (WebCore::MediaStream::addTrack):
2094         * Modules/mediastream/MediaStreamTrack.cpp:
2095         (WebCore::MediaStreamTrack::create):
2096         (WebCore::MediaStreamTrack::MediaStreamTrack):
2097         (WebCore::MediaStreamTrack::~MediaStreamTrack):
2098         (WebCore::MediaStreamTrack::setEnabled):
2099         (WebCore::MediaStreamTrack::readyState):
2100         (WebCore):
2101         (WebCore::MediaStreamTrack::sourceChangedState):
2102         (WebCore::MediaStreamTrack::stop):
2103         (WebCore::MediaStreamTrack::interfaceName):
2104         (WebCore::MediaStreamTrack::scriptExecutionContext):
2105         (WebCore::MediaStreamTrack::eventTargetData):
2106         (WebCore::MediaStreamTrack::ensureEventTargetData):
2107         * Modules/mediastream/MediaStreamTrack.h:
2108         * Modules/mediastream/MediaStreamTrack.idl:
2109         * WebCore.gypi:
2110         * dom/EventNames.h:
2111         (WebCore):
2112         * dom/EventTargetFactory.in:
2113         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
2114         * platform/chromium/support/WebMediaStreamSource.cpp:
2115         (WebKit::WebMediaStreamSource::setReadyState):
2116         (WebKit):
2117         (WebKit::WebMediaStreamSource::readyState):
2118         * platform/mediastream/MediaStreamSource.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.h.
2119         (WebCore):
2120         (WebCore::MediaStreamSource::create):
2121         (WebCore::MediaStreamSource::MediaStreamSource):
2122         (WebCore::MediaStreamSource::setReadyState):
2123         (WebCore::MediaStreamSource::addObserver):
2124         (WebCore::MediaStreamSource::removeObserver):
2125         * platform/mediastream/MediaStreamSource.h:
2126         (Observer):
2127         (WebCore::MediaStreamSource::Observer::~Observer):
2128         (MediaStreamSource):
2129         (WebCore::MediaStreamSource::readyState):
2130         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
2131         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
2132         (WebCore::MediaStreamCenterChromium::didCreateMediaStream):
2133
2134 2012-07-24  Scott Graham  <scottmg@chromium.org>
2135
2136         Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium
2137         https://bugs.webkit.org/show_bug.cgi?id=91667
2138
2139         Reviewed by Tony Chang.
2140
2141         Using native tools instead of cygwin version improves build time
2142         performance by roughly 50% (on top of previous cl-instead-of-gcc
2143         change).
2144
2145         Also, use - instead of / for cl flags, otherwise preprocessing fails
2146         very slowly (due to retry loop). And, replace \ with / in gperf
2147         command line. Without this, gperf emits the filename literally in
2148         #line directives which causes VS to error with "unescaped \ in
2149         string". Bizarrely, building ColorData.cpp with those \ in place
2150         causes the IDE to exit with no error message, which was the cause of
2151         the previous canary failures.
2152
2153         No new tests.
2154
2155         * WebCore.gyp/WebCore.gyp:
2156         * WebCore.gyp/scripts/rule_bison.py:
2157         * bindings/scripts/preprocessor.pm:
2158         (applyPreprocessor):
2159         * make-hash-tools.pl:
2160
2161 2012-07-24  Daniel Cheng  <dcheng@chromium.org>
2162
2163         Files from drag and file <input> should use getMIMETypeForExtension to determine content type.
2164         https://bugs.webkit.org/show_bug.cgi?id=91702
2165
2166         Reviewed by Jian Li.
2167
2168         Awhile back, we changed File to only use getWellKnownMIMETypeForExtension to prevent web
2169         pages from being able to detect what applications a user has installed indirectly through
2170         the MIME types. However, some sites like YouTube's drag and drop uploader use MIME types
2171         that aren't in WebKit's internal list, so we relax the restriction for Files that originate
2172         from an user action.
2173
2174         * fileapi/File.cpp:
2175         (WebCore::getContentTypeFromFileName):
2176         (WebCore::createBlobDataForFile):
2177         (WebCore::createBlobDataForFileWithName):
2178         (WebCore::createBlobDataForFileWithMetadata):
2179         (WebCore::File::createWithRelativePath):
2180         (WebCore::File::File):
2181         * fileapi/File.h:
2182         (File):
2183         (WebCore::File::create):
2184         (WebCore::File::createWithName):
2185         * html/FileInputType.cpp:
2186         (WebCore::FileInputType::createFileList):
2187         * platform/chromium/ChromiumDataObject.cpp:
2188         (WebCore::ChromiumDataObject::addFilename):
2189         * platform/gtk/ClipboardGtk.cpp:
2190         (WebCore::ClipboardGtk::files):
2191         * platform/mac/ClipboardMac.mm:
2192         (WebCore::ClipboardMac::files):
2193         * platform/qt/ClipboardQt.cpp:
2194         (WebCore::ClipboardQt::files):
2195         * platform/win/ClipboardWin.cpp:
2196         (WebCore::ClipboardWin::files):
2197
2198 2012-07-24  Vsevolod Vlasov  <vsevik@chromium.org>
2199
2200         Web Inspector: Snippets UI polish
2201         https://bugs.webkit.org/show_bug.cgi?id=92142
2202
2203         Reviewed by Pavel Feldman.
2204
2205         Changed snippets context menu items.
2206         Added run snippet status bar button.
2207         Removed unused edit source button.
2208
2209         * English.lproj/localizedStrings.js:
2210         * inspector/front-end/Images/statusbarButtonGlyphs.png:
2211         * inspector/front-end/ScriptSnippetModel.js:
2212         (WebInspector.SnippetJavaScriptSourceFrame):
2213         (WebInspector.SnippetJavaScriptSourceFrame.prototype.statusBarItems):
2214         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
2215         * inspector/front-end/ScriptsNavigator.js:
2216         (WebInspector.SnippetsNavigatorView.prototype.getOrCreateFolderTreeElement):
2217         (WebInspector.SnippetsNavigatorView.prototype.handleContextMenu):
2218         * inspector/front-end/ScriptsPanel.js:
2219         (WebInspector.ScriptsPanel.prototype._updateScriptViewStatusBarItems):
2220         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2221         * inspector/front-end/SourceFrame.js:
2222         (WebInspector.SourceFrame.prototype.statusBarItems):
2223         * inspector/front-end/inspector.css:
2224         * inspector/front-end/scriptsPanel.css:
2225         (.evaluate-snippet-status-bar-item .glyph):
2226         (.evaluate-snippet-status-bar-item.toggled .glyph):
2227
2228 2012-07-24  Nico Weber  <thakis@chromium.org>
2229
2230         [chromium/mac] Remove webcore_resource_files from WebCore.gypi
2231         https://bugs.webkit.org/show_bug.cgi?id=92129
2232
2233         Reviewed by Adam Barth.
2234
2235         It was added in http://trac.webkit.org/changeset/81706/trunk/Source/WebCore/WebCore.gypi .
2236         The changes in that revision were mostly reverted in http://trac.webkit.org/changeset/119921 ,
2237         but this block was forgotten. Since it just confused me for a bit, remove it.
2238
2239         * WebCore.gyp/WebCore.gyp:
2240
2241 2012-07-24  Julien Chaffraix  <jchaffraix@webkit.org>
2242
2243         inline-table wrapper should be generated for display: inline element only
2244         https://bugs.webkit.org/show_bug.cgi?id=92054
2245
2246         Reviewed by Abhishek Arya.
2247
2248         CSS 2.1 only takes into account the display when determining if we should generate
2249         an inline-table. My misreading of the spec would make us generate an inline-table
2250         wrapper for any inline formatting context.
2251
2252         Test: fast/table/inline-block-generates-table-wrapper.html
2253
2254         * rendering/RenderTable.cpp:
2255         (WebCore::RenderTable::createAnonymousWithParentRenderer):
2256         Changed to use display instead of isInline to properly match the spec.
2257
2258 2012-07-24  Alec Flett  <alecflett@chromium.org>
2259
2260         IndexedDB: Temporarily continue generating backend keys for empty key lists
2261         https://bugs.webkit.org/show_bug.cgi?id=92012
2262
2263         Reviewed by Tony Chang.
2264
2265         Temporarily change key behavior to allow chromium in_process_webkit
2266         to call putWithIndexKeys without inadvertently preventing index
2267         key generation. Note this is temporary until frontend key generation
2268         patch lands.
2269
2270         No new tests, this is part of a refactor that doesn't change behavior.
2271
2272         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2273         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2274
2275 2012-07-24  Pavel Feldman  <pfeldman@chromium.org>
2276
2277         Web Inspector: introduce UISourceCodeFrame.
2278         https://bugs.webkit.org/show_bug.cgi?id=92124
2279
2280         Reviewed by Vsevolod Vlasov.
2281
2282         Generic implementation of SourceFrame over UISourceCode added.
2283
2284         * WebCore.gypi:
2285         * WebCore.vcproj/WebCore.vcproj:
2286         * inspector/compile-front-end.py:
2287         * inspector/front-end/ScriptsPanel.js:
2288         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2289         * inspector/front-end/StylesPanel.js:
2290         * inspector/front-end/UISourceCodeFrame.js: Added.
2291         (WebInspector.UISourceCodeFrame):
2292         (WebInspector.UISourceCodeFrame.prototype.canEditSource):
2293         (WebInspector.UISourceCodeFrame.prototype.commitEditing):
2294         (WebInspector.UISourceCodeFrame.prototype.afterTextChanged):
2295         (WebInspector.UISourceCodeFrame.prototype._didEditContent):
2296         (WebInspector.UISourceCodeFrame.prototype._onContentChanged):
2297         (WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextMenu):
2298         * inspector/front-end/WebKit.qrc:
2299         * inspector/front-end/inspector.html:
2300
2301 2012-07-24  Dan Bernstein  <mitz@apple.com>
2302
2303         <rdar://problem/11945102> REGRESSION (r109451): Overlay scrollbars always use the default style, regardless of background color
2304         https://bugs.webkit.org/show_bug.cgi?id=92115
2305
2306         Reviewed by Mark Rowe.
2307
2308         * platform/Scrollbar.cpp:
2309         (WebCore::Scrollbar::scrollbarOverlayStyle): Reversed an incorrect null check.
2310
2311 2012-07-24  Andrew Wilson  <atwilson@chromium.org>
2312
2313         Another prospective build fix for Chromium. Unreviewed.
2314
2315         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2316
2317 2012-07-24  Andrew Wilson  <atwilson@chromium.org>
2318
2319         Unreviewed prospective build fix for Chromium. Changed include of hb.h in HarfBuzzNGFace.h
2320
2321         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2322
2323 2012-07-24  Dominik Röttsches  <dominik.rottsches@intel.com>
2324
2325         HarfBuzzFaceNG.h forward declarations conflict with newer versions of Harfbuzz
2326         https://bugs.webkit.org/show_bug.cgi?id=92103
2327
2328         Reviewed by Philippe Normand.
2329
2330         As preparation for enabling harfbuzz-ng for EFL, I would like to include the header
2331         here since the forward declarations are conflicting with the harfbuzz version
2332         we will use for EFL.
2333
2334         No new tests, no change in behavior.
2335
2336         * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
2337
2338 2012-07-24  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2339
2340         Fix blend filter for autovectorizing
2341         https://bugs.webkit.org/show_bug.cgi?id=91398
2342
2343         Reviewed by Nikolas Zimmermann.
2344
2345         To support auto-vectorizing, the loop had to be unswitched, and regular arrays used that 
2346         did not do boundary-checks in the inner loop. Finally the integer division by 255
2347         was optimized not use integer division intrinsics.
2348
2349         On a X86-64 architechture using GCC -O3 on the file, this gives a speed-up of 2.9x.
2350
2351         * platform/graphics/filters/FEBlend.cpp:
2352         (WebCore::fastDivideBy255):
2353         (BlendNormal):
2354         (WebCore::BlendNormal::apply):
2355         (BlendMultiply):
2356         (WebCore::BlendMultiply::apply):
2357         (BlendScreen):
2358         (WebCore::BlendScreen::apply):
2359         (BlendDarken):
2360         (WebCore::BlendDarken::apply):
2361         (BlendLighten):
2362         (WebCore::BlendLighten::apply):
2363         (BlendUnknown):
2364         (WebCore::BlendUnknown::apply):
2365         (WebCore::platformApply):
2366         (WebCore::FEBlend::platformApplyGeneric):
2367         (WebCore::FEBlend::platformApplySoftware):
2368         * platform/graphics/filters/FEBlend.h:
2369         (FEBlend):
2370
2371 2012-07-23  Hans Wennborg  <hans@chromium.org>
2372
2373         Speech JavaScript API: Add the SpeechRecognitionResult.emma attribute
2374         https://bugs.webkit.org/show_bug.cgi?id=91743
2375
2376         Reviewed by Adam Barth.
2377
2378         Implement the 'emma' attribute as described in the spec draft at
2379         http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
2380
2381         Test: fast/speech/scripted/emma.html
2382
2383         * Modules/speech/SpeechRecognitionResult.cpp:
2384         (WebCore::SpeechRecognitionResult::~SpeechRecognitionResult):
2385         (WebCore):
2386         (WebCore::SpeechRecognitionResult::emma):
2387         * Modules/speech/SpeechRecognitionResult.h:
2388         (WebCore):
2389         (SpeechRecognitionResult):
2390         * Modules/speech/SpeechRecognitionResult.idl:
2391         * WebCore.gypi:
2392         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp:
2393         (WebCore):
2394         (WebCore::V8SpeechRecognitionResult::visitDOMWrapper):
2395           We need to add an implicit reference from the result object to the
2396           emma object to keep the latters DOM tree alive across
2397           garbage-collection.
2398
2399 2012-07-24  Andrei Poenaru  <poenaru@adobe.com>
2400
2401         Web Inspector: Protocol Extension: add getFlowByName command
2402         https://bugs.webkit.org/show_bug.cgi?id=91855
2403
2404         Reviewed by Pavel Feldman.
2405
2406         The "getFlowByName" command should return a NamedFlow for a given document and name.
2407
2408         Test: inspector/styles/protocol-css-regions-commands.html
2409
2410         * inspector/Inspector.json:
2411         * inspector/InspectorCSSAgent.cpp:
2412         (WebCore::InspectorCSSAgent::getFlowByName):
2413         (WebCore):
2414         * inspector/InspectorCSSAgent.h:
2415         (InspectorCSSAgent):
2416         * inspector/front-end/CSSStyleModel.js:
2417         (WebInspector.CSSStyleModel.prototype.getNamedFlowCollectionAsync):
2418         (WebInspector.CSSStyleModel.prototype.getFlowByNameAsync):
2419         (WebInspector.NamedFlow):
2420         (WebInspector.NamedFlow.parsePayload):
2421
2422 2012-07-23  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
2423
2424         [Qt] Fix compilation against namespaced Qt
2425
2426         Reviewed by Simon Hausmann.
2427
2428         * platform/graphics/Font.h:
2429         * platform/network/ResourceHandleInternal.h:
2430         * platform/qt/ThirdPartyCookiesQt.h:
2431
2432 2012-07-24  Anthony Scian  <ascian@rim.com>
2433
2434         Web Inspector [JSC]: Enable initiator column in network panel.
2435         https://bugs.webkit.org/show_bug.cgi?id=65533
2436
2437         Reviewed by Vsevolod Vlasov.
2438
2439         With 40118 fixed for webkit, Preferences.displayInitiator should be set to true.
2440         Removed references to it since the optionality is no longer required.
2441
2442         Test: http/tests/inspector/network/network-initiator.html
2443
2444         * inspector/front-end/NetworkPanel.js:
2445         (WebInspector.NetworkLogView.prototype._createTable):
2446         (WebInspector.NetworkLogView.prototype.switchToDetailedView):
2447         (WebInspector.NetworkLogView.prototype.switchToBriefView):
2448         (WebInspector.NetworkDataGridNode.prototype.createCells):
2449         (WebInspector.NetworkDataGridNode.prototype.refreshRequest):
2450         * inspector/front-end/Settings.js:
2451
2452 2012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2453
2454         Missing *explicit* keyword in dom and page.
2455         https://bugs.webkit.org/show_bug.cgi?id=92074
2456
2457         Reviewed by Kentaro Hara.
2458
2459         Some constructors missed to use *explicit* keyword. They need to be added
2460         *explicit* keyword to contructor which has a parameter in order to avoid
2461         implicit type conversion.
2462
2463         Some files in dom directory can't use explicit keyword because of build breaks.
2464
2465         No new tests. Covered by existing tests.
2466
2467         * dom/BeforeLoadEvent.h:
2468         (WebCore::BeforeLoadEvent::BeforeLoadEvent):
2469         * dom/BeforeTextInsertedEvent.h:
2470         (BeforeTextInsertedEvent):
2471         * dom/ChildListMutationScope.h:
2472         (WebCore::ChildListMutationScope::ChildListMutationScope):
2473         * dom/ChildNodeList.h:
2474         (ChildNodeList):
2475         * dom/ClientRect.h:
2476         (ClientRect):
2477         * dom/ClientRectList.h:
2478         (ClientRectList):
2479         * dom/ComposedShadowTreeWalker.h:
2480         (ComposedShadowTreeParentWalker):
2481         * dom/DOMCoreException.h:
2482         (WebCore::DOMCoreException::DOMCoreException):
2483         * dom/DOMImplementation.h:
2484         (DOMImplementation):
2485         * dom/DatasetDOMStringMap.h:
2486         (WebCore::DatasetDOMStringMap::DatasetDOMStringMap):
2487         * dom/DeviceMotionController.h:
2488         (DeviceMotionController):
2489         * dom/DeviceOrientationController.h:
2490         (DeviceOrientationController):
2491         * dom/DocumentParser.h:
2492         (DocumentParser):
2493         * dom/EventException.h:
2494         (WebCore::EventException::EventException):
2495         * dom/EventListener.h:
2496         (WebCore::EventListener::EventListener):
2497         * dom/ExceptionBase.h:
2498         (ExceptionBase):
2499         * dom/GenericEventQueue.h:
2500         (GenericEventQueue):
2501         * dom/KeyboardEvent.h:
2502         (WebCore::KeypressCommand::KeypressCommand):
2503         * dom/MemoryInstrumentation.h:
2504         (WebCore::MemoryObjectInfo::MemoryObjectInfo):
2505         * dom/MessageChannel.h:
2506         (MessageChannel):
2507         * dom/MessagePort.h:
2508         (MessagePort):
2509         * dom/MessagePortChannel.h:
2510         (MessagePortChannel):
2511         * dom/MutationObserver.h:
2512         * dom/NamedNodeMap.h:
2513         (WebCore::NamedNodeMap::NamedNodeMap):
2514         * dom/NodeFilter.h:
2515         (WebCore::NodeFilter::NodeFilter):
2516         * dom/NodeWithIndex.h:
2517         (WebCore::NodeWithIndex::NodeWithIndex):
2518         * dom/Range.h:
2519         * dom/RangeException.h:
2520         (WebCore::RangeException::RangeException):
2521         * dom/RawDataDocumentParser.h:
2522         (WebCore::RawDataDocumentParser::RawDataDocumentParser):
2523         * dom/ScriptRunner.h:
2524         (ScriptRunner):
2525         * dom/SelectorQuery.h:
2526         (SelectorQuery):
2527         * dom/ShadowRoot.h:
2528         (ShadowRoot):
2529         * dom/SpaceSplitString.h:
2530         (SpaceSplitStringData):
2531         * dom/StaticHashSetNodeList.h:
2532         (StaticHashSetNodeList):
2533         * dom/StaticNodeList.h:
2534         (WebCore::StaticNodeList::StaticNodeList):
2535         * dom/TransformSource.h:
2536         (TransformSource):
2537         * dom/TreeScope.h:
2538         (TreeScope):
2539         * dom/WebKitNamedFlowCollection.h:
2540         (WebKitNamedFlowCollection):
2541         * page/EventHandler.h:
2542         (EventHandler):
2543         * page/FocusController.h:
2544         (FocusController):
2545         * page/FrameView.h:
2546         (FrameView):
2547         * page/MemoryInfo.h:
2548         (MemoryInfo):
2549         * page/Page.h:
2550         (Page):
2551         * page/PageGroup.h:
2552         (PageGroup):
2553         * page/PrintContext.h:
2554         (PrintContext):
2555         * page/Settings.h:
2556         (Settings):
2557         * page/SpeechInput.h:
2558         (SpeechInput):
2559         * page/SpeechInputResultList.h:
2560         (SpeechInputResultList):
2561         * page/WebKitAnimation.h:
2562         * page/WindowFeatures.h:
2563         (WindowFeatures):
2564         * page/WorkerNavigator.h:
2565         (WorkerNavigator):
2566
2567 2012-07-24  Kent Tamura  <tkent@chromium.org>
2568
2569         Replace some callsites of shadowAncestorNode() with shadowHost()
2570         https://bugs.webkit.org/show_bug.cgi?id=92060
2571
2572         Reviewed by Hajime Morita.
2573
2574         shadowAncestorNode() is deprecated.
2575
2576         No new tests. This shouldn't change behaviors.
2577
2578         * html/shadow/MediaControlElements.cpp:
2579         (WebCore::toParentMediaElement):
2580         * html/shadow/TextControlInnerElements.h:
2581         (WebCore::SpinButtonElement::isEnabledFormControl):
2582         (WebCore::SpinButtonElement::isReadOnlyFormControl):
2583         * platform/efl/RenderThemeEfl.cpp:
2584         (WebCore::RenderThemeEfl::paintMediaFullscreenButton):
2585         (WebCore::RenderThemeEfl::paintMediaMuteButton):
2586         * platform/gtk/RenderThemeGtk.cpp:
2587         (WebCore::getMediaElementFromRenderObject):
2588         (WebCore::centerRectVerticallyInParentInputElement):
2589         * platform/qt/RenderThemeQt.cpp:
2590         (WebCore::RenderThemeQt::paintSearchFieldCancelButton):
2591         (WebCore::RenderThemeQt::paintMediaSliderThumb):
2592         Removed an ASSERT() because nullness of o->node() is already asserted.
2593         * rendering/RenderInputSpeech.cpp:
2594         (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
2595         * rendering/RenderMediaControlsChromium.cpp:
2596         (WebCore::paintMediaSliderThumb):
2597         Passing shadowHost() to toParentMediaElement(), which accepts 0 and will return 0.
2598         (WebCore::paintMediaVolumeSliderThumb): ditto.
2599         * rendering/RenderThemeChromiumSkia.cpp:
2600         (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
2601         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
2602         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
2603         * rendering/RenderThemeMac.mm:
2604         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2605         Remove an ASSERT(input) because input never be null unless o->node() is
2606         null. If o->node() is null, this function crashes.
2607         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
2608         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
2609         (WebCore::RenderThemeMac::paintMediaMuteButton):
2610         It's ok to ignore "node is a media element" case because this function
2611         works only if node->isMediaControlElement().
2612         (WebCore::RenderThemeMac::paintMediaPlayButton): ditto.
2613         (WebCore::RenderThemeMac::paintMediaSliderTrack): ditto.
2614         * rendering/RenderThemeSafari.cpp:
2615         (WebCore::RenderThemeSafari::paintSearchFieldCancelButton):
2616         Remove an ASSERT(input) because input never be null unless o->node() is
2617         null. If o->node() is null, this function crashes.
2618         (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration): ditto.
2619         (WebCore::RenderThemeSafari::paintSearchFieldResultsButton): ditto.
2620         * rendering/RenderThemeWinCE.cpp:
2621         (WebCore::mediaElementParent):
2622
2623 2012-07-24  Peter Beverloo  <peter@chromium.org>
2624
2625         [Chromium] Build fix for Android after r123424
2626         https://bugs.webkit.org/show_bug.cgi?id=92082
2627
2628         Unreviewed build fix.
2629
2630         Mark removed the PlatformSupport.h header from ScrollbarThemeChromiumAndroid.cpp
2631         in r123424, while there still are two references left to another method and a
2632         constant. Re-add the include directive.
2633
2634         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
2635
2636 2012-07-24  Kentaro Hara  <haraken@chromium.org>
2637
2638         [JSC] REGRESSION(r122912): CodeGeneratorJS.pm generates wrong code
2639         for static attributes in supplemental IDL files
2640         https://bugs.webkit.org/show_bug.cgi?id=91925
2641
2642         Reviewed by Adam Barth.
2643
2644         r122912 implemented static attributes in CodeGeneratorJS.pm.
2645         However, it generates wrong code for static attributes in supplemental
2646         IDL files. This patch fixes it as shown in JSTestInterface.cpp.
2647         This fix aligns with the fix in CodeGeneratorV8.pm (r123308).
2648
2649         Test: bindings/scripts/test/TestSupplemental.idl
2650
2651         * bindings/scripts/CodeGeneratorJS.pm:
2652         (GenerateImplementation):
2653         * bindings/scripts/test/JS/JSTestInterface.cpp:
2654         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
2655         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
2656         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
2657
2658 2012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2659
2660         Add *explicit* keyword to constructor which has a parameter in bridge, history, loader and plugins.
2661         https://bugs.webkit.org/show_bug.cgi?id=92064
2662
2663         Reviewed by Kentaro Hara.
2664
2665         Some constructors missed to use *explicit* keyword. They need to be added
2666         *explicit* keyword to contructor which has a parameter in order to avoid
2667         implicit type conversion.
2668
2669         No new tests. Covered by existing tests.
2670
2671         * bridge/IdentifierRep.h:
2672         (WebCore::IdentifierRep::IdentifierRep):
2673         * history/BackForwardListImpl.h:
2674         (BackForwardListImpl):
2675         * history/CachedFrame.h:
2676         (CachedFrame):
2677         * history/HistoryItem.h:
2678         (HistoryItem):
2679         * loader/DocumentWriter.h:
2680         (DocumentWriter):
2681         * loader/FrameNetworkingContext.h:
2682         (WebCore::FrameNetworkingContext::FrameNetworkingContext):
2683         * loader/HistoryController.h:
2684         * loader/ImageLoader.h:
2685         (ImageLoader):
2686         * loader/LinkLoader.h:
2687         (LinkLoader):
2688         * loader/MainResourceLoader.h:
2689         (MainResourceLoader):
2690         * loader/NavigationAction.h:
2691         (NavigationAction):
2692         * loader/NavigationScheduler.h:
2693         (NavigationScheduler):
2694         * loader/PolicyChecker.h:
2695         (PolicyChecker):
2696         * loader/SubframeLoader.h:
2697         (SubframeLoader):
2698         * loader/ThreadableLoaderClientWrapper.h:
2699         (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
2700         * plugins/PluginData.h:
2701         (PluginData):
2702         * plugins/PluginViewBase.h:
2703         (WebCore::PluginViewBase::PluginViewBase):
2704
2705 2012-07-24  Patrick Gansterer  <paroga@webkit.org>
2706
2707         [Qt] Fix conversion from GregorianDateTime to QTime
2708         https://bugs.webkit.org/show_bug.cgi?id=92068
2709
2710         Reviewed by Simon Hausmann.
2711
2712         * bridge/qt/qt_runtime.cpp:
2713         (JSC::Bindings::convertValueToQVariant):
2714         * bridge/qt/qt_runtime_qt4.cpp:
2715         (JSC::Bindings::convertValueToQVariant):
2716
2717 2012-07-24  Arko Saha  <arko@motorola.com>
2718
2719         Microdata: Implement PropertyNodeList interface.
2720         https://bugs.webkit.org/show_bug.cgi?id=80269
2721
2722         Reviewed by Ryosuke Niwa.
2723
2724         Added support for PropertyNodeList interface. Currently HTMLPropertiesCollection.namedItem(name)
2725         returns NodeList object. Made changes so that it will return PropertyNodeList object.
2726
2727         Implemented propertyNodeList.getValues() method. It returns an array of various values. Its
2728         values are obtained from the "itemValue" DOM property of each of the elements represented by
2729         the object, in tree order.
2730
2731         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#propertynodelist
2732
2733         Tests: fast/dom/MicroData/nameditem-returns-propertynodelist.html
2734                fast/dom/MicroData/propertynodelist-getvalues-array-values-obtained-from-itemvalue-of-each-element.html
2735                fast/dom/MicroData/propertynodelist-getvalues-test.html
2736                fast/dom/MicroData/propertynodelist-test-add-remove-element.html
2737
2738         * CMakeLists.txt:
2739         * DerivedSources.cpp:
2740         * DerivedSources.make:
2741         * DerivedSources.pri:
2742         * GNUmakefile.list.am:
2743         * Target.pri:
2744         * UseJSC.cmake:
2745         * UseV8.cmake:
2746         * WebCore.gypi:
2747         * WebCore.vcproj/WebCore.vcproj:
2748         * WebCore.xcodeproj/project.pbxproj:
2749         * bindings/gobject/GNUmakefile.am:
2750         * bindings/js/JSBindingsAllInOne.cpp:
2751         * bindings/js/JSMicroDataItemValueCustom.cpp: Added.
2752         (WebCore):
2753         (WebCore::toJS): Added toJS() custom method. Returns Node if itemValue is node else returns String.
2754         * bindings/v8/custom/V8MicroDataItemValueCustom.cpp: Added.
2755         (WebCore):
2756         (WebCore::toV8): Added toV8 custom code.
2757         * dom/DynamicNodeList.cpp:
2758         (WebCore::DynamicNodeListCacheBase::rootNode): Return document if owner node has itemref attribute specified.
2759         (WebCore):
2760         (WebCore::DynamicNodeListCacheBase::ownerNodeHasItemRefAttribute): Returns true if owner node has itemref attribute
2761         specified with root type NodeListRootedAtDocumentIfOwnerHasItemrefAttr.
2762         (WebCore::DynamicNodeListCacheBase::invalidateCache):
2763         (WebCore::DynamicNodeList::itemWithName): Update itemrefElements cache if root type is
2764         NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr.
2765         * dom/DynamicNodeList.h: Added m_hasItemRefElements in DynamicNodeListCacheBase to check if itemRefElmenets cache
2766         is valid.
2767         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
2768         (WebCore::DynamicNodeListCacheBase::isRootedAtDocument):
2769         (DynamicNodeListCacheBase):
2770         (WebCore::DynamicNodeListCacheBase::isItemRefElementsCacheValid):
2771         (WebCore::DynamicNodeListCacheBase::setItemRefElementsCacheValid):
2772         (WebCore::DynamicNodeListCacheBase::rootType): Returns cached root type.
2773         (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Invalidate NodeListCache on itemref
2774         attribute change.
2775         * dom/Node.cpp:
2776         (WebCore::Node::propertyNodeList):
2777         * dom/Node.h:
2778         (WebCore):
2779         (Node):
2780         * dom/PropertyNodeList.cpp: Added.
2781         (WebCore):
2782         (WebCore::PropertyNodeList::PropertyNodeList):
2783         (WebCore::PropertyNodeList::~PropertyNodeList):
2784         (WebCore::PropertyNodeList::elementIsPropertyOfRefElement): Checks if the testElement is a property of Microdata
2785         item.
2786         (WebCore::PropertyNodeList::updateRefElements):
2787         (WebCore::PropertyNodeList::nodeMatches):
2788         (WebCore::PropertyNodeList::getValues): Returns PropertyValueArray whose values are obtained from the
2789         itemValue DOM property of each of the elements represented by the object, in tree order.
2790         * dom/PropertyNodeList.h: Added.
2791         (WebCore):
2792         (PropertyNodeList):
2793         (WebCore::PropertyNodeList::create):
2794         * dom/PropertyNodeList.idl: Added.
2795         * html/HTMLCollection.cpp:
2796         (WebCore::DynamicNodeListCacheBase::itemCommon): Update itemrefElements cache if its a NodeListCollectionType with
2797         root type NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr.
2798         * html/HTMLElement.cpp:
2799         (WebCore::HTMLElement::properties):
2800         (WebCore):
2801         (WebCore::HTMLElement::getItemRefElements): Returns the ItemRefElements list of given element. Added this
2802         method to share the code between HTMLPropertiesCollection and PropertyNodeList to update itemRefElements.
2803         * html/HTMLElement.h:
2804         (HTMLElement):
2805         * html/HTMLPropertiesCollection.cpp:
2806         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
2807         (WebCore::HTMLPropertiesCollection::updateRefElements):
2808         (WebCore::HTMLPropertiesCollection::updateNameCache):
2809         (WebCore::HTMLPropertiesCollection::namedItem): Return PropertyNodeList object instead of NodeList.
2810         (WebCore::HTMLPropertiesCollection::hasNamedItem): Return true if it finds an item with given
2811         name in the properties collection.
2812         * html/HTMLPropertiesCollection.h: Removed m_hasItemRefElements member variable, now DynamicNodeListCacheBase
2813         has isItemRefElementsCacheValid. Also removed m_hasPropertyNameCache, as DynamicNodeListCacheBase already has
2814         hasNameCache() and setHasNameCache().
2815         (WebCore):
2816         (HTMLPropertiesCollection):
2817         (WebCore::HTMLPropertiesCollection::invalidateCache):
2818         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
2819         * html/HTMLPropertiesCollection.idl:
2820         * html/MicroDataItemValue.idl: Added.
2821         * page/DOMWindow.idl:
2822
2823 2012-07-24  Kentaro Hara  <haraken@chromium.org>
2824
2825         [JSC] REGRESSION(r122912): CodeGeneratorJS.pm should not
2826         implicitly assume ScriptExecutionContext for static attributes
2827         https://bugs.webkit.org/show_bug.cgi?id=91924
2828
2829         Reviewed by Adam Barth.
2830
2831         r122912 implemented static attributes in CodeGeneratorJS.pm.
2832         However, the generated code assumes that static attributes
2833         always require ScriptExecutionContext, which is wrong.
2834         If we need a ScriptExecutionContext, we should specify
2835         [CallWith=ScriptExecutionContext].
2836
2837         This patch fixes CodeGeneratorJS.pm so that static attributes
2838         do not assume ScriptExecutionContext. This fix aligns with
2839         the fix in CodeGeneratorV8.pm in r123308.
2840
2841         Test: bindings/scripts/test/TestObj.idl
2842
2843         * bindings/scripts/CodeGeneratorJS.pm:
2844         (GenerateImplementation):
2845         * bindings/scripts/test/JS/JSTestInterface.cpp:
2846         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
2847         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
2848         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
2849         * bindings/scripts/test/JS/JSTestObj.cpp:
2850         (WebCore::jsTestObjConstructorStaticReadOnlyIntAttr):
2851         (WebCore::jsTestObjConstructorStaticStringAttr):
2852         (WebCore::setJSTestObjConstructorStaticStringAttr):
2853
2854 2012-07-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2855
2856         Missing *explicit* keyword in editing.
2857         https://bugs.webkit.org/show_bug.cgi?id=92055
2858
2859         Reviewed by Ryosuke Niwa.
2860
2861         Some constructors missed to use *explicit* keyword. They need to be added
2862         *explicit* keyword to contructor which has a parameter in order to avoid
2863         implicit type conversion.
2864
2865         No new tests. Covered by existing tests.
2866
2867         * editing/AlternativeTextController.h:
2868         (WebCore::AlternativeTextController::UNLESS_ENABLED):
2869         * editing/BreakBlockquoteCommand.h:
2870         (BreakBlockquoteCommand):
2871         * editing/DeleteButton.h:
2872         (DeleteButton):
2873         * editing/DeleteButtonController.h:
2874         (DeleteButtonController):
2875         * editing/EditCommand.h:
2876         (EditCommand):
2877         (WebCore::SimpleEditCommand::SimpleEditCommand):
2878         * editing/EditingBehavior.h:
2879         (WebCore::EditingBehavior::EditingBehavior):
2880         * editing/EditingStyle.h:
2881         (EditingStyle):
2882         * editing/Editor.h:
2883         (Editor):
2884         * editing/FrameSelection.h:
2885         (FrameSelection):
2886         * editing/InsertLineBreakCommand.h:
2887         (InsertLineBreakCommand):
2888         * editing/ModifySelectionListLevel.h:
2889         (ModifySelectionListLevelCommand):
2890         (DecreaseSelectionListLevelCommand):
2891         * editing/RemoveFormatCommand.h:
2892         (RemoveFormatCommand):
2893         * editing/RemoveNodeCommand.h:
2894         (RemoveNodeCommand):
2895         * editing/RemoveNodePreservingChildrenCommand.h:
2896         (RemoveNodePreservingChildrenCommand):
2897         * editing/ReplaceNodeWithSpanCommand.h:
2898         (ReplaceNodeWithSpanCommand):
2899         * editing/TextInsertionBaseCommand.h:
2900         (TextInsertionBaseCommand):
2901         * editing/UndoManager.h:
2902         (UndoManager):
2903         * editing/UnlinkCommand.h:
2904         (UnlinkCommand):
2905         * editing/WrapContentsInDummySpanCommand.h:
2906         (WrapContentsInDummySpanCommand):
2907
2908 2012-07-23  Dominic Mazzoni  <dmazzoni@google.com>
2909
2910         AX: Need AccessibilityObjects for nodes without renderers in canvas subtree
2911         https://bugs.webkit.org/show_bug.cgi?id=87899
2912
2913         Reviewed by Chris Fleizach.
2914
2915         Refactors AccessibilityRenderObject so that it inherits from a new class,
2916         AccessibilityNodeObject, that can be constructed from a Node without a
2917         renderer. Modifies AXObjectCache so that it automatically creates an
2918         AccessibilityNodeObject for elements in a canvas subtree but not otherwise.
2919         A new layout test verifies that this correctly exposes an accessibility
2920         tree with appropriate roles for elements in a canvas subtree.
2921
2922         This patch does not try to complete the implementation of
2923         AccessibilityNodeObject. Most AX methods are still unimplemented and need
2924         to be migrated from AccessibilityRenderObject to AccessibilityNodeObject
2925         in a future patch.
2926         
2927         This patch also doesn't change anything outside of WebCore/accessibility, so
2928         the rest of WebCore only calls AXObjectCache when there are changes to a
2929         RenderObject, not to a Node. Accessible notifications on nodes without
2930         renderers need to be implemented in a future patch.
2931
2932         Test: accessibility/canvas-accessibilitynodeobject.html
2933
2934         * CMakeLists.txt:
2935         * GNUmakefile.list.am:
2936         * Target.pri:
2937         * WebCore.gypi:
2938         * accessibility/AXObjectCache.cpp:
2939         (WebCore::AXObjectCache::get):
2940         (WebCore):
2941         (WebCore::createFromNode):
2942         (WebCore::AXObjectCache::getOrCreate):
2943         (WebCore::AXObjectCache::remove):
2944         * accessibility/AXObjectCache.h:
2945         (AXObjectCache):
2946         (WebCore::AXObjectCache::get):
2947         (WebCore::AXObjectCache::getOrCreate):
2948         (WebCore::AXObjectCache::remove):
2949         * accessibility/AccessibilityARIAGrid.cpp:
2950         (WebCore::AccessibilityARIAGrid::AccessibilityARIAGrid):
2951         (WebCore):
2952         (WebCore::AccessibilityARIAGrid::~AccessibilityARIAGrid):
2953         (WebCore::AccessibilityARIAGrid::init):
2954         (WebCore::AccessibilityARIAGrid::create):
2955         * accessibility/AccessibilityARIAGrid.h:
2956         (AccessibilityARIAGrid):
2957         * accessibility/AccessibilityARIAGridCell.cpp:
2958         (WebCore::AccessibilityARIAGridCell::create):
2959         * accessibility/AccessibilityARIAGridRow.cpp:
2960         (WebCore::AccessibilityARIAGridRow::create):
2961         * accessibility/AccessibilityAllInOne.cpp:
2962         * accessibility/AccessibilityList.cpp:
2963         (WebCore::AccessibilityList::create):
2964         * accessibility/AccessibilityListBox.cpp:
2965         (WebCore::AccessibilityListBox::create):
2966         * accessibility/AccessibilityMediaControls.cpp:
2967         (WebCore::AccessibilityMediaControl::create):
2968         (WebCore::AccessibilityMediaControlsContainer::create):
2969         (WebCore::AccessibilityMediaTimeline::create):
2970         (WebCore::AccessibilityMediaTimeDisplay::create):
2971         * accessibility/AccessibilityMenuList.cpp:
2972         (WebCore::AccessibilityMenuList::create):
2973         (WebCore):
2974         * accessibility/AccessibilityMenuList.h:
2975         (AccessibilityMenuList):
2976         * accessibility/AccessibilityNodeObject.cpp: Added.
2977         (WebCore):
2978         (WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
2979         (WebCore::AccessibilityNodeObject::~AccessibilityNodeObject):
2980         (WebCore::AccessibilityNodeObject::init):
2981         (WebCore::AccessibilityNodeObject::create):
2982         (WebCore::AccessibilityNodeObject::detach):
2983         (WebCore::AccessibilityNodeObject::childrenChanged):
2984         (WebCore::AccessibilityNodeObject::updateAccessibilityRole):
2985         (WebCore::AccessibilityNodeObject::firstChild):
2986         (WebCore::AccessibilityNodeObject::lastChild):
2987         (WebCore::AccessibilityNodeObject::previousSibling):
2988         (WebCore::AccessibilityNodeObject::nextSibling):
2989         (WebCore::AccessibilityNodeObject::parentObjectIfExists):
2990         (WebCore::AccessibilityNodeObject::parentObject):
2991         (WebCore::AccessibilityNodeObject::elementRect):
2992         (WebCore::AccessibilityNodeObject::setNode):
2993         (WebCore::AccessibilityNodeObject::document):
2994         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2995         (WebCore::AccessibilityNodeObject::addChildren):
2996         (WebCore::AccessibilityNodeObject::accessibilityIsIgnored):
2997         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
2998         (WebCore::AccessibilityNodeObject::determineAriaRoleAttribute):
2999         (WebCore::AccessibilityNodeObject::ariaRoleAttribute):
3000         (WebCore::AccessibilityNodeObject::remapAriaRoleDueToParent):
3001         * accessibility/AccessibilityNodeObject.h: Added.
3002         (WebCore):
3003         (AccessibilityNodeObject):
3004         (WebCore::AccessibilityNodeObject::isAccessibilityNodeObject):
3005         (WebCore::AccessibilityNodeObject::node):
3006         (WebCore::AccessibilityNodeObject::isDetached):
3007         (WebCore::toAccessibilityNodeObject):
3008         * accessibility/AccessibilityObject.h:
3009         (WebCore::AccessibilityObject::isAccessibilityNodeObject):
3010         * accessibility/AccessibilityProgressIndicator.cpp:
3011         (WebCore::AccessibilityProgressIndicator::create):
3012         * accessibility/AccessibilityRenderObject.cpp:
3013         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
3014         (WebCore::AccessibilityRenderObject::init):
3015         (WebCore):
3016         (WebCore::AccessibilityRenderObject::create):
3017         (WebCore::AccessibilityRenderObject::detach):
3018         (WebCore::AccessibilityRenderObject::setRenderer):
3019         (WebCore::AccessibilityRenderObject::canHaveChildren):
3020         (WebCore::AccessibilityRenderObject::addCanvasChildren):
3021         (WebCore::AccessibilityRenderObject::addChildren):
3022         * accessibility/AccessibilityRenderObject.h:
3023         (AccessibilityRenderObject):
3024         * accessibility/AccessibilitySlider.cpp:
3025         (WebCore::AccessibilitySlider::create):
3026         * accessibility/AccessibilityTable.cpp:
3027         (WebCore::AccessibilityTable::AccessibilityTable):
3028         (WebCore):
3029         (WebCore::AccessibilityTable::~AccessibilityTable):
3030         (WebCore::AccessibilityTable::init):
3031         (WebCore::AccessibilityTable::create):
3032         * accessibility/AccessibilityTable.h:
3033         (AccessibilityTable):
3034         * accessibility/AccessibilityTableCell.cpp:
3035         (WebCore::AccessibilityTableCell::create):
3036         * accessibility/AccessibilityTableRow.cpp:
3037         (WebCore::AccessibilityTableRow::create):
3038
3039 2012-07-23  David Barr  <davidbarr@chromium.org>
3040
3041         Fix ENABLE_CSS_IMAGE_ORIENTATION compile flag
3042         https://bugs.webkit.org/show_bug.cgi?id=91961
3043
3044         Reviewed by Tony Chang.
3045
3046         https://bugs.webkit.org/show_bug.cgi?id=89055
3047         A rule was missed implementing the ENABLE_CSS_IMAGE_ORIENTATION compile flag.
3048
3049         https://bugs.webkit.org/show_bug.cgi?id=90046
3050         Half of the missing rule was inadvertently added together with ENABLE_CSS_STICKY_POSITION.
3051
3052         No new tests; build configuration fix.
3053
3054         * Configurations/FeatureDefines.xcconfig:
3055
3056 2012-07-23  Douglas Stockwell  <dstockwell@chromium.org>
3057
3058         Null-pointer crash when a derived color like -webkit-activelink is set in a gradient stop
3059         https://bugs.webkit.org/show_bug.cgi?id=89148
3060
3061         Reviewed by Simon Fraser.
3062
3063         CSSGradientValue attempted to resolve colors during paint, this crashed
3064         when a derived color like -webkit-activelink was encountered because the
3065         corresponding element was no longer available in the StyleResolver.
3066         Instead, by adding a field to CSSGradientColorStop we can resolve and
3067         then cache the resolved colors at the correct time. To avoid sharing
3068         cached derived colors between elements we clone the gradient values when
3069         needed.
3070
3071         Test: fast/css/crash-on-gradient-with-derived-color.html
3072
3073         * css/CSSGradientValue.cpp:
3074         (WebCore::CSSGradientValue::gradientWithStylesResolved): Added. Resolve and cache
3075         resolved colors, clone if colors are derived from the element.
3076         (WebCore):
3077         (WebCore::CSSGradientValue::addStops):
3078         (WebCore::CSSGradientValue::isCacheable): Defer to new logic in
3079         StyleResolver.
3080         * css/CSSGradientValue.h:
3081         (CSSGradientColorStop): Added cache of resolved color.
3082         (CSSGradientValue):
3083         (CSSLinearGradientValue):
3084         (CSSRadialGradientValue):
3085         * css/CSSImageGeneratorValue.h:
3086         (WebCore):
3087         * css/CSSValue.h:
3088         (WebCore::CSSValue::isGradientValue):
3089         * css/StyleResolver.cpp:
3090         (WebCore::StyleResolver::collectMatchingRulesForList):
3091         * css/StyleResolver.h:
3092         (StyleResolver):
3093         * rendering/style/StyleGeneratedImage.cpp:
3094         (WebCore::StyleGeneratedImage::image): Revert change from r96449. This
3095         is no longer necessary as the gradient colors are now resolved at a
3096         time when the style is set on StyleResolver.
3097
3098 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
3099
3100         Move GregorianDateTime from JSC to WTF namespace
3101         https://bugs.webkit.org/show_bug.cgi?id=91948
3102
3103         Reviewed by Geoffrey Garen.
3104
3105         Moving GregorianDateTime into the WTF namespace allows us to us to
3106         use it in WebCore too. The new class has the same behaviour as the
3107         old struct. Only the unused timeZone member has been removed.
3108
3109         * bridge/qt/qt_runtime.cpp:
3110         (JSC::Bindings::convertValueToQVariant):
3111         (JSC::Bindings::convertQVariantToValue):
3112         * bridge/qt/qt_runtime_qt4.cpp:
3113         (JSC::Bindings::convertValueToQVariant):
3114         (JSC::Bindings::convertQVariantToValue):
3115
3116 2012-07-23  Mark Pilgrim  <pilgrim@chromium.org>
3117
3118         [Chromium] Move layoutTestMode to WebCore
3119         https://bugs.webkit.org/show_bug.cgi?id=92010
3120
3121         Reviewed by Adam Barth.
3122
3123         Part of a refactoring series. See tracking bug 82948.
3124
3125         * CMakeLists.txt:
3126         * GNUmakefile.list.am:
3127         * Target.pri:
3128         * WebCore.gypi:
3129         * WebCore.vcproj/WebCore.vcproj:
3130         * WebCore.xcodeproj/project.pbxproj:
3131         * bindings/generic/RuntimeEnabledFeatures.h:
3132         (RuntimeEnabledFeatures):
3133         * platform/LayoutTestSupport.cpp: Added.
3134         (WebCore):
3135         (WebCore::isRunningLayoutTest):
3136         (WebCore::setIsRunningLayoutTest):
3137         * platform/LayoutTestSupport.h: Added.
3138         (WebCore):
3139         * platform/chromium/PlatformSupport.h:
3140         (PlatformSupport):
3141         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3142         (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
3143         (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
3144         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
3145         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
3146         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
3147         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
3148         (WebCore):
3149         (WebCore::LookupAltName):
3150         (WebCore::fontContainsCharacter):
3151         (WebCore::FillLogFont):
3152         (WebCore::FontCache::getFontDataForCharacters):
3153         (WebCore::FontCache::createFontPlatformData):
3154         * platform/graphics/skia/FontCustomPlatformData.cpp:
3155         (WebCore::FontCustomPlatformData::fontPlatformData):
3156         * platform/graphics/skia/FontSkia.cpp:
3157         (WebCore::Font::drawGlyphs):
3158         * rendering/RenderThemeChromiumAndroid.cpp:
3159         (WebCore::RenderThemeChromiumAndroid::systemColor):
3160         (WebCore::RenderThemeChromiumAndroid::adjustInnerSpinButtonStyle):
3161         * rendering/RenderThemeChromiumMac.mm:
3162         (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor):
3163         * rendering/RenderThemeChromiumSkia.cpp:
3164         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
3165         * rendering/RenderThemeChromiumWin.cpp:
3166         (WebCore):
3167         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
3168         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
3169         (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor):
3170         (WebCore::RenderThemeChromiumWin::systemColor):
3171         (WebCore::menuListButtonWidth):
3172         (WebCore::RenderThemeChromiumWin::determineClassicState):
3173
3174 2012-07-23  Dave Tu  <dtu@chromium.org>
3175
3176         [chromium] Add droppedFrameCount to renderingStats.
3177         https://bugs.webkit.org/show_bug.cgi?id=91694
3178
3179         Reviewed by Adrienne Walker.
3180
3181         * platform/graphics/chromium/cc/CCFrameRateCounter.cpp:
3182         (WebCore):
3183         (WebCore::CCFrameRateCounter::frameInterval):
3184         (WebCore::CCFrameRateCounter::frameIndex):
3185         (WebCore::CCFrameRateCounter::CCFrameRateCounter):
3186         (WebCore::CCFrameRateCounter::markBeginningOfFrame):
3187         (WebCore::CCFrameRateCounter::isBadFrame):
3188         * platform/graphics/chromium/cc/CCFrameRateCounter.h:
3189         (WebCore::CCFrameRateCounter::droppedFrameCount):
3190         (CCFrameRateCounter):
3191         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3192         (WebCore::CCLayerTreeHost::renderingStats):
3193         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3194         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3195         (WebCore::CCLayerTreeHostImpl::drawLayers):
3196         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3197         (CCLayerTreeHostImpl):
3198         * platform/graphics/chromium/cc/CCRenderingStats.h:
3199         (CCRenderingStats):
3200         (WebCore::CCRenderingStats::CCRenderingStats):
3201         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3202         (WebCore::CCSingleThreadProxy::implSideRenderingStats):
3203         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3204         (WebCore::CCThreadProxy::implSideRenderingStatsOnImplThread):
3205
3206 2012-07-23  Dan Bernstein  <mitz@apple.com>
3207
3208         Fixed the build after r123418.
3209
3210         * WebCore.exp.in: Added DocumentMarkerController::addTextMatchMarker.
3211
3212 2012-07-23  Mike Lawther  <mikelawther@chromium.org>
3213
3214         CSS3 calc: optimise blending expression
3215         https://bugs.webkit.org/show_bug.cgi?id=90037
3216
3217         Reviewed by Tony Chang.
3218
3219         Introduce a new calc expression node - a BlendLength node. Given two Lengths and a progress
3220         this blends them together when evaluated.
3221
3222         An alternative and more general approach of being able to blend two CalcExpressionNodes was
3223         tested, but involves more memory allocations, was measurably slower, and nothing currently
3224         would make use of the generality. 
3225
3226         No functional change. Covered by existing tests.
3227
3228         * platform/CalculationValue.h:
3229         (CalcExpressionBlendLength):
3230         (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
3231         (WebCore::CalcExpressionBlendLength::operator==):
3232         (WebCore::CalcExpressionBlendLength::evaluate):
3233         (WebCore):
3234         * platform/Length.cpp:
3235         (WebCore::Length::blendCalculation):
3236
3237 2012-07-23  Nico Weber  <thakis@chromium.org>
3238
3239         [chromium] Show search tickmarks on css-styled scrollbars
3240         https://bugs.webkit.org/show_bug.cgi?id=91949
3241
3242         Reviewed by Adrienne Walker.
3243
3244         This is done by letting RenderScrollbarTheme::paintTickmarks()
3245         delegate to the native ScrollbarTheme. To make this possible,
3246         move paintTickmarks() from ScrollbarThemeComposite to the
3247         superclass ScrollbarTheme.
3248
3249         For testing, add internals.addTextMatchMarker() and add a pixel test.
3250
3251         * platform/ScrollbarTheme.h:
3252         (WebCore::ScrollbarTheme::paintTickmarks):
3253         Moved paintTickmarks() from ScrollbarThemeComposite to here.
3254         * platform/ScrollbarThemeComposite.h:
3255         Remove paintTickmarks().
3256         * platform/chromium/ScrollbarThemeChromium.cpp:
3257         (WebCore::ScrollbarThemeChromium::paintTickmarks):
3258         Switch to drawing tickmarks as vectors, so they can be arbitrarily wide.
3259         * platform/chromium/ScrollbarThemeChromiumMac.h:
3260         (ScrollbarThemeChromiumMac):
3261         Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac.
3262         * platform/chromium/ScrollbarThemeChromiumMac.mm:
3263         (WebCore::ScrollbarThemeChromiumMac::paint):
3264         (WebCore::ScrollbarThemeChromiumMac::paintTickmarks):
3265         Implement paintTickmarks(), so that css-styled scrollbars get tickmarks on mac.
3266         * rendering/RenderScrollbarTheme.cpp:
3267         (WebCore::RenderScrollbarTheme::paintTickmarks):
3268         Delegate to the native ScrollbarTheme for tickmark drawing.
3269         (WebCore):
3270         * rendering/RenderScrollbarTheme.h:
3271         (RenderScrollbarTheme):
3272         Override paintTickmarks().
3273
3274 2012-07-23  Brian Anderson  <brianderson@chromium.org>
3275
3276         [chromium] Use shallow flushes that don't glFlush
3277         https://bugs.webkit.org/show_bug.cgi?id=90325
3278
3279         Reviewed by Kenneth Russell.
3280
3281         Adds plumbing for the shallowFlushCHROMIUM extension and uses
3282         shallow flushes instead of normal flushes when uploading textures.
3283         Shallow flushes allow us to initiate command buffer flushes to
3284         the GPU thread/process without the overhead of a true glFlush.
3285
3286         CCTextureUpdaterTest updated to recognize shallow flushes.
3287
3288         * platform/chromium/support/Extensions3DChromium.cpp:
3289         (WebCore::Extensions3DChromium::shallowFlushCHROMIUM):
3290         (WebCore):
3291         * platform/graphics/chromium/Extensions3DChromium.h:
3292         (Extensions3DChromium):
3293         * platform/graphics/chromium/cc/CCGraphicsContext.h:
3294         * platform/graphics/chromium/cc/CCResourceProvider.cpp:
3295         (WebCore::CCResourceProvider::shallowFlushIfSupported):
3296         (WebCore):
3297         (WebCore::CCResourceProvider::CCResourceProvider):
3298         (WebCore::CCResourceProvider::initialize):
3299         * platform/graphics/chromium/cc/CCResourceProvider.h:
3300         (CCResourceProvider):
3301         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
3302         (WebCore::CCTextureUpdater::update):
3303
3304 2012-07-23  Hanyee Kim  <choco@company100.net>
3305
3306         When using TextureMapper, WebKit does not retain final value of opacity in animations, unless it is specified on the last key frame.
3307         https://bugs.webkit.org/show_bug.cgi?id=91322
3308
3309         Reviewed by Noam Rosenthal.
3310
3311         When -webkit-fill-mode is forwards, GraphicsLayerAnimation::apply does not apply
3312         the property values defined in the last executing keyframe after the final iteration of animation.
3313
3314         This patch does not return right after the end of animation, but it keeps applying
3315         the property values defined in the last executing keyframe.
3316         Add normalizedAnimationValueForFillsForwards function that returns a normalized value of the
3317         last executing keyframe.
3318
3319         Link to CSS Animations spec: http://www.w3.org/TR/css3-animations/#animation-fill-mode-property
3320
3321         Test: animations/fill-mode-forwards2.html
3322
3323         * platform/graphics/GraphicsLayerAnimation.cpp:
3324         (WebCore::normalizedAnimationValueForFillsForwards):
3325         (WebCore):
3326         (WebCore::GraphicsLayerAnimation::apply):
3327
3328 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3329
3330         Unreviewed, rolling out r123184, r123195, and r123197.
3331         http://trac.webkit.org/changeset/123184
3332         http://trac.webkit.org/changeset/123195
3333         http://trac.webkit.org/changeset/123197
3334         https://bugs.webkit.org/show_bug.cgi?id=92049
3335
3336         pagecycler regression (Requested by morrita on #webkit).
3337
3338         * WebCore.exp.in:
3339         * dom/Document.cpp:
3340         (WebCore::Document::Document):
3341         (WebCore::Document::~Document):
3342         (WebCore::Document::suggestedMIMEType):
3343         * dom/Document.h:
3344         (WebCore):
3345         (WebCore::Node::isDocumentNode):
3346         (WebCore::Node::Node):
3347         * dom/Node.cpp:
3348         (WebCore::Node::~Node):
3349         (WebCore::Node::setDocument):
3350         (WebCore):
3351         (WebCore::Node::setTreeScope):
3352         (WebCore::Node::treeScope):
3353         (WebCore::Node::isInShadowTree):
3354         (WebCore::Node::reportMemoryUsage):
3355         * dom/Node.h:
3356         (Node):
3357         (WebCore::Node::document):
3358         (WebCore::Node::inDocument):
3359         * dom/NodeRareData.h:
3360         (WebCore::NodeRareData::NodeRareData):
3361         (WebCore::NodeRareData::treeScope):
3362         (WebCore::NodeRareData::setTreeScope):
3363         (NodeRareData):
3364         * dom/ShadowRoot.cpp:
3365         (WebCore::ShadowRoot::ShadowRoot):
3366         * dom/TreeScope.cpp:
3367         (WebCore::TreeScope::TreeScope):
3368         (WebCore::TreeScope::setParentTreeScope):
3369         * dom/TreeScope.h:
3370         (WebCore):
3371         (WebCore::TreeScope::idTargetObserverRegistry):
3372         (TreeScope):
3373         * dom/TreeScopeAdopter.cpp:
3374         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
3375         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
3376         * editing/MoveSelectionCommand.cpp:
3377         * editing/RemoveNodeCommand.cpp:
3378         * editing/RemoveNodePreservingChildrenCommand.cpp:
3379         * inspector/PageConsoleAgent.cpp:
3380
3381 2012-07-23  Roger Fong  <roger_fong@apple.com>
3382
3383         On Windows, if select element is off screen horizontally, 
3384         menu is either inappropriately resized or positioned offscreen.
3385         https://bugs.webkit.org/show_bug.cgi?id=91913
3386         <rdar://problem/7611229>
3387
3388         Reviewed by Tim Horton.
3389
3390         If the select element is positioned off the edge of the screen to the left, 
3391         the menu is resized. It should not be resized, just shifted to remain on the screen.
3392         If the select element is positioned off the edge of the screen to the right, 
3393         the menu goes off screen instead of being shifted over to appear on screen.
3394         This problem only occurs on Windows.
3395         
3396         Test: ManualTests/win/select-menu-off-screen.html
3397
3398         * platform/win/PopupMenuWin.cpp:
3399         (WebCore::PopupMenuWin::calculatePositionAndSize):
3400         Modified final horizontal position calculation code to position
3401         popup menu on screen if it would otherwise go off.
3402         
3403 2012-07-23  David Dorwin  <ddorwin@chromium.org>
3404
3405         Fixed crash in webkitAddKey() when key parameter is null.
3406         https://bugs.webkit.org/show_bug.cgi?id=85444
3407
3408         Reviewed by Kentaro Hara.
3409
3410         Reference: Step 1 of http://dvcs.w3.org/hg/html-media/raw-file/5f76a0b43836/encrypted-media/encrypted-media.html#dom-addkey
3411
3412         Tests: media/encrypted-media/encrypted-media-syntax.html 
3413
3414         * html/HTMLMediaElement.cpp:
3415         (WebCore::HTMLMediaElement::webkitAddKey):
3416
3417 2012-07-23  Hayato Ito  <hayato@chromium.org>
3418
3419         A FocusScope for a distributed node should not be its TreeScope.
3420         https://bugs.webkit.org/show_bug.cgi?id=91829
3421
3422         Reviewed by Dimitri Glazkov.
3423
3424         Current implementation of FocusScope::focusScopeOf(Node*) returns
3425         the given node's treeScope().  That does not apply if the node is
3426         a distributed node.  We should calculate a FocusScope for a
3427         distributed node by traversing ancestor nodes in Composed Shadow
3428         Tree.
3429
3430         Test: fast/dom/shadow/focus-navigation-with-distributed-nodes.html
3431
3432         * page/FocusController.cpp:
3433         (WebCore::FocusScope::focusScopeOf):
3434
3435 2012-07-23  Douglas Stockwell  <dstockwell@google.com>
3436
3437         Null-pointer crash when parsing border-image
3438         https://bugs.webkit.org/show_bug.cgi?id=91963
3439
3440         Reviewed by Darin Adler.
3441
3442         Test: fast/css/border-image-fill-crash.html
3443
3444         * css/CSSParser.cpp:
3445         (WebCore::CSSParser::parseBorderImageRepeat): Handle the case where
3446         parseBorderImageRepeat is called when the value list is empty.
3447
3448 2012-07-23  Bem Jones-Bey  <bjonesbe@adobe.com>
3449
3450         [CSS Exclusions] SVG shape errors should invalidate exclusion shapes
3451         https://bugs.webkit.org/show_bug.cgi?id=91761
3452
3453         Reviewed by Andreas Kling.
3454
3455         CSS exclusion shapes that are specified with negative radiuses or
3456         height/width are now considered invalid and ignored.
3457
3458         Tests added to
3459         LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html
3460
3461         * css/CSSParser.cpp:
3462         (WebCore::CSSParser::parseExclusionShapeRectangle):
3463         (WebCore::CSSParser::parseExclusionShapeCircle):
3464         (WebCore::CSSParser::parseExclusionShapeEllipse):
3465
3466 2012-07-23  Tien-Ren Chen  <trchen@chromium.org>
3467
3468         [chromium] Implement scrollbar theme for Android
3469         https://bugs.webkit.org/show_bug.cgi?id=91674
3470
3471         Reviewed by Adam Barth.
3472
3473         Previously the scrollbar for Android was implemented as an extra
3474         drawing pass in the compositor. Now we switch to use the standard
3475         ScrollbarTheme mechanism.
3476
3477         No new tests. We use mock scrollbars during layout test to share
3478         pixel results with Linux.
3479
3480         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3481         (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
3482         (WebCore::ScrollbarThemeChromiumAndroid::thumbPosition):
3483         (WebCore::ScrollbarThemeChromiumAndroid::thumbLength):
3484         (WebCore::ScrollbarThemeChromiumAndroid::backButtonRect):
3485         (WebCore::ScrollbarThemeChromiumAndroid::forwardButtonRect):
3486         (WebCore::ScrollbarThemeChromiumAndroid::trackRect):
3487         (WebCore):
3488         (WebCore::ScrollbarThemeChromiumAndroid::paintThumb):
3489         (WebCore::ScrollbarThemeChromiumAndroid::paintScrollbarBackground):
3490         * platform/chromium/ScrollbarThemeChromiumAndroid.h:
3491         (WebCore::ScrollbarThemeChromiumAndroid::usesOverlayScrollbars):
3492         (ScrollbarThemeChromiumAndroid):
3493         (WebCore::ScrollbarThemeChromiumAndroid::hasButtons):
3494         (WebCore::ScrollbarThemeChromiumAndroid::hasThumb):
3495
3496 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
3497
3498         Use the original token to create an element in "reconstruct the active formatting elements" and "call the adoption agency"
3499         https://bugs.webkit.org/show_bug.cgi?id=91703
3500
3501         Reviewed by Adam Barth.
3502
3503         The current WebKit HTML5 parser implementation does not hold the original token
3504         in the stack of open elements and the active formatting elements. This is
3505         problematic because the original token is used to create an element in
3506         "reconstruct the active formatting elements" and "call the adoption agency".
3507
3508         As a workaround, WebKit uses the saved element instead of the original token
3509         to create an element. But this causes us to fail examples like this:
3510         <b id="1"><p><script>document.getElementById("1").id = "2"</script></p>TEXT</b>
3511         reconstructTheActiveFormattingElements calls this method to open a second <b>
3512         tag to wrap TEXT, it will have id "2", even though the HTML5 spec implies it
3513         should be "1".
3514
3515         Created a ref-counted container class, HTMLStackItem to hold the original token
3516         and the namespace URI as well as the element. Changed HTMLElementStack and
3517         HTMLFormattingElementList to use HTMLStackItem.
3518         Changed HTMLConstructionSite::reconstructTheActiveFormattingElements and
3519         HTMLTreeBuilder::callTheAdoptionAgency to create an element from the saved token
3520         instead of the saved element.
3521
3522         Updated test expectation for html5lib/runner-expected.txt
3523         because now resources/scripted/adoption01.dat passes.
3524
3525         * html/parser/HTMLConstructionSite.cpp:
3526         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
3527         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
3528         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
3529         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
3530         (WebCore::HTMLConstructionSite::insertHTMLElement):
3531         (WebCore::HTMLConstructionSite::insertFormattingElement):
3532         (WebCore::HTMLConstructionSite::insertScriptElement):
3533         (WebCore::HTMLConstructionSite::insertForeignElement):
3534         (WebCore::HTMLConstructionSite::createElementFromSavedToken):
3535         (WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
3536         * html/parser/HTMLConstructionSite.h:
3537         (HTMLConstructionSite):
3538         (WebCore::HTMLConstructionSite::currentElementRecord):
3539         * html/parser/HTMLElementStack.cpp:
3540         (WebCore::HTMLElementStack::ElementRecord::ElementRecord):
3541         (WebCore::HTMLElementStack::ElementRecord::replaceElement):
3542         (WebCore::HTMLElementStack::pushRootNode):
3543         (WebCore::HTMLElementStack::pushHTMLHtmlElement):
3544         (WebCore::HTMLElementStack::pushRootNodeCommon):
3545         (WebCore::HTMLElementStack::pushHTMLHeadElement):
3546         (WebCore::HTMLElementStack::pushHTMLBodyElement):
3547         (WebCore::HTMLElementStack::push):
3548         (WebCore::HTMLElementStack::insertAbove):
3549         (WebCore::HTMLElementStack::pushCommon):
3550         * html/parser/HTMLElementStack.h:
3551         (WebCore::HTMLElementStack::ElementRecord::element):
3552         (WebCore::HTMLElementStack::ElementRecord::node):
3553         (WebCore::HTMLElementStack::ElementRecord::stackItem):
3554         (ElementRecord):
3555         (HTMLElementStack):
3556         * html/parser/HTMLFormattingElementList.cpp:
3557         (WebCore::HTMLFormattingElementList::swapTo):
3558         (WebCore::HTMLFormattingElementList::append):
3559         * html/parser/HTMLFormattingElementList.h:
3560         (WebCore::HTMLFormattingElementList::Entry::Entry):
3561         (WebCore::HTMLFormattingElementList::Entry::isMarker):
3562         (WebCore::HTMLFormattingElementList::Entry::stackItem):
3563         (WebCore::HTMLFormattingElementList::Entry::element):
3564         (WebCore::HTMLFormattingElementList::Entry::replaceElement):
3565         (WebCore::HTMLFormattingElementList::Entry::operator==):
3566         (WebCore::HTMLFormattingElementList::Entry::operator!=):
3567         (Entry):
3568         (HTMLFormattingElementList):
3569         * html/parser/HTMLStackItem.h: Added.
3570         (WebCore):
3571         (HTMLStackItem):
3572         (WebCore::HTMLStackItem::create):
3573         (WebCore::HTMLStackItem::element):
3574         (WebCore::HTMLStackItem::node):
3575         (WebCore::HTMLStackItem::token):
3576         (WebCore::HTMLStackItem::namespaceURI):
3577         (WebCore::HTMLStackItem::HTMLStackItem):
3578         * html/parser/HTMLTreeBuilder.cpp:
3579         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
3580         (WebCore::HTMLTreeBuilder::processStartTag):
3581         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
3582
3583 2012-07-23  Andreas Kling  <kling@webkit.org>
3584
3585         Report the extra memory used by immutable StylePropertySet objects.
3586         <http://webkit.org/b/92032>
3587
3588         Reviewed by Anders Carlsson.
3589
3590         Add an optional parameter to the MemoryClassInfo constructor for passing in additional base object
3591         size on top of sizeof(T).
3592
3593         Use this in StylePropertySet::reportMemoryUsage() to properly account for the CSSProperty array
3594         tacked onto the end of the object when m_isMutable == false.
3595
3596         * css/StylePropertySet.h:
3597         (WebCore::StylePropertySet::reportMemoryUsage):
3598         * dom/MemoryInstrumentation.h:
3599         (WebCore::MemoryObjectInfo::reportObjectInfo):
3600         (WebCore::MemoryClassInfo::MemoryClassInfo):
3601
3602 2012-07-23  Gregg Tavares  <gman@google.com>
3603
3604         Fix WebGL texSubImage2D for cube maps
3605         https://bugs.webkit.org/show_bug.cgi?id=91927
3606
3607         Reviewed by Kenneth Russell.
3608
3609         Fixes texSubImage2D so any size rectangle can be passed in
3610         for cube maps.
3611
3612         Test: fast/canvas/webgl/tex-sub-image-cube-maps.html
3613
3614         * html/canvas/WebGLRenderingContext.cpp:
3615         (WebCore):
3616         (WebCore::WebGLRenderingContext::copyTexImage2D):
3617         (WebCore::WebGLRenderingContext::texImage2DBase):
3618         (WebCore::WebGLRenderingContext::texSubImage2DBase):
3619         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
3620         * html/canvas/WebGLRenderingContext.h:
3621         (WebGLRenderingContext):
3622
3623 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3624
3625         Unreviewed, rolling out r123387.
3626         http://trac.webkit.org/changeset/123387
3627         https://bugs.webkit.org/show_bug.cgi?id=92036
3628
3629         Broke chromium win build (Requested by tony^work on #webkit).
3630
3631         * WebCore.gyp/WebCore.gyp:
3632         * WebCore.gyp/scripts/rule_bison.py:
3633         * bindings/scripts/preprocessor.pm:
3634         (applyPreprocessor):
3635         * make-hash-tools.pl:
3636
3637 2012-07-23  Kwang Yul Seo  <skyul@company100.net>
3638
3639         Ref-count AtomicHTMLToken
3640         https://bugs.webkit.org/show_bug.cgi?id=91981
3641
3642         Reviewed by Adam Barth.
3643
3644         Ref-count AtomicHTMLToken to avoid copying AtomicHTMLToken in Bug 91703.
3645
3646         No new tests - no functional changes.
3647
3648         * html/parser/HTMLConstructionSite.cpp:
3649         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
3650         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
3651         (WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
3652         (WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody):
3653         (WebCore::HTMLConstructionSite::insertDoctype):
3654         (WebCore::HTMLConstructionSite::insertComment):
3655         (WebCore::HTMLConstructionSite::insertCommentOnDocument):
3656         (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
3657         (WebCore::HTMLConstructionSite::insertHTMLHeadElement):
3658         (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
3659         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
3660         (WebCore::HTMLConstructionSite::insertHTMLElement):
3661         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
3662         (WebCore::HTMLConstructionSite::insertFormattingElement):
3663         (WebCore::HTMLConstructionSite::insertScriptElement):
3664         (WebCore::HTMLConstructionSite::insertForeignElement):
3665         (WebCore::HTMLConstructionSite::createElement):
3666         (WebCore::HTMLConstructionSite::createHTMLElement):
3667         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
3668         * html/parser/HTMLConstructionSite.h:
3669         (HTMLConstructionSite):
3670         * html/parser/HTMLToken.h:
3671         (WebCore::AtomicHTMLToken::create):
3672         (AtomicHTMLToken):
3673         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
3674         * html/parser/HTMLTreeBuilder.cpp:
3675         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::ExternalCharacterTokenBuffer):
3676         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
3677         (WebCore::HTMLTreeBuilder::constructTreeFromAtomicToken):
3678         (WebCore::HTMLTreeBuilder::processToken):
3679         (WebCore::HTMLTreeBuilder::processDoctypeToken):
3680         (WebCore::HTMLTreeBuilder::processFakeStartTag):
3681         (WebCore::HTMLTreeBuilder::processFakeEndTag):
3682         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
3683         (WebCore::HTMLTreeBuilder::attributesForIsindexInput):
3684         (WebCore::HTMLTreeBuilder::processIsindexStartTagForInBody):
3685         (WebCore):
3686         (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
3687         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
3688         (WebCore::HTMLTreeBuilder::processStartTagForInTable):
3689         (WebCore::HTMLTreeBuilder::processStartTag):
3690         (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody):
3691         (WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
3692         (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
3693         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
3694         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
3695         (WebCore::HTMLTreeBuilder::processEndTagForInRow):
3696         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
3697         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
3698         (WebCore::HTMLTreeBuilder::processEndTagForInTable):
3699         (WebCore::HTMLTreeBuilder::processEndTag):
3700         (WebCore::HTMLTreeBuilder::processComment):
3701         (WebCore::HTMLTreeBuilder::processCharacter):
3702         (WebCore::HTMLTreeBuilder::processEndOfFile):
3703         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
3704         (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
3705         (WebCore::HTMLTreeBuilder::defaultForInHead):
3706         (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
3707         (WebCore::HTMLTreeBuilder::defaultForAfterHead):
3708         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
3709         (WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
3710         (WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
3711         (WebCore::HTMLTreeBuilder::processScriptStartTag):
3712         (WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
3713         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
3714         (WebCore::HTMLTreeBuilder::parseError):
3715         * html/parser/HTMLTreeBuilder.h:
3716         (HTMLTreeBuilder):
3717         * html/parser/TextDocumentParser.cpp:
3718         (WebCore::TextDocumentParser::insertFakePreElement):
3719
3720 2012-07-23  Scott Graham  <scottmg@google.com>
3721
3722         Use native (non-cygwin) binaries for perl, gperf, and bison in Chromium
3723         https://bugs.webkit.org/show_bug.cgi?id=91667
3724
3725         Reviewed by Tony Chang.
3726
3727         Using native tools instead of cygwin version improves build time
3728         performance by roughly 50% (on top of previous cl-instead-of-gcc
3729         change).
3730
3731         Also, use - instead of / for cl flags because a layer of project
3732         generator converts them to \ otherwise, which causes the preprocessing
3733         to fail (very slowly because of the cygwin-loop with a sleep 1).
3734
3735         No new tests.
3736
3737         * WebCore.gyp/WebCore.gyp:
3738         * WebCore.gyp/scripts/rule_bison.py:
3739         * bindings/scripts/preprocessor.pm:
3740         (applyPreprocessor):
3741         * make-hash-tools.pl:
3742
3743 2012-06-12  Jer Noble  <jer.noble@apple.com>
3744
3745         MediaController.currentTime should be kept stable during script execution.
3746         https://bugs.webkit.org/show_bug.cgi?id=88555
3747
3748         Reviewed by Eric Carlson.
3749
3750         Test: media/media-controller-time-constant.html
3751
3752         To keep MediaController.currentTime stable, add a new m_position variable and 
3753         a new m_clearPositionTimer timer.  Both must be mutable variables as they will
3754         be updated from within const functions.  Calls to currentTime() will result in
3755         stable values until the next runloop iteration.
3756
3757         * html/MediaController.cpp:
3758         (MediaController::MediaController):
3759         (MediaController::currentTime):
3760         (MediaController::setCurrentTime):
3761         (MediaController::clearPositionTimerFired):
3762         * html/MediaController.h:
3763
3764 2012-07-23  Huang Dongsung  <luxtella@company100.net>
3765
3766         Destroy CSS decoded data more eagerly once they become dead caches.
3767         https://bugs.webkit.org/show_bug.cgi?id=91733
3768
3769         Reviewed by Geoffrey Garen.
3770
3771         Internal review by Kwang Yul Seo.
3772
3773         There are three CachedResources with decoded data: CachedImage, CachedScript
3774         and CachedCSSStyleSheet. In the cases of CachedImage and CachedScript, we
3775         eagerly destroy the decoded data using Timer in CacehdResource::allClientsRemoved().
3776         We must apply the same policy here in CachedCSSStyleSheet because priority
3777         inversion can occur. For example, we can't destroy the decoded data of CachedImages
3778         when they are referenced by CachedCSSStyleSheet as background, mask or border
3779         images.
3780
3781         No new tests - no new testable functionality.
3782
3783         * loader/cache/CachedCSSStyleSheet.cpp:
3784         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
3785         (WebCore::CachedCSSStyleSheet::didAddClient):
3786         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
3787         (WebCore::CachedCSSStyleSheet::destroyDecodedData):
3788         (WebCore):
3789         (WebCore::CachedCSSStyleSheet::decodedDataDeletionTimerFired):
3790         * loader/cache/CachedCSSStyleSheet.h:
3791         (CachedCSSStyleSheet):
3792
3793 2012-07-23  Simon Fraser  <simon.fraser@apple.com>
3794
3795         Part 2 of: Implement sticky positioning
3796         https://bugs.webkit.org/show_bug.cgi?id=90046
3797
3798         Reviewed by Ojan Vafai.
3799
3800         Turn on ENABLE_CSS_STICKY_POSITION. Add support for parsing the new '-webkit-sticky'
3801         value for position, returning it from getComputedStyle(), and storing it in RenderStyle.
3802
3803         Test: fast/css/sticky/parsing-position-sticky.html
3804
3805         * Configurations/FeatureDefines.xcconfig:
3806         * css/CSSComputedStyleDeclaration.cpp:
3807         (WebCore::getPositionOffsetValue):
3808         * css/CSSParser.cpp:
3809         (WebCore::isValidKeywordPropertyAndValue):
3810         * css/CSSPrimitiveValueMappings.h:
3811         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3812         (WebCore::CSSPrimitiveValue::operator EPosition):
3813         * css/CSSValueKeywords.in:
3814         * rendering/style/RenderStyle.h:
3815         * rendering/style/RenderStyleConstants.h:
3816
3817 2012-07-23  Stephen Chenney  <schenney@chromium.org>
3818
3819         Crash when setting empty class name on a new element
3820         https://bugs.webkit.org/show_bug.cgi?id=92024
3821
3822         Reviewed by Andreas Kling.
3823
3824         Add a check for null attributeData() when setting the className to an
3825         empty string on a newly created element. New SVG elements have null
3826         attributeData() on baseVal upon creation.
3827
3828         Test: svg/custom/empty-className-baseVal-crash.html
3829
3830         * dom/StyledElement.cpp:
3831         (WebCore::StyledElement::classAttributeChanged): Add check for null attributeData()
3832
3833 2012-07-23  Shawn Singh  <shawnsingh@chromium.org>
3834
3835         [chromium] Refactor CCLayerTreeHostCommon: clean up clipRect and drawableContentRect design
3836         https://bugs.webkit.org/show_bug.cgi?id=80622
3837
3838         Reviewed by Adrienne Walker.
3839
3840         clipRect(), usesLayerClipping(), and drawableContentRect() have been
3841         very confusing in CCLayerTreeHostCommon for a while. This patch
3842         refactors it so that (1) clipping is only done locally in
3843         calcDrawTransforms, and (2) the layer's drawableContentRect value
3844         is now meaningful value outside of calcDrawTransforms.
3845         Additionally, the layer is now always clipped to the root
3846         surface's contentBounds (which are set to the viewport bounds).
3847         This refactor not only makes calcDrawTransforms far more readable and intuitive, but
3848         this patch enables more upcoming beneficial refactors, including
3849         the pending refactor in https://bugs.webkit.org/show_bug.cgi?id=88953.
3850
3851         Tests are also significantly updated to keep up with this refactoring change.
3852
3853         * platform/graphics/chromium/LayerChromium.cpp:
3854         (WebCore::LayerChromium::LayerChromium):
3855         * platform/graphics/chromium/LayerChromium.h:
3856         (LayerChromium):
3857         Removed m_usesLayerClipping and m_clipRect and associated accessors.
3858
3859         * platform/graphics/chromium/RenderSurfaceChromium.h:
3860         (RenderSurfaceChromium):
3861         Updated comment
3862
3863         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3864         (WebCore::CCLayerImpl::CCLayerImpl):
3865         * platform/graphics/chromium/cc/CCLayerImpl.h:
3866         (CCLayerImpl):
3867         Removed m_usesLayerClipping and m_clipRect and associated accessors.
3868
3869         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3870         (WebCore::CCLayerTreeHost::updateLayers):
3871         removed setClipRect code that no longer applies
3872
3873         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
3874         (WebCore::calculateLayerScissorRect):
3875         scissor rect is now a little bit tighter, the intersection between damage and layer's new drawableContentRect.
3876
3877         (WebCore::calculateSurfaceScissorRect):
3878         scissor rect is now a little bit tighter, except when filters are involved.
3879
3880         (WebCore::layerClipsSubtree):
3881         new helper function
3882
3883         (WebCore):
3884         (WebCore::calculateVisibleContentRect):
3885         (WebCore::subtreeShouldRenderToSeparateSurface):
3886         (WebCore::calculateDrawTransformsInternal):
3887            - added drawableContentRectOfSubtree to the function args, it is valid only after recursion returns,
3888            - added clipRectFromAncestor and bool ancestorClipsSubtree to function args, this replaces the layer's clipRect and usesLayerClipping.
3889            - removed the boolean return value, which was redundant with drawableContentRectOfSubtree.
3890            - replaced all the "setDrawableContentRect" logic with more intuitive, clear logic.
3891            - now, layer's drawableContentRect represents the clipped bounds of the layer expressed in the target surface space.
3892
3893         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
3894         (WebCore::pointIsClippedBySurfaceOrClipRect):
3895         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3896         (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
3897         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3898         (WebCore::::layerScissorRectInTargetSurface):
3899         Updated this accessor.  It could be removed in the future, but not appropriate for this patch.
3900
3901         * platform/graphics/chromium/cc/CCRenderSurface.h:
3902
3903 2012-07-23  Patrick Gansterer  <paroga@webkit.org>
3904
3905         [CMAKE] Added missing RenderLayerFilterInfo.cpp to build system.
3906
3907         * CMakeLists.txt:
3908
3909 2012-07-23  Ryosuke Niwa  <rniwa@webkit.org>
3910
3911         REGRESSION(r123281): childNodes sometimes returns wrong nodes
3912         https://bugs.webkit.org/show_bug.cgi?id=92014
3913
3914         Reviewed by Anders Carlsson.
3915
3916         The bug was caused by a typo in itemBeforeOrAfter. Namely, it should have been calling firstNode as
3917         firstNode(forward, rootNode(), shouldOnlyIncludeDirectChildren()),
3918         NOT firstNode(forward, rootNode(), previous)
3919         as evident from the argument list of the function.
3920
3921         Test: fast/dom/NodeList/childNodes-reverse-iteration.html
3922
3923         * html/HTMLCollection.cpp:
3924         (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfter):
3925
3926 2012-07-23  Steve VanDeBogart  <vandebo@chromium.org>
3927
3928         Chrome/Skia: PDF print output does not have clickable links.
3929         https://bugs.webkit.org/show_bug.cgi?id=91171
3930
3931         Reviewed by Stephen White.
3932
3933         Connect GraphicsContext::setURLForRect to Skia's new API for annotations.
3934
3935         Printing is not generally testable.
3936
3937         * platform/graphics/skia/GraphicsContextSkia.cpp:
3938         (WebCore::GraphicsContext::setURLForRect):
3939
3940 2012-07-23  Pierre Rossi  <pierre.rossi@gmail.com>
3941
3942         Unify numTouchEventHandlersChanged and needTouchEvents in the chrome client
3943         https://bugs.webkit.org/show_bug.cgi?id=91006
3944
3945         Reviewed by Ryosuke Niwa.
3946
3947         The rationale here is that the client doesn't need to know about the touch
3948         event handler count. needTouchEvents was already used for that purpose.
3949
3950         Test: fast/events/touch/touch-handler-count.html
3951
3952         * dom/Document.cpp:
3953         (WebCore::Document::Document):
3954         (WebCore::Document::didAddTouchEventHandler): Only notify the client if needed.
3955         (WebCore::Document::didRemoveTouchEventHandler): Ditto. Also unset the TOUCH_LISTENER
3956         flag for the document if we reach a count of zero. The rationale being that
3957         hasListenerType() is relied upon in other places in combination with TOUCH_LISTENER for
3958         the same purpose.
3959         * dom/Document.h:
3960         (Document):
3961         (WebCore::Document::touchEventHandlerCount):
3962         * loader/EmptyClients.h:
3963         * page/ChromeClient.h:
3964         (ChromeClient):
3965         * page/Frame.cpp: Removed notifyChromeClientTouchEventHandlerCountChanged.
3966         (WebCore::Frame::setDocument): call needsTouchEvents directly.
3967         * page/Frame.h: Ditto.
3968         (Frame):
3969         * testing/Internals.cpp:
3970         (WebCore::Internals::hasTouchEventListener): expose Document::hasListenerType indirectly
3971         for additional testing.
3972         (WebCore):
3973         * testing/Internals.h:
3974         (Internals):
3975         * testing/Internals.idl:
3976
3977 2012-07-23  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3978
3979         [Qt] RenderThemeQtMobile highlight colors are not being used
3980         https://bugs.webkit.org/show_bug.cgi?id=92004
3981
3982         Reviewed by Noam Rosenthal.
3983
3984         The issue here is that setPaletteFromPageClientIfExists() is being used as a
3985         virtual function, but it isn't, so when platformActiveSelectionBackgroundColor()
3986         runs, it doesn't pick the right palette.
3987
3988         Besides fixing this virtual behavior, the patch changes the structure a bit,
3989         because setPaletteFromPageClientIfExists() was being "overriden" in mobile theme
3990         to set the palette, which isn't exactly what the function name says.
3991
3992         * platform/qt/RenderThemeQt.cpp:
3993         (WebCore::RenderThemeQt::platformActiveSelectionBackgroundColor):
3994         (WebCore::RenderThemeQt::platformInactiveSelectionBackgroundColor):
3995         (WebCore::RenderThemeQt::platformActiveSelectionForegroundColor):
3996         (WebCore::RenderThemeQt::platformInactiveSelectionForegroundColor):
3997         (WebCore::RenderThemeQt::platformFocusRingColor):
3998         (WebCore::RenderThemeQt::systemColor):
3999         (WebCore::RenderThemeQt::getMediaControlForegroundColor):
4000         (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
4001         Use the virtual colorPalette() to get the palette.
4002
4003         (WebCore::RenderThemeQt::colorPalette):
4004         (WebCore): Removed the code for getting the page client from here since it is
4005         used only by the QStyle variant.
4006
4007         * platform/qt/RenderThemeQt.h:
4008         (RenderThemeQt):
4009         * platform/qt/RenderThemeQtMobile.cpp:
4010         (WebCore::RenderThemeQtMobile::colorPalette):
4011         (WebCore):
4012         * platform/qt/RenderThemeQtMobile.h:
4013         (RenderThemeQtMobile):
4014
4015 2012-07-23  Simon Fraser  <simon.fraser@apple.com>
4016
4017         Part 1 of: Implement sticky positioning
4018         https://bugs.webkit.org/show_bug.cgi?id=90046
4019
4020         Reviewed by Ojan Vafai.
4021
4022         Add ENABLE_CSS_STICKY_POSITION, defaulting to off initially.
4023         
4024         Sort the ENABLE_CSS lines in the file. Make sure all the flags
4025         are in FEATURE_DEFINES.
4026
4027         * Configurations/FeatureDefines.xcconfig:
4028
4029 2012-07-23  Sheriff Bot  <webkit.review.bot@gmail.com>
4030
4031         Unreviewed, rolling out r123339.
4032         http://trac.webkit.org/changeset/123339
4033         https://bugs.webkit.org/show_bug.cgi?id=92006
4034
4035         massive media tests failure (Requested by philn on #webkit).
4036
4037         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: