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