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